generateContent
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | ✅ Yes | gemini-2.5-pro-deepsearch | The model to use for the request |
contents | array | ❌ No | [{"role": "user", "parts": [{"text": "Hello, please introduce yourself"}]}] | Contents parameter |
system_instruction | object | ❌ No | {"role": "system", "parts": [{"text": "You are a helpful AI assistant"}]} | System Instruction parameter |
tools | array | ❌ No | [] | Tools parameter |
safety_settings | array | ❌ No | [{"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}] | Safety Settings parameter |
generation_config | object | ❌ 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 |
stream | boolean | ❌ No | false | Whether to stream the response |
labels | object | ❌ No | {"user_id": "12345", "session_id": "session_001"} | Labels parameter |