API DocsAI Model APIsImagesGemini
Gemini Native Format
Gemini Image Generation
Gemini Native Format
Gemini Image Generation
Base URL
https://autorouter.top— Production
Authentication
BearerAuth: http (bearer)
Authenticate using a Bearer Token.
Format: Authorization: Bearer sk-xxxxxx
Endpoints
POST /v1beta/models/{model}:generateContent/
Gemini Native Format
Gemini Image Generation
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
model | path | string | Yes | Model name |
Request Body
Content-Type: application/json
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
contents | array | Yes | - |
generationConfig | object | Yes | - |
Responses
200: Success
Content-Type: application/json
Request Example
curl -X POST "https://autorouter.top/v1beta/models/gemini-3.1-flash-image-preview:generateContent/" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Generate an image of an astronaut floating in space"
}
]
}
],
"generationConfig": {
"responseModalities": [
"IMAGE",
"TEXT"
]
}
}'Response Examples
{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}