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": "34e46126-1a89-4aac-9e45-e954f8dee893",
"object": "chat.completion",
"created": 1794968412,
"model": "openai/gpt-5.6-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I'm a language model that answers questions and helps you write, code, and reason.",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 18,
"total_tokens": 33,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 15,
"audio_tokens": 0,
"video_tokens": 0
}
}
}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": "34e46126-1a89-4aac-9e45-e954f8dee893",
"object": "chat.completion",
"created": 1794968412,
"model": "openai/gpt-5.6-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I'm a language model that answers questions and helps you write, code, and reason.",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 18,
"total_tokens": 33,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 15,
"audio_tokens": 0,
"video_tokens": 0
}
}
}Authorizations
Headers
Body
OpenAI Chat Completions request body. Requires model and messages; optional stream, max_tokens, max_completion_tokens, temperature, n, reasoning_effort, and response_format.
Core fields below; other fields follow OpenAI Chat Completions.
Response
Success. Non-streaming returns JSON; streaming returns SSE.
Shape follows OpenAI chat.completion