Chat completions (LLM). Set stream: true for token-by-token SSE streaming.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID (e.g. everyais/claude-opus-5) |
messages | array | Yes | Array of 1–1000 messages. role is system / user / assistant / tool / developer (normalized to system). content is a string, null, or an array of multimodal parts (up to 1000) |
stream | boolean | No | SSE streaming (default false) |
stream_options | object | No | With {"include_usage": true}, the final chunk includes usage |
max_tokens | integer | No | Maximum output tokens, 1–200000. max_completion_tokens is normalized automatically |
temperature | number | No | 0–2 |
top_p | number | No | 0–1 |
stop | string | string[] | No | Up to 4 |
n | integer | No | Only 1 is supported (default 1). 2 or more returns 400 |
presence_penalty / frequency_penalty | number | No | -2–2 |
seed | integer | No | Reproducibility hint |
tools | array | No | Function tool definitions (up to 512) and the server-side web search {"type":"web_search"} (up to 1 — see the web search guide) |
tool_choice | string | object | No | auto / none / required, or {"type":"function","function":{"name":"..."}}. Applies to function tools only |
response_format | object | No | {"type":"text"} · {"type":"json_object"} · {"type":"json_schema","json_schema":{...}} |
reasoning_effort | string | No | none / low / medium / high |
parallel_tool_calls | boolean | No | Allow parallel tool calls |
logprobs / top_logprobs | boolean / integer | No | Passed through to OpenAI-compatible backends only. top_logprobs is 0–20 |
user | string | No | End-user identifier |
everyais | object | No | Gateway options — {"cache":"on"|"off","cache_ttl":"5m"|"1h"} and provider |
provider | object | No | Endpoint hint — only / order / ignore / sort (price| latency| throughput) / allow_fallbacks. List price stays the model price. sort changes routing only. |
models | string[] | No | Catalog fallback, max 5. Tried before reservation when the first model is not callable. |
extra_body | object | No | Provider-specific extensions — only the anthropic / google / openai / everyais keys are allowed (any other key returns 400). extra_body.provider is 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.
Request
{
"model": "everyais/claude-opus-5",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": false,
"max_tokens": 1024
}Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1709884800,
"model": "everyais/claude-opus-5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 10,
"total_tokens": 35
}
}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.