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"), 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 smart routing with automatic 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.
Smart routing failover
EWMA-based latency routing with automatic failover when upstream providers degrade and a healthy alternate route is available. Request traces show the route used.
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.
# 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 ChatGPT Plus is required. Router One supports pay-per-token wallet billing and live subscription plans. Usage outside plan coverage is metered by what Codex actually consumes per request.
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). All existing Codex CLI flags and behaviors remain unchanged.
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. Request traces show token counts and cost in real time.
Choose the next step for your Codex workflow
This page owns Codex CLI setup in China. The paths below separate shared coding-tool controls, Responses API compatibility, billing, and Claude Code setup.
Start using Codex CLI in China
Get your API key