Codex without a ChatGPT subscription: pointing it at another API
Codex takes its provider from a config file, so you can point it anywhere compatible. Here is the exact config and what each field does.
2 min · 7 September 2026 · codex · subscriptions · setup
Codex is OpenAI's console agent, and by default it calls their API. But the provider comes from a config file, which means any compatible address can take OpenAI's place. For anyone who cannot pay for the subscription, this is the only working route.
The config
Codex reads ~/.codex/config.toml:
model = "gpt-5.6-terra"
model_provider = "zukko"
model_reasoning_effort = "high"
[model_providers.zukko]
name = "zukko"
base_url = "https://api.zukko.pro/v1"
wire_api = "responses"
requires_openai_auth = trueThe key lives separately, in ~/.codex/auth.json:
{ "OPENAI_API_KEY": "fetch_your_key" }The non-obvious fields:
wire_api = "responses" — Codex speaks the Responses API rather than classic chat/completions. Your provider must support it; any other value sends requests to the wrong place.
base_url with the /v1 suffix — mandatory for OpenAI-compatible mode. Omitting it produces a 404 on every call.
model_reasoning_effort controls how much the model thinks before answering. Higher means better and more expensive. On simple tasks high earns little.
Automatic setup
If you would rather not edit config files by hand, there are ready scripts:
curl -fsSL https://zukko.pro/downloads/codex-setup-macos.sh | bashFor Windows:
powershell -ExecutionPolicy Bypass -Command "irm https://zukko.pro/downloads/codex-setup-windows.ps1 | iex"The script creates both files and asks for your key. If you dislike running scripts from the internet, that is sound caution — set it up by hand from the config above, it is only two files.
Choosing a model
The model field takes any model from the provider's catalogue. Codex is an agent: it makes many calls in sequence and keeps loading context, so input token price matters most.
Rough guide in the Zukko catalogue: gpt-5.6-sol is the flagship, gpt-5.6-terra the balanced option, gpt-5.6-luna the fast and cheapest one. Nothing stops you putting an Anthropic model in Codex either: the API is compatible, and claude-opus-5 works the same way.
Errors
404 on every request. A missing /v1 in base_url, or the wrong wire_api.
401 unauthorized. The key was not picked up: check it sits in ~/.codex/auth.json and the field is named OPENAI_API_KEY — Codex looks for that name regardless of provider.
402. An empty balance.
Model not found. Compare the name against the catalogue: curl https://api.zukko.pro/v1/models -H "Authorization: Bearer fetch_your_key".
What it costs
You pay for the tokens you used, with no monthly fee. Zukko accepts card, bank transfer and crypto, and prices sit well below list: Opus 5 costs $0.30 per million tokens against Anthropic's $5 input and $25 output.
To learn what your own Codex will consume, use the starting balance: @zukkopro_bot credits $1 on first sign-in.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.