- Docs
- Coding tools
- Codex CLI
Use Codex CLI with Airoutly
Add Airoutly as a model provider in Codex's config.toml. Codex talks to the Responses API, so pick a model that lists Resp on the models page.
- Base URL
https://api.airoutly.com/v1- Key variable
AIROUTLY_API_KEY- Models
- Models marked Resp on the models page
1. Install Codex CLI
npm install -g @openai/codexbrew install --cask codexcurl -fsSL https://chatgpt.com/codex/install.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"2. Add Airoutly to config.toml
Put your key in the AIROUTLY_API_KEY environment variable, then add the provider to ~/.codex/config.toml (or the folder set in CODEX_HOME):
model = "gpt-5"
model_provider = "airoutly"
[model_providers.airoutly]
name = "Airoutly"
base_url = "https://api.airoutly.com/v1"
env_key = "AIROUTLY_API_KEY"
wire_api = "responses"3. Choose a model
model in config.toml sets the default. For one run, use codex --model gpt-5-mini. The model must list Resp on the models page.
4. Check that it works
Run codex exec "say hi". The reply should arrive within a few seconds, and the request appears in the console under Usage logs.
Troubleshooting
401 or “missing API key”
Codex reads the key from the variable named in env_key. Check that AIROUTLY_API_KEY is exported in the shell that runs codex.
503: model_not_found
The model doesn’t support the Responses API on Airoutly. Choose one marked Resp on the models page.
A [profiles] section is ignored
Recent Codex versions no longer read profiles inside config.toml. Put each profile in its own ~/.codex/<name>.config.toml and run codex –profile <name>.