Skip to main content
You need an LLM Gateway key.

Setup

  1. Add the gateway as a provider in ~/.codex/config.toml:
    ~/.codex/config.toml
  2. Set the key in your shell profile:
  3. Open a new terminal and run codex.
Codex reads providers only from ~/.codex/config.toml. A project’s .codex/config.toml can’t set them.

Choose models

Set model to an OpenAI model, or an alias that sends to one. You can also start Codex with codex -m <model>. The /model picker shows Codex’s built-in list, not your gateway’s models.

Check it works

Send a prompt. In LLM Gateway → Keys, the key’s Last Used updates.