OpenAI-compatible chat completions backed by Gemini 3.6 Flash (standard tier) — a next-gen fast thinking model with a 1M-token context, image input and streaming. Set model to gemini-3.6-flash. Four tiers, selected by the model name: gemini-3.6-flash (standard, medium thinking budget), -high (most thinking, for multi-step reasoning), -low (least thinking, fastest and cheapest), -tiered (the model picks a budget per request). All four cost the same per token — a bigger thinking budget simply emits more output tokens.
📥 Context window (max input):~1,000,000 tokens (million-token long context).
Try in Playground →Authentication
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Create an API Key in the console to start.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID, here gemini-3.6-flash. |
| messages | array | Yes | Array of messages; each has role (system/user/assistant) and content. content may be a string, or an array of {type:text} and {type:image_url} parts for image understanding (multimodal/vision). |
| stream | boolean | No | Stream the response as SSE. Default false. |
| temperature | number | No | Sampling temperature, 0–2. |
| max_tokens | integer | No | Maximum number of tokens to generate. |
| web_search | boolean | No | Set true to enable web search: the gateway augments the prompt with live results (citing sources) before the model answers. Can also be triggered via a tools entry {"type":"web_search"}. |
Request example
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gemini-3.6-flash", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'Response
{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "gemini-3.6-flash",
"choices": [
{"index": 0, "message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}
],
"usage": {"prompt_tokens": 11, "completion_tokens": 7, "total_tokens": 18}
}Image input (Vision)
Put an image in the message content array and the model will analyze it (visual Q&A, reading text / OCR, …). image_url accepts a public image link or an inline base64 data URL (data:image/png;base64,...). Available on multimodal models (gpt-5.5, gemini series, …).
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gemini-3.6-flash", "messages": [{"role": "user", "content": [{"type": "text", "text": "这张图里有什么?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'Error codes
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 402 | Insufficient balance / key limit reached |
| 400 | Invalid parameters or model |
| 429 | Rate limited |
| 502 | All upstream providers failed |