Skip to main content
POST
Create chat completion

Body

application/json

Chat completion request

Request to generate a chat completion. Compatible with the OpenAI chat completions API.

messages
object[]
required
model
string
required

Model ID to use

Example:

"gpt-4o"

frequency_penalty
number | null
max_tokens
integer | null

Limit on the tokens the model writes, thinking included on models that think. Gemini 4 models answer in up to 65,536 tokens by default (32,768 from Carbon and Argon when not streaming); a higher value, up to 1,048,576 less the input, turns on long decode, and the response continues past that until it is finished or the limit is reached. Stream a long decode: it can run for many minutes.

presence_penalty
number | null
reasoning_effort
string | null

Reasoning/thinking effort for models that support it (e.g. "low", "medium", "high"). Accepted values vary by model: OpenAI reasoning models take minimal/low/medium/high, Claude models take low/medium/high/xhigh/max, Kimi K3 only supports max. Gemini 4 models take low/medium/high, and Neon and Hydrogen also xhigh; left out, Neon and Hydrogen think at high and Carbon and Argon at medium. Ignored by models without configurable reasoning.

response_format
object | null
service_tier
string | null
default:auto

Processing tier, as on OpenAI and OpenRouter. "auto" (the default) runs at the standard tier; "ultrafast" opts into OpenAI's Ultrafast mode on models that offer it (GPT 6.1 Sol, GPT 6 Astra) at its higher per-token price. The other tier names (default, flex, priority, fast) are accepted; a tier the model does not price runs at the standard tier. The response's top-level service_tier reports the tier actually served, and the request bills at that tier's rates.

stream
boolean
default:false
target_namespace
string | null

Namespace to bill. Defaults to your own, and can be an organization you are an admin or editor of.

temperature
number | null
tool_choice
tools
object[] | null
top_p
number | null

Response

Chat completion

choices
object[]
created
integer
id
string
model
string
object
enum<string>
Available options:
chat.completion
usage
object | null