curl --request POST \
--url https://llm.modellix.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"video_tokens": 123
}
}
}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.
curl --request POST \
--url https://llm.modellix.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"text_tokens": 123,
"audio_tokens": 123,
"video_tokens": 123
}
}
}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"
Optional end-user id for filtering request logs later. Length 8–128; ASCII letters, digits, -, and _ only. Invalid values return 400.
8 - 128^[A-Za-z0-9_-]+$"end_user_01"
Body
OpenAI Chat Completions request body. Requires model and messages; optional stream, max_tokens, max_completion_tokens, temperature, n, and reasoning_effort.
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.
1Show child attributes
Show child attributes
Default 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 >= 1Optional reasoning level. Follows OpenAI Chat Completions. Support and allowed values depend on the model.
Response
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.
Show child attributes
Show child attributes