Chat Completions
OpenAI Chat Completions–compatible endpoint on the Modellix LLM gateway. Accepts a synchronous request with model (provider/name format) and an OpenAI-style messages array; returns a chat.completion JSON object by default, or SSE (text/event-stream) when stream=true. Use this path for the OpenAI SDK, Codex, and most OpenAI-compatible chat clients. Do not send Responses fields (input, max_output_tokens) or Anthropic Messages-only shapes on this endpoint—use /responses or /messages instead. Optional fields follow OpenAI Chat Completions; support depends on the selected model.
Authorizations
Authorization: Bearer (OpenAI SDK, Codex, OpenCode, etc.)
Headers
Optional session affinity header. Length 8–128; alphanumeric, -, and _ only.
8 - 128^[A-Za-z0-9_-]+$"my-conversation-001"
Body
OpenAI Chat Completions request body. Requires model and messages; optional stream, max_tokens, max_completion_tokens, temperature, and n.
Core fields below; other fields follow OpenAI Chat Completions.
Model ID in provider/name form
"openai/gpt-5.5"
"openai/gpt-5.6-sol"
"anthropic/claude-sonnet-5"
"google/gemini-3.6-flash"
OpenAI Chat Completions message list (min 1). Each item has role and content; roles include system, user, assistant, and tool.
1Default false. When true, returns SSE chat.completion.chunk events ending with data: [DONE].
Optional maximum number of tokens to generate. Model-dependent.
x >= 1Optional generation cap preferred by some newer OpenAI-style models.
x >= 1Sampling temperature for Chat Completions. Model-dependent.
Number of chat completion choices to generate.
x >= 1Response
Success. Non-streaming returns JSON; streaming returns SSE.
Shape follows OpenAI chat.completion
Unique identifier for this chat completion.
Object type. Typically chat.completion for non-streaming responses.
"chat.completion"
Unix timestamp (seconds) when the chat completion was created.
Model ID that produced this chat completion.
List of chat completion choices.
OpenAI chat.completion token usage counts.