Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Your workspace API key, e.g. sk_sovereign_..., sent as Authorization: Bearer .

Headers

X-Omnia-Cache-Control
enum<string>

Per-request cache control (only meaningful when the workspace has response caching enabled — it can reduce caching, never enable it). no-cache: skip the cache and force a fresh model run, refreshing the stored copy. no-store: fresh run AND keep this response out of cache storage entirely. Either way the response carries X-Omnia-Cache: bypass.

Available options:
no-cache,
no-store

Body

application/json
model
string
required

The model id, e.g. Qwen/Qwen3-32B. A dedicated endpoint is addressed as dedicated/.

Example:

"Qwen/Qwen3-32B"

messages
object[]
required

The conversation so far.

stream
boolean
default:false

Stream the response as server-sent events.

stream_options
object | null

Streaming options. Usage reporting is included automatically.

temperature
number

Sampling temperature (0–2).

top_p
number

Nucleus sampling probability mass.

top_k
integer

Top-k sampling.

n
integer

Number of completions to generate.

max_tokens
integer

Maximum output tokens. Bounded by the model's context window.

max_completion_tokens
integer

Alias for max_tokens.

stop
any

Up to a few stop sequences (string or array of strings).

seed
integer

For more reproducible sampling.

frequency_penalty
number

Penalize repeated tokens by frequency.

presence_penalty
number

Penalize tokens that have appeared.

repetition_penalty
number

Penalize repetition.

logit_bias
object

Bias specific tokens.

logprobs
boolean

Return log probabilities.

top_logprobs
integer

How many top log probabilities to return per token.

response_format
object

{ "type": "json_object" } or { "type": "json_schema", ... } for structured output.

tools
object[]

Function definitions the model may call.

tool_choice
any

auto, required, none, or a specific function.

parallel_tool_calls
boolean

Allow the model to call multiple tools in parallel.

reasoning_effort
string

Reasoning effort for reasoning-capable models.

user
string

A stable identifier for the end user.

fallbacks
string[]

Up to 2 backup model ids tried in order when the primary fails with a transient error (429/timeout/5xx). Billing uses the model that actually served; the X-Omnia-Fallback-From response header names the model it fell back from. Gateway feature — never forwarded to the model.

Maximum array length: 2

Response

A chat completion. When streaming, a text/event-stream of chunks ending with data: [DONE].

id
string
Example:

"chatcmpl-..."

object
string
Example:

"chat.completion"

model
string
choices
object[]
usage
object