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
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. 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
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