← All docs

Endpoints

Create a chat completion

POST/v1/chat/completions

Loading models…

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, tool or developer (treated as system). 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) accept https URLs; Claude, GPT and Gemini return 400 for them
streambooleanNo
Stream server-sent events. Default false
stream_optionsobjectNo
{"include_usage": true} adds a final usage chunk
temperaturenumberNo
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 | objectNo
auto, none, required or {"type":"function","function":{"name":"..."}}. none also disables web search. Some models (Claude Opus 5.5, Sonnet 5.5, Fable 5.1) return 400 for forced tool use; see tool_choice in parameter_profile
response_formatobjectNo
{"type":"text"}, {"type":"json_object"} or {"type":"json_schema","json_schema":{...}}
reasoning_effortstringNo
low, medium, high, xhigh, max. Some models add values such as none or minimal
parallel_tool_callsbooleanNo
Allow parallel tool calls
logprobs / top_logprobsboolean / integerNo
Token log probabilities. top_logprobs: 0–20
verbositystringNo
low, medium, high. GPT models only; others return 400
prompt_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) and allow_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, openai and everyais keys; others return 400. Gemini takes google.top_k and google.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_calls unchanged. Gemini needs tool_calls[].extra_content.google.thought_signature; OpenAI models need extra_content.openai.reasoning_id and reasoning_encrypted_content.

Streaming

With stream: true, the response is data: {...} events ending with data: [DONE]. See streaming.

Contact support