Codex CLI
Codex connects to indoRouter through /v1/responses. Use the ID of any chat model in the catalog.
Before you start
Section titled “Before you start”Create an API key on the API Key page before you start.
Configuration
Section titled “Configuration”Store the key:
export INDOROUTER_API_KEY="ir_..."Add this to ~/.codex/config.toml. The first two lines go above any [table] in the file:
model_provider = "indorouter"model = "openai/gpt-4o-mini"
[model_providers.indorouter]name = "indoRouter"base_url = "https://api.indorouter.ai/v1"env_key = "INDOROUTER_API_KEY"wire_api = "responses"Switch models with /model, or start Codex on another model with codex -m <id>. Model IDs are on the Models page.
Check the connection
Section titled “Check the connection”Run codex and ask it something short. The request appears on the console’s Requests page.
Troubleshooting
Section titled “Troubleshooting”- 404:
base_urlhas to end in/v1. model_not_found: the model ID needs its vendor, as inopenai/gpt-4o-mini.responses_untranslatable: for models outside OpenAI, indoRouter translates Responses requests into the vendor’s format, and a few Responses features have no equivalent there. The error message names what couldn’t be translated. See Responses.