Generate content using Gemini models with the official Gemini API format
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contents | array | ✅ Yes | - | An array of content objects representing the conversation history. The role of the message sender. Typically "user" or "model". |
parts | array | ✅ Yes | - | An array of parts that make up the message content. Text content of the message. |
inlineData | object | ❌ No | - | Inline data for images or other media (base64 encoded). |
functionResponse | object | ❌ No | - | Response from a function call. |
fileData | object | ❌ No | - | Reference to uploaded file data. |
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. |