OPENAI_BASE_URL to routing.run and pass --model route/… so each run targets a model your key can access.
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.
Example run:
Usage
Recommended models
Plan tier and access are authoritative on GEThttps://api.routing.run/v1/models with your rk_ key. The full list is on the models page; common picks:
| Model | Use case |
|---|---|
route/deepseek-v3.2 | General-purpose chat (matches most doc examples) |
route/glm-5.1 | Reasoning and coding |
route/minimax-m2.7 | Long-context sessions |
route/kimi-k2.5 | Agentic and tool-heavy flows |
route/qwen3.6-plus-preview | Qwen3.6-class preview |
route/qwen3.5-plus | Qwen3.5 flagship |