Skip to main content
Use the official OpenAI client libraries against Modellix by setting the base URL to the LLM gateway and using a Modellix API key. Requests are synchronous and can stream over SSE.
Use a Modellix API key from the console, not an OpenAI platform key. Model IDs use provider/name (for example openai/gpt-5.5)—see Models & Pricing for the full list.

Configure the client

Then call the SDK as usual. Chat Completions maps to POST /v1/chat/completions; Responses maps to POST /v1/responses.

Chat Completions example

Streaming

Set stream=true (or the SDK equivalent). The gateway returns text/event-stream with OpenAI-style chat.completion.chunk events ending in data: [DONE].

Responses API

If your SDK or app targets the OpenAI Responses API, keep the same base URL and key, but send Responses fields (input, max_output_tokens) instead of Chat Completions messages / max_tokens. See Create response.
  • LLM API guide — protocols, auth, errors, and curl examples
  • Codex — CLI config with openai_base_url
  • OpenCode — provider baseURL for OpenAI-compatible mode