gemini-3-1-thinking API Руководство по модели
Краткий вывод
- Supports Chat Completions for low-friction SDK migration.
- Supports streaming and tool-calling for agent workflows.
- Stabilize system/messages parameters before production rollout.
Ключевые возможности
- Chat and reasoning:Supports multi-turn context and structured outputs.
- Streaming output:SSE token streaming for real-time UX.
- Tool calling:Compose retrieval/execution workflows with tools.
Когда использовать
- When building coding/Q&A assistants and task agents.
- When streaming and tool-calling are required.
Когда не использовать
- For pure image/video generation tasks.
- For simple templated text without reasoning needs.
Особенности работы
- API calls are stateless; pass full context via messages.
- With stream=true, responses return as SSE events.
Минимальный запрос
{
"model": "gemini-3-1-thinking",
"messages": [
{
"role": "user",
"content": "Summarize suitable use cases for this model."
}
],
"max_tokens": 200
}
Минимальный ответ
{
"id": "chatcmpl_xxxxxxxx",
"model": "gemini-3-1-thinking",
"object": "chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop"
}
]
}
Ключевые параметры
| Параметр | Тип | Обяз. | По умолчанию | Диапазон | Описание |
|---|
| model | string | Да | gemini-3-1-thinking | - | Exact model identifier from ToAPIs. |
| messages | object[] | Да | - | - | Conversation messages in chronological order. |
| max_tokens | integer | Да | - | >=1 | Maximum output tokens. |
| stream | boolean | Нет | false | - | Enable SSE streaming output. |
| tools | object[] | Нет | - | - | Tool/function definitions for tool-calling. |
Частые ошибки
| HTTP | Code | Триггер | Исправление | Повтор |
|---|
| 400 | invalid_request_error | Missing fields or invalid payload types. | Validate model/messages/max_tokens schema. | Retry only after payload fix. |
| 401 | authentication_error | Missing or invalid API key. | Verify Authorization header and key scope. | Retry after authentication fix. |
FAQ
- What is gemini-3-1-thinking best for?
Best for chat, reasoning, coding, and tool-calling assistant workflows.
Связанные API