1. Docs
  2. Coding tools
  3. 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/codex

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):

config.toml
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"
Keep the default sandboxThis setup only changes where Codex sends requests. Leave Codex’s sandbox and approval settings at their defaults.

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>.