Creates a model response for a conversation, in the OpenAI Chat Completions format.
Body
modelstringYes- Model ID, such as
everyais/gemini-3-8-flash messagesarrayYes- 1–1000 messages.
role:system,user,assistant,toolordeveloper(treated assystem).content: a string, null, or up to 1000 parts. Send images (image_url) as base64 data URLs. Only open-weight models (vLLM-based, such as Nebius) accepthttpsURLs; Claude, GPT and Gemini return 400 for them streambooleanNo- Stream server-sent events. Default
false stream_optionsobjectNo{"include_usage": true}adds a final usage chunktemperaturenumberNo- 0–2
top_pnumberNo- 0–1
stopstring | string[]No- Up to 4 sequences
nintegerNo- Only
1. 2 or more returns 400 presence_penalty/frequency_penaltynumberNo- -2–2
seedintegerNo- Best-effort reproducibility
toolsarrayNo- Up to 512 function tools, plus one
{"type":"web_search"}. See web search tool_choicestring | objectNoauto,none,requiredor{"type":"function","function":{"name":"..."}}.nonealso disables web search. Some models (Claude Opus 5.5, Sonnet 5.5, Fable 5.1) return 400 for forced tool use; seetool_choiceinparameter_profileresponse_formatobjectNo{"type":"text"},{"type":"json_object"}or{"type":"json_schema","json_schema":{...}}reasoning_effortstringNolow,medium,high,xhigh,max. Some models add values such asnoneorminimalparallel_tool_callsbooleanNo- Allow parallel tool calls
logprobs/top_logprobsboolean / integerNo- Token log probabilities.
top_logprobs: 0–20 verbositystringNolow,medium,high. GPT models only; others return 400prompt_cache_keystringNo- OpenAI prompt cache key, up to 1024 characters. GPT models only
safety_identifierstringNo- Hashed end-user ID for abuse detection, up to 64 characters. GPT models only
logit_biasobjectNo- Token ID to bias (-100–100), up to 300 entries. Open-weight models only
userstringNo- End-user identifier
everyaisobjectNo- Gateway options:
cache,cache_ttl,parameter_policy,provider. See prompt caching providerobjectNo- Provider preferences:
sort(price,latency,throughput) andallow_fallbacks. You can't pick a provider by name modelsstring[]No- Fallback models, up to 5. Tried in order if the first model is unavailable
extra_bodyobjectNo- Only
anthropic,google,openaiandeveryaiskeys; others return 400. Gemini takesgoogle.top_kandgoogle.media_resolution(low,medium,high)
Model ID suffixes set provider order: :nitro for lowest latency, :floor for cheapest provider first. Your price stays the same. A reasoning effort suffix such as :high sets reasoning_effort when the body leaves it out, and it combines with a speed suffix (:high:nitro). Use it in tools that can't send reasoning effort, such as Cursor.
Unknown fields such as store and service_tier return 400.
Model options
Pick a model at the top of this page, or read capabilities, limits and parameter_constraints from GET /v1/models. Use only listed allowed_values.
Parameter policy decides whether unsupported values are adjusted or rejected with 400.
- Strict JSON schemas need
capabilities.structured_outputs: true. - To continue a tool conversation, keep the same model and send back the original
tool_callsunchanged. Gemini needstool_calls[].extra_content.google.thought_signature; OpenAI models needextra_content.openai.reasoning_idandreasoning_encrypted_content.
Streaming
With stream: true, the response is data: {...} events ending with data: [DONE]. See streaming.