Chat completions (LLM). Set stream: true for token-by-token SSE streaming.
Body
modelstringYes- Model ID (e.g.
everyais/claude-opus-5) messagesarrayYes- Array of 1–1000 messages.
roleissystem/user/assistant/tool/developer(normalized to system).contentis a string, null, or an array of multimodal parts (up to 1000) streambooleanNo- SSE streaming (default
false) stream_optionsobjectNo- With
{"include_usage": true}, the final chunk includes usage max_tokensintegerNo- Maximum output tokens, 1–200000.
max_completion_tokensis normalized automatically temperaturenumberNo- 0–2
top_pnumberNo- 0–1
stopstring | string[]No- Up to 4
nintegerNo- Only 1 is supported (default 1). 2 or more returns 400
presence_penalty/frequency_penaltynumberNo- -2–2
seedintegerNo- Reproducibility hint
toolsarrayNo- Function tool definitions (up to 512) and the server-side web search
{"type":"web_search"}(up to 1 — see the web search guide) tool_choicestring | objectNoauto/none/required, or{"type":"function","function":{"name":"..."}}.nonealso disables web searchresponse_formatobjectNo{"type":"text"}·{"type":"json_object"}·{"type":"json_schema","json_schema":{...}}reasoning_effortstringNonone/low/medium/highparallel_tool_callsbooleanNo- Allow parallel tool calls
logprobs/top_logprobsboolean / integerNo- Forwarded on Chat Completions routes that support them.
top_logprobsis 0–20. Explicit values return 400 on OpenAI/Mantle upstream Responses routes userstringNo- End-user identifier
everyaisobjectNo- Gateway options —
{"cache":"on"|"off","cache_ttl":"5m"|"1h"}andprovider providerobjectNo- Routing hints:
sort(price/latency/throughput) andallow_fallbacks. Selecting providers by name is not supported. modelsstring[]No- Catalog fallback, max 5. Tried before reservation when the first model is not callable.
extra_bodyobjectNo- Provider-specific extensions — only the
anthropic/google/openai/everyaiskeys are allowed (any other key returns 400).extra_body.provideris rejected.
You may append :nitro (prefer lower latency) or :floor (prefer lower endpoint cost) to a model slug. Billing does not change.
Undefined OpenAI parameters (logit_bias, store, etc.) are silently ignored.
Model-specific options
The table above describes the shared input schema, not universal model support. Check capabilities and limits in GET /v1/models. false means unsupported; an omitted field means support is unverified. Explicit unsupported options, values, and combinations return 400.
| Model / route | Supported values and combinations |
|---|---|
| Claude Opus 5 and other latest Claude / Bedrock | Omit temperature, top_p, and extra_body.anthropic.top_k; explicit values return 400. reasoning_effort values low/medium/high use adaptive thinking and effort, without converting them into manual budget_tokens |
| Claude Opus 4.6 / Sonnet 4.6 | Support both adaptive and manual thinking. Manual budgets require 1024 ≤ budget_tokens < max_tokens |
| Claude 3.7 Sonnet / Opus 4, 4.1, 4.5 / Sonnet 4, 4.5 / Haiku 4.5 | Support manual thinking. reasoning_effort requests thinking budgets of 2048 (low), 8192 (medium), or 32768 (high); this budget is added to max_tokens in the provider request |
| Claude Fable / Mythos | Disabling reasoning with reasoning_effort: "none" returns 400 |
| Gemini 3.6, 3.7, 3.8 Flash / 3.5 Flash-Lite | Explicit temperature, top_p, or extra_body.google.top_k returns 400. Omission uses the provider default |
| Gemini 3.1 Flash Image / Flash-Lite Image (Chat) | Only explicit reasoning_effort: "high" is supported. See image endpoint documentation for size and quality |
| Gemini 3 Pro | Supports low/high; medium/none return 400 |
| Gemini 3.1 Pro / Gemini 3 Flash, 3.1 Flash-Lite, 3.5 Flash | Supports low/medium/high. none returns 400 and is never changed to low |
| Gemini 2.5 Pro | Thinking budgets: low=2048, medium=8192, high=32768 tokens; none returns 400 |
| Gemini 2.5 Flash / Flash-Lite | Thinking budgets: none=0, low=2048, medium=8192, high=24576 tokens |
- With thinking enabled on Claude 4.6 and earlier, explicit
temperaturemust be 1,top_pmust be 0.95–1, andtop_kreturns 400. Opus/Sonnet 4.5 and 4.6, plus Haiku 4.5, also reject specifying bothtemperatureandtop_p. Manual thinking cannot be combined withtool_choice: "required"or a named function. Fable/Mythos 5.1 does not support forced tool selection at all. - Chat
max_tokenscan be capped at the model's output limit. A manual budget supplied directly throughextra_body.anthropic.thinkingis not added tomax_tokens; it must be smaller thanmax_tokens. - An OpenAI-compatible request format does not imply identical options across provider routes. OpenAI/Mantle upstream Responses routes (including GPT-6 and Responses-only models) return 400 for explicit
stop,seed,presence_penalty,frequency_penalty,logprobs, ortop_logprobs. Evenlogprobs: falsediffers from omission. These options are not silently ignored;useris forwarded unchanged as the end-user identifier. This provider-route restriction also applies when your public endpoint is/v1/chat/completions. capabilities.samplingdescribes sampling support;limits.reasoning_effortslists the model's reasoning levels. Omission uses the model default and differs fromnone.json_modemeans JSON output requests;structured_outputsmeans native strict schema support. Claudejson_objectand JSON schemas withstrictomitted orfalseuse a best-effort prompt and do not guarantee schema compliance.strict: truerequires native support; otherwise it returns 400. Claudefunction.strictalso requires native support.- Strict function tools have separate support requirements from JSON schemas. Gemini 3
function.strict: trueuses the provider'sVALIDATEDmode for automatic tool selection. Gemini 2.5 supports JSON schemas but rejects strict function tools (strict: true) with 400. - Claude native strict support depends on the route. Bedrock supports Opus/Sonnet 4.5 and 4.6, plus Haiku 4.5; this does not automatically extend to Opus 5. Rely on support only when the public capability is
true. - Claude honors
parallel_tool_calls: falseby disabling parallel tool use. Gemini rejectsfalsewith 400;trueor omission allows the provider's parallel calls. - Gemini 2.5 rejects combining JSON output (
json_object/json_schema) with tools, and rejects mixing web search with function tools, with 400. Use those features separately. Gemini 3 supports these combinations.capabilities.json_mode_with_toolsandweb_search_with_toolsarefalsefor unsupported combinations; omission means unverified support. - In a function-tool loop, replay the original assistant
tool_callsunchanged to the same model, followed by the tool result for itstool_call_id. Geminitool_calls[].extra_content.google.thought_signatureis opaque provider state; do not modify it, strip it, or reuse it with another model. web_searchis available only on Chat models withcapabilities.web_search: true. Geminitool_choice: "none"also disables search. Requiring a tool or naming a function when only a search tool is present returns 400.
Streaming
With stream: true, data: {...} SSE chunks follow one another and end with data: [DONE].
Enabling stream_options.include_usage appends a final usage chunk.
See the streaming guide for a complete example and completion/error handling.