Documentation

Codex CLI

Confirm Responses support before configuring a custom provider.

Compatibility

Custom Codex providers use Responses. A GPT model in the catalog does not establish Responses support for that model and route. Confirm protocol availability for your account first; a successful Chat Completions request does not verify Codex compatibility.

Set the key

Set the environment variable in your terminal and launch Codex there. Keep real keys out of configuration files and repositories.

Code
export RELAY_API_KEY='your-api-key'

Configure the provider

Merge this into ~/.codex/config.toml, preserving other settings. Replace the model with an allowed GPT model supporting Responses.

toml
# ~/.codex/config.toml
model = "your-gpt-model-id"
model_provider = "relay"

[model_providers.relay]
name = "Relay"
base_url = "https://api.neatrouter.com/v1"
env_key = "RELAY_API_KEY"
wire_api = "responses"

Start codex, run a short task and inspect console logs. If the endpoint or model is unsupported, verify Responses capability rather than changing to an obsolete Chat Completions protocol setting.

See the official configuration reference for field definitions.

Still have a question?

Support details have not been published.

On this page