OpenAI Chat Completions
Use this endpoint when your client expects OpenAI’s Chat Completions request and response shape, such as OpenAI-compatible SDKs configured with a custom base URL.
The request body, supported model values, streaming flag, token limits,
tools, and structured-output fields are defined in the schema below.
Official protocol reference: OpenAI Chat Completions API.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The conversation so far, as an ordered list of messages.
If true, partial deltas are streamed as Server-Sent Events.
Maximum number of tokens to generate in the completion.
1024
OpenAI-compatible alias for maximum generated tokens.
1024
Sampling temperature. Higher values produce more random output.
0 <= x <= 21
Nucleus sampling parameter.
0 <= x <= 10.95
Penalizes repeated tokens.
-2 <= x <= 20
Penalizes tokens based on whether they already appeared.
-2 <= x <= 20
Up to 4 sequences where the API stops generating further tokens. The generated text will not contain the stop sequence.
Optional tool definitions in the OpenAI Chat Completions format. Support can vary by selected model and provider.
Controls which tool the model may call. Support can vary by selected model and provider.
auto, none, required Optional structured-output format, such as { "type": "json_object" } or JSON schema. Support can vary by selected model and provider.
Optional reasoning controls for models that expose reasoning behavior. Support can vary by selected model and provider.
Response
Chat completion result. When stream is true, the body is an SSE stream instead.