Skip to main content
POST
/
v1
/
chat
/
completions
gemini-25-pro-deepsearch (image to text)
curl --request POST \
  --url https://api.example.com/v1/chat/completions
Gemini’s official format for the image to text API.
curl -X POST "https://gptproto.com/v1/chat/completions" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-2.5-pro-deepsearch",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": ",What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "data:image/jpeg;base64,${base64Image}"
          }
        }
      ]
    }
  ],
  "stream": false
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yesgemini-2.5-pro-deepsearchThe model to use for the request. gemini-2.5-pro-deepsearch
messagesarray✅ Yes-Array of message objects for the conversation * role:user,The role of the message. * role:assistant,The role of the message. * role:system,The role of the message.
contentarray✅ Yes-text , image_url
textstring✅ Yes-* type:text,The positive prompt for the generation. * type:image_url,Optional image reference that guides generation.
image_urlobject✅ Yes-* type:image_url,The URL of the image to use for the generation.
streamboolean❌ NotrueWhether to stream the response