Skip to main content
Point Codex CLI at the Modellix LLM gateway so chat and coding requests use your Modellix API key and openai/... models over OpenAI-compatible Chat Completions.

Configure

Set your API key in the environment:
In ~/.codex/config.toml, set the base URL and model (recommended). Newer Codex builds deprecate OPENAI_BASE_URL as an environment variable—prefer openai_base_url in config:
Get a Modellix API key from the console. It is not an OpenAI platform key.

Verify

After saving the config, run Codex as usual. Traffic should hit https://llm.modellix.ai/v1 (typically Chat Completions). For protocol details, see Chat Completions and the LLM API guide.
  • OpenAI SDK — same /v1 base URL for application code
  • OpenCode — another OpenAI-compatible client config
  • Cursor — IDE OpenAI-compatible provider setup