Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
Example:

"gpt-5.4"

messages
object[]
required
temperature
number

Sampling temperature.

Required range: 0 <= x <= 2
top_p
number

Nucleus sampling probability mass.

Required range: 0 <= x <= 1
max_tokens
integer
deprecated

Deprecated compatibility alias for max_completion_tokens. APIAny converts it only when the selected model route requires the newer field.

Required range: x >= 1
max_completion_tokens
integer

Maximum reasoning plus final-answer tokens. Kimi K3 defaults to 131072 when omitted and supports up to 1048576.

Required range: 1 <= x <= 1048576
reasoning_effort
enum<string>

Kimi K3 reasoning effort. K3 always reasons and currently supports only max.

Available options:
max
stop

Up to 4 stop sequences.

n
integer

Number of completions to generate.

Required range: x >= 1
frequency_penalty
number
Required range: -2 <= x <= 2
presence_penalty
number
Required range: -2 <= x <= 2
seed
integer

Best-effort deterministic sampling seed.

response_format
object

Force JSON object or JSON-schema output, e.g. { "type": "json_object" }.

tools
object[]

Tool / function declarations the model may call.

tool_choice

Tool selection: 'auto' | 'none' | 'required' | { type: 'function', function: { name } }.

logprobs
boolean
top_logprobs
integer
Required range: 0 <= x <= 20
logit_bias
object
user
string

End-user identifier for abuse monitoring.

stream
boolean

If true, partial deltas are streamed as server-sent events (OpenAI chat.completion.chunk), terminated by 'data: [DONE]'.

Response

OpenAI-compatible chat completion.

id
string
required
object
string
required
Example:

"chat.completion"

created
integer
required
model
string
required
choices
object[]
required
usage
object