Codex is OpenAI's CLI coding agent. Define AIgateway as a custom model provider in ~/.codex/config.toml and Codex runs on any of our models — Claude, GPT, Gemini, Kimi, GLM — through one OpenAI-compatible endpoint.
Register AIgateway as a model provider in ~/.codex/config.toml (wire_api "chat" — the OpenAI Chat Completions shape the gateway serves), then point Codex at it.
Codex reads the key from the env var named above. Any model in the catalog works — swap the slug to change models.