config.toml or environment variables.
Prerequisites
- Codex CLI installed (
npm install -g @openai/codexor via installer) - A ClearMaas API key starting with
sk-
Quick setup via environment variables
The fastest way to get started:OPENAI_API_BASE instead of OPENAI_BASE_URL �?set whichever your version expects.)
Setup via config.toml
For persistent configuration, create~/.config/codex/config.toml:
Adding a second provider (Anthropic)
You can define multiple providers and switch between them:-c CLI flag:
Choosing a model
Set the default model inconfig.toml:
| Prefix | Example model ID |
|---|---|
openai/ | openai/gpt-4o-mini |
anthropic/ | anthropic/claude-sonnet-4.6 |
google/ | google/gemini-2.5-pro |
deepseek/ | deepseek/deepseek-chat |
grok/ | grok/grok-4-fast-reasoning |
qwen/ | qwen/qwen3.6-plus |
kimi/ | kimi/kimi-k2.6 |