gemini-3.6-flash
gemini-3.6-flash
TextGooglegemini-3.6-flashgemini-3.6-flash
gemini-3.6-flash
Authentication
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Model name (model)
gemini-3.6-flash
Integration protocol
Why choose this protocol
适合原本使用 Gemini SDK 或 generateContent 接口的用户直接迁移。
Endpoint URL
POST/v1beta/models/gemini-3.6-flash:generateContent
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonRequest / response JSON
Request
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "你好,世界"
}
]
}
],
"generationConfig": {
"temperature": 0.7,
"topP": 1,
"maxOutputTokens": 4096
},
"tools": []
}Response
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Hello from Mix API"
}
]
}
}
],
"modelVersion": "gemini-3.6-flash",
"usageMetadata": {
"promptTokenCount": 8,
"candidatesTokenCount": 16,
"totalTokenCount": 24
}
}Request / response fields
Request fields
| Field | Field type | Required |
|---|---|---|
| contents | array | Y |
| contents[] | object | Y |
| contents[].role | string | Y |
| contents[].parts | array | Y |
| contents[].parts[] | object | Y |
| contents[].parts[].text | string | Y |
| generationConfig | object | Y |
| generationConfig.temperature | number | Y |
| generationConfig.topP | integer | Y |
| generationConfig.maxOutputTokens | integer | Y |
| tools | array | Y |
Response fields
| Field | Field type | Required |
|---|---|---|
| candidates[].content.parts[].text | string | N |
| usageMetadata.promptTokenCount | integer | N |
| usageMetadata.candidatesTokenCount | integer | N |
| usageMetadata.totalTokenCount | integer | N |
Code examples
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1beta/models/gemini-3.6-flash:generateContent" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "你好,世界"
}
]
}
],
"generationConfig": {
"temperature": 0.7,
"topP": 1,
"maxOutputTokens": 4096
},
"tools": []
}'