File Analysis (Stream)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contents | array | ✅ Yes | - | An array of content objects representing the conversation history and file data. The role of the message sender. Typically "user" or "model". Optional for single-turn requests. |
parts | array | ✅ Yes | - | An array of parts that make up the message content. Can include both text and file data. Text content of the message or prompt for analyzing the file. |
file_data | object | ❌ No | - | Reference to file data for analysis (PDF, images, etc.). The MIME type of the file (e.g., "application/pdf", "image/jpeg", "image/png"). |
file_uri | string | ✅ Yes | - | The URI of the file to analyze. Can be a public URL. |
inlineData | object | ❌ No | - | Inline data for images or other media (base64 encoded). |
functionResponse | object | ❌ No | - | Response from a function call. |
videoMetadata | object | ❌ No | - | Metadata for video content. |
functionCall | object | ❌ No | - | Function call request. |
functionCalls | array | ❌ No | - | Multiple function calls. |
thoughtSignature | string | ❌ No | - | Signature for thought content. |
thought | string | ❌ No | - | Thought content for reasoning models. |