File Analysis
| 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. |