Skip to main content
POST
/
v1beta
/
models
/
gemini-2.5-pro-deepsearch:generateContent
gemini-25-pro-deepsearch (generatecontent)
curl --request POST \
  --url https://api.example.com/v1beta/models/gemini-2.5-pro-deepsearch:generateContent
Gemini’s official format for the generatecontent API.

Query Parameters

curl -X POST "https://gptproto.com/v1beta/models/gemini-2.5-pro-deepsearch:generateContent" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-2.5-pro-deepsearch",
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Hello, please introduce yourself"
        }
      ]
    }
  ],
  "system_instruction": {
    "role": "system",
    "parts": [
      {
        "text": "You are a helpful AI assistant"
      }
    ]
  },
  "tools": [],
  "safety_settings": [
    {
      "category": "HARM_CATEGORY_HARASSMENT",
      "threshold": "BLOCK_MEDIUM_AND_ABOVE"
    }
  ],
  "generation_config": {
    "thinking_config": {
      "include_thoughts": false,
      "thinking_budget": 1000
    },
    "max_output_tokens": 4096,
    "response_modalities": null,
    "temperature": 1.8,
    "top_p": 0.8,
    "top_k": 40,
    "candidate_count": 1,
    "presence_penalty": 0.0,
    "frequency_penalty": 0.0,
    "stop_sequences": [
      "END",
      "STOP"
    ],
    "response_mime_type": "text/plain",
    "response_schema": null,
    "seed": 12345,
    "response_logprobs": false,
    "logprobs": null,
    "audio_timestamp": false
  },
  "stream": false,
  "labels": {
    "user_id": "12345",
    "session_id": "session_001"
  }
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yesgemini-2.5-pro-deepsearchThe model to use for the request
contentsarray❌ No[{"role": "user", "parts": [{"text": "Hello, please introduce yourself"}]}]Contents parameter
system_instructionobject❌ No{"role": "system", "parts": [{"text": "You are a helpful AI assistant"}]}System Instruction parameter
toolsarray❌ No[]Tools parameter
safety_settingsarray❌ No[{"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}]Safety Settings parameter
generation_configobject❌ No{"thinking_config": {"include_thoughts": false, "thinking_budget": 1000}, "max_output_tokens": 4096, "response_modalities": null, "temperature": 1.8, "top_p": 0.8, "top_k": 40, "candidate_count": 1, "presence_penalty": 0.0, "frequency_penalty": 0.0, "stop_sequences": ["END", "STOP"], "response_mime_type": "text/plain", "response_schema": null, "seed": 12345, "response_logprobs": false, "logprobs": null, "audio_timestamp": false}Generation Config parameter
streamboolean❌ NofalseWhether to stream the response
labelsobject❌ No{"user_id": "12345", "session_id": "session_001"}Labels parameter