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
Setstream=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.
Related
- LLM API guide — protocols, auth, errors, and curl examples
- Codex — CLI config with
openai_base_url - OpenCode — provider
baseURLfor OpenAI-compatible mode