Quick Answer
- Supports Chat Completions for low-friction SDK migration.
- Supports streaming and tool-calling for agent workflows.
- Stabilize system/messages parameters before production rollout.
Key Parameters
- model | string | required | gemini-2-5-flash-vip | - | Exact model identifier from ToAPIs.
- messages | object[] | required | - | - | Conversation messages in chronological order.
- max_tokens | integer | required | - | >=1 | Maximum output tokens.
- stream | boolean | optional | false | - | Enable SSE streaming output.
- tools | object[] | optional | - | - | Tool/function definitions for tool-calling.
Common Errors
- 400 invalid_request_error: trigger=Missing fields or invalid payload types.; fix=Validate model/messages/max_tokens schema.; retry=Retry only after payload fix.
- 401 authentication_error: trigger=Missing or invalid API key.; fix=Verify Authorization header and key scope.; retry=Retry after authentication fix.

