Codex
Use ZoneToken with Codex — both the VSCode extension and the CLI read the same configuration files under ~/.codex/.
1. Provider config
Edit the file ~/.codex/config.toml:
toml
# ZoneToken Configuration for Codex CLI
model = "gpt-5.5"
model_provider = "zonetoken"
[model_providers.zonetoken]
name = "zonetoken"
base_url = "https://api.zonetoken.net/v1"
wire_api = "responses"
[agents.subagent]
model = "gpt-5.5"2. Authentication
Edit the file ~/.codex/auth.json:
json
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "<apiKey>"
}Replace the placeholder
Set OPENAI_API_KEY to your real ZoneToken API key in place of <apiKey>.
VSCode extension vs CLI
Both surfaces share the files above:
- CLI — run
codexin your terminal; it reads~/.codex/config.tomland~/.codex/auth.jsonautomatically. - VSCode extension — install the Codex extension; it uses the same
~/.codex/configuration, so no extra setup is required once the files above are in place.
