File Analysis
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | ✅ Yes | - | The model to use for file analysis (e.g., “gemini-3-pro-preview”). |
messages | array | ✅ Yes | - | An array of message objects representing the conversation history and file data. |
role | string | ✅ Yes | - | The role of the message sender (e.g., “user” or “assistant”). |
content | array | ✅ Yes | - | An array of content objects containing the prompt text and file data. |
type | string | ✅ Yes | - | The type of content (“text” or “image_url” for file references). |
text | string | ✅ Yes | - | The text prompt for the file analysis. |
image_url | object | ✅ Yes | - | Reference to a file URL for analysis. |
url | string | ✅ Yes | - | The URL of the file to analyze (PDF, images, etc.). |
stream | boolean | ❌ No | false | Whether to stream the response. |