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
Headers
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.
Response
Success. Non-streaming returns JSON; streaming returns SSE.
Shape follows OpenAI chat.completion