Skip to main content
POST
/
v1
/
chat
/
completions
gemini-3-pro-preview (file analysis)
curl --request POST \
  --url https://api.example.com/v1/chat/completions
Gemini’s OpenAI-compatible format for the file analysis API.
curl --location 'https://gptproto.com/v1/chat/completions' \
--header 'Authorization: sk-***********' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gemini-3-pro-preview",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "帮我分析这份文件"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://oss.heyoos.com/ai-draw/material/Essential-English.pdf"
                    }
                }
            ]
        }
    ],
    "stream": false
}'
{
  "error": {
    "message": "Input may not meet the guidelines. Please adjust and try again.",
    "type": "503"
  }
}

Path Parameters

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yes-The model to use for file analysis (e.g., “gemini-3-pro-preview”).
messagesarray✅ Yes-An array of message objects representing the conversation history and file data.
rolestring✅ Yes-The role of the message sender (e.g., “user” or “assistant”).
contentarray✅ Yes-An array of content objects containing the prompt text and file data.
typestring✅ Yes-The type of content (“text” or “image_url” for file references).
textstring✅ Yes-The text prompt for the file analysis.
image_urlobject✅ Yes-Reference to a file URL for analysis.
urlstring✅ Yes-The URL of the file to analyze (PDF, images, etc.).
streamboolean❌ NofalseWhether to stream the response.