Gemini Native Format
POST /v1beta/models/{model}:generateContent/
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model (path) | string | Required | Model name |
contents | array<object> | Required | - |
contents[].role | string | Optional | - |
contents[].parts | array<object> | Optional | - |
contents[].parts[].text | string | Optional | - |
generationConfig | object | Required | - |
generationConfig.thinkingConfig | object | Optional | - |
generationConfig.thinkingConfig.includeThoughts | boolean | Required | Whether to return thinking content |
generationConfig.responseModalities | array<string> | Required | - |
generationConfig.imageConfig | object | Required | - |
generationConfig.imageConfig.aspectRatio | string | Required | - |
generationConfig.imageConfig.imageSize | string | Required | - |
Request Example
{
"path": {
"model": "string"
},
"body": {
"contents": [
{}
],
"generationConfig": {
"responseModalities": [
"string"
],
"imageConfig": {
"aspectRatio": "string",
"imageSize": "string"
}
}
}
}
Response Fields(200)
| Field Name | Type | Description |
|---|---|---|
| No structured response fields (may be binary or empty response body) |