API DocsAI Model APIsChatGemini
Gemini Media Recognition
Gemini Image, PDF, Audio, Video Recognition Request
Gemini Media Recognition
Gemini Image, PDF, Audio, Video Recognition Request
⚠️Note: Only supports uploading images, PDFs, audio, and video via inlineData in base64 format. fileData.fileUri or File API are not supported.
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 Media Recognition
Gemini Image, PDF, Audio, Video Recognition Request
⚠️Note: Only supports uploading images, PDFs, audio, and video via inlineData in base64 format. fileData.fileUri or File API are not supported.
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 | Required. List of conversation turns. Each element represents one turn. |
generationConfig | object | No | - |
safetySettings | array | No | - |
tools | array | No | - |
systemInstruction | object | No | - |
Responses
200: Success
Content-Type: application/json
Request Example
curl -X POST "https://autorouter.top/v1beta/models/gemini-2.5-flash:generateContent" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Describe the content of this image."
},
{
"inlineData": {
"mimeType": "image/png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC"
}
}
]
}
]
}'Response Examples
{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}