OpenAI’s Codex CLI uses the standard OpenAI client env vars. SetDocumentation Index
Fetch the complete documentation index at: https://docs.routing.run/llms.txt
Use this file to discover all available pages before exploring further.
OPENAI_BASE_URL to routing.run and pass --model route/… so each run targets a model your key can access.
Official references:
Setup
Get your API key
Create an API key at app.routing.run. Copy the key — it starts with
rk_.Set environment variables
Copy the Connection prompt below and apply the
export lines before running codex.Connection prompt
Codex CLI uses OpenAI-compatible env vars (OPENAI_API_KEY, OPENAI_BASE_URL). Use Copy on the block below when you want a complete, step-by-step setup checklist.
Codex CLI — connect to routing.run
Manual configuration
If you want to set Codex CLI up manually instead of using the prompt above, use these exact values:routing.run so you can switch providers quickly.
Codex also supports explicit provider definitions in ~/.codex/config.toml. This is the most reliable long-term setup for routing.run:
Usage
Prefer the TOML provider config over ad hoc shell exports if you use Codex regularly across multiple repos.
Recommended models
Published model IDs are listed on the models page. Exact access depends on your plan tier and the dashboard; common picks:| Model | Use case |
|---|---|
route/glm-5.1-precision | Strongest reasoning-first choice |
route/qwen3.6-plus | Best default starting point |
route/minimax-m2.7-highspeed | Long-context sessions |
route/kimi-k2.5 | Agentic and tool-heavy flows |
route/glm-5.1 | Faster GLM alternative |
route/qwen3.5-plus | Qwen3.5 flagship |