OpenAI Codex CLI — Accessible from China, Pay-Per-Token
Router One runs OpenAI Codex CLI from Mainland China without a VPN or ChatGPT Plus: add it as a model provider in ~/.codex/config.toml (base_url https://api.router.one/v1, wire_api = "responses", plus a top-level model = "gpt-5.6-sol" line), pay per token from a wallet topped up by card or Alipay, and see the cost of every request in the dashboard. Per-key spend caps and same-model failover come with the same endpoint.
Stable from China
Based on the China latency benchmark last updated 2026-05-15, Router One measured 110-130ms p50 across Beijing, Shanghai, and Shenzhen; individual networks may vary.
Pay-per-token, no ChatGPT Plus
Use wallet billing or live Router One subscription plans. Top up with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains — usage outside plan coverage is metered by what Codex actually consumes.
Same-model failover
Requests are served by the model you name. If a route fails (429, 5xx or timeout), the request is retried on another route for the same model, and routes with a sustained upstream-error rate are automatically moved to the back of the order until they recover. Customer Logs shows the model, request ID, usage, settled cost, recorded latency, and status without exposing internal routes.
Configure Codex CLI
Run the one-click command, or register Router One as a model provider in ~/.codex/config.toml.
- 1Create a Router One API keySign up at router.one and create an API key. Top up with a card or Alipay on the hosted checkout, or with USDT/USDC — no ChatGPT Plus or foreign credit card required.
- 2Point Codex CLI at Router OneRun the one-click command with your key — it installs Codex CLI if missing, writes ~/.codex/config.toml with the Router One provider (env_key = ROUTER_ONE_API_KEY), persists the key in your shell profile, and verifies it.
- 3Launch Codex CLIRun Codex CLI as usual. Requests route through Router One's China-reachable, OpenAI-compatible endpoint, billed per token from your wallet, or from your plan's allowance for models a plan tier lists.
# Use Codex CLI through Router One curl -fsSL https://router.one/install/codex.sh | bash -s -- sk-your-router-one-key
FAQ
Do I still need ChatGPT Plus?
No. Codex CLI runs on Router One with a Router One key, billed per token from your wallet or, on a Pro, Max or Ultra plan, from the plan's allowance first: as of the 2026-10-15 plan response, gpt-5.6-sol (the model the one-click install writes) and gpt-6.1-sol (which Codex 0.159.1 and later use when config.toml names no model) are in the Premium models tier of all three plans, together with gpt-6-sol. Calls beyond a tier's allowance, and usage outside plan coverage, bill the wallet at posted rates; /pricing shows each plan's allowances.
Will my existing Codex configuration work?
Yes — Router One is added as a standard model provider in ~/.codex/config.toml (base_url https://api.router.one/v1, wire_api "responses", key via the ROUTER_ONE_API_KEY environment variable). Codex speaks the Responses API, so pick a model whose page lists POST /v1/responses — GPT, DeepSeek V4 and Grok chat models; Claude IDs get a 400 and belong in Claude Code. Accepted and rejected Responses features are listed on the Codex Responses API page (/codex-responses-api).
Which model should config.toml name: gpt-5.6-sol, gpt-6-sol or gpt-6.1-sol?
The one-click install writes model = "gpt-5.6-sol". All three IDs are served natively on /v1/responses (gpt-6.1-sol needs Codex 0.159.1 or later, the first release whose bundled model list includes it), and as of the 2026-10-15 plan response all three are in the Premium models tier of the Pro, Max and Ultra plans: on a plan, each request Codex sends to any of them draws from that tier's shared allowance, and calls beyond it bill the wallet at posted rates. So pick by model, not by plan: compare them on /models. Codex 0.159.1 and later make gpt-6.1-sol the default of their bundled model list (per the 0.159.1 release notes and the rust-v0.160.1 bundled list, checked 2026-10-06), and per the Codex models docs that default applies only when config.toml names no model; keep a model line anyway, so a later change of Codex's default cannot move your sessions to a model in another tier — per the bundled model lists of those releases (checked 2026-10-06), from 0.153.4 to 0.159.0 the default was GPT-6 Astra, which only the Max and Ultra plans cover.
Codex shows "Meet GPT-6 Sol" at startup. Should I switch?
Per the Codex source (the upgrade entries in its bundled models.json, 0.156.1 and later; re-checked against rust-v0.162.1 on 2026-10-15), Codex may offer to move gpt-5.6-sol or gpt-5.6-terra to gpt-6-sol (not gpt-6.1-sol) with a "Meet GPT-6 Sol" prompt, and the source does not limit that prompt to the built-in OpenAI provider, so a Router One setup may see it too. Accepting switches your model to gpt-6-sol, which Router One serves. As of the 2026-10-15 plan response, gpt-6-sol and gpt-5.6-sol are in the Premium models tier of the Pro, Max and Ultra plans and gpt-5.6-terra is in the Mid-tier models tier, so on a plan a switch from gpt-5.6-sol keeps your calls on the same allowance, while a switch from gpt-5.6-terra moves them to the Premium models allowance, which is smaller on every plan. To keep your current model, choose "Use existing model" in the prompt; accepting saves gpt-6-sol as your default model. Per the same source, Codex 0.159.1 and later may also show a startup tip that recommends GPT-6.1 Sol; the tip does not change your model.
Can I still use GPT-5.5 in Codex?
As of the 2026-10-15 catalog, Router One no longer lists GPT-5.5 (openai/gpt-5.5), so if config.toml still names gpt-5.5, change its model line to a model /models lists. The question above on which model config.toml should name covers that choice.
Codex says "The '…' model is not supported when using Codex with a ChatGPT account". Is that a Router One error?
No. The message says the request went through Codex's ChatGPT sign-in, which does not support the model it names: Codex's own test suite (rust-v0.162.1, checked 2026-10-15) uses this reply as the server's answer to a ChatGPT-signed-in session whose model the test treats as retired (its example is gpt-5.5), and per OpenAI's Codex pricing page (checked 2026-10-15), GPT-5.5's retirement from Codex with ChatGPT sign-in took effect on October 14, 2026, at noon PDT (19:00 UTC), while the OpenAI API and Codex sessions authenticated with an API key aren't affected. Per Codex's authentication docs (checked 2026-10-15), a custom model provider with env_key uses the API key in that environment variable, so a Codex CLI session that uses Router One as its model provider (env_key = "ROUTER_ONE_API_KEY" and a top-level model = "gpt-5.6-sol" line, as the one-click install writes) sends its requests to https://api.router.one/v1 with your Router One key, not through the ChatGPT sign-in. Check the model's page on /models for its plan coverage before you rely on it. The Codex model-not-supported page (https://router.one/codex-model-not-supported) walks through the fix step by step.
What about latency from China?
Based on the China latency benchmark last updated 2026-05-15, Router One measured 110-130ms p50 across Beijing, Shanghai, and Shenzhen; individual networks may vary.
Can I set budget caps?
Yes. Give each project or tool a separate API key, then set that key's maxSpend cap in the dashboard. Each request's trace in Dashboard → Logs shows its token counts and cost.
Choose the next step for your Codex workflow
Next steps for Codex CLI: shared controls across coding tools, Responses API compatibility, topping up, and Claude Code setup.
More Codex CLI guides(4)
Start using Codex CLI in China
Get your API key