Skip to main content
POST
Create an OpenAI-compatible chat completion

Headers

Authorization
string | null

Bearer API key.

x-api-key
string | null

API key alternative for Anthropic-compatible clients. Authorization takes precedence when both headers are present.

Body

application/json

OpenAI-compatible chat completion request.

model
string
required

Public model ID.

Minimum string length: 1
messages
ChatCompletionMessage · object[]
required

OpenAI-compatible chat messages.

Minimum array length: 1
flagged_categories
enum<string>[]

Abliteration safety categories to block for the latest user turn. Parent categories include their narrower child categories.

Available options:
harassment,
harassment/threatening,
hate,
hate/threatening,
illicit,
illicit/violent,
self-harm,
self-harm/intent,
self-harm/instructions,
sexual,
sexual/minors,
violence,
violence/graphic
stream
boolean
default:false

Whether to stream the response.

max_tokens
integer | null
Required range: 1 <= x <= 999990
max_completion_tokens
integer | null
Required range: 1 <= x <= 999990
temperature
number | null
Required range: 0 <= x <= 2
top_p
number | null
Required range: 0 <= x <= 1
frequency_penalty
number | null
Required range: -2 <= x <= 2
presence_penalty
number | null
Required range: -2 <= x <= 2
logit_bias
Logit Bias · object | null
n
integer | null
Required range: 1 <= x <= 128
seed
integer | null
stop
stream_options
ChatCompletionStreamOptions · object | null
thinking
boolean | null

Legacy compatibility toggle. The gateway translates this into backend-owned model-profile reasoning controls.

reasoning
ChatCompletionReasoningOptions · object | null

OpenRouter-style reasoning controls translated by the selected model profile.

reasoning_effort
enum<string> | null

OpenAI/vLLM-compatible reasoning effort control.

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max,
ultracode
include_reasoning
boolean | null

Whether reasoning fields may be returned when the runtime emits them.

safety_identifier
string | null

Accepted for OpenAI compatibility, but not used for V1 abuse correlation and not forwarded to model runtimes.

Maximum string length: 64
user
string | null

Accepted for OpenAI compatibility but not forwarded to model runtimes.

Maximum string length: 512
structuredOutputs
boolean

Client structured-output capability declaration accepted for compatibility. It is ignored and never forwarded; use response_format to request an output format.

tools
Tools · object[] | null
tool_choice
Available options:
none,
auto,
required
parallel_tool_calls
boolean | null
functions
Functions · object[] | null
function_call
Available options:
none,
auto
response_format
ChatCompletionResponseFormatText · object
modalities
string[] | null
verbosity
enum<string> | null
Available options:
low,
medium,
high
audio
Audio · object | null
prediction
Prediction · object | null
metadata
Metadata · object | null
store
boolean | null
service_tier
string | null
prompt_cache_key
string | null
Maximum string length: 512
prompt_cache_retention
enum<string> | null
Available options:
in_memory,
24h
logprobs
boolean | null
top_logprobs
integer | null
prompt_logprobs
integer | null
web_search_options
Web Search Options · object | null
cache_salt
string | null

Response

Successful Response

id
string
required
created
integer
required
model
string
required
choices
ChatCompletionChoice · object[]
required
object
string
default:chat.completion
Allowed value: "chat.completion"
usage
ChatCompletionUsage · object | null
system_fingerprint
string | null
service_tier
string | null
Last modified on August 11, 2026