1. Gemini
NEWAPI
  • Image Models
    • DOUBAO
      • doubao-seed-1-8-251228
    • Gemini
      • gemini-3.1-pro-preview
        POST
  • Video Models
    • Sora
      • Sora-2
      • Sora-2(获取视频任务状态)
      • Sora-2(获取视频内容)
  • Chat Models
    • Claude
      • claude-opus-4-6
    • GPT
      • GPT 5.4
      • GPT 5.4(Responses)
    • Gemini
      • gemini-3.1-pro
  1. Gemini

gemini-3.1-pro-preview

POST
/v1beta/models/{model}:generateContent
Gemini 3.1 Pro谷歌最强大的AI模型 — 在推理、编程和智能体能力上实现显著提升推理能力是Gemini 3 Pro的2倍,在18项基准测试中12项排名第一,原生SVG及3D代码渲染。
Actual API Endpoint: POST https://refreshing-gratitude-production.up.railway.app/v1beta/models/{model}:generateContent
Model Code: gemini-3.1-pro-preview

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Request successful
Body

🟠401
🟠429
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1beta/models/:generateContent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contents": [
        {
            "role": "user",
            "parts": [
                {
                    "text": "draw a cat"
                }
            ]
        }
    ],
    "generationConfig": {
        "responseModalities": [
            "TEXT",
            "IMAGE"
        ],
        "imageConfig": {
            "aspectRatio": "16:9",
            "imageSize": "2k"
        }
    }
}'
Response Response Example
{
    "candidates": [
        {
            "content": {
                "role": "string",
                "parts": [
                    {}
                ]
            },
            "finishReason": "string",
            "safetyRatings": [
                {}
            ]
        }
    ],
    "usageMetadata": {
        "promptTokenCount": 0,
        "candidatesTokenCount": 0,
        "totalTokenCount": 0
    }
}
Modified at 2026-03-20 10:27:55
Previous
doubao-seed-1-8-251228
Next
Sora-2
Built with