Router One

OpenAI Codex CLI — Accessible from China, Pay-Per-Token

OpenAI Codex is a capable coding agent, but developers in Mainland China can still hit network and billing friction. Router One gives Codex CLI a drop-in OpenAI-compatible endpoint with China-reachable access, per-token billing, budget controls, and smart routing for automatic failover.

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 WeChat Pay, Alipay, Stripe, or USDT/USDC — 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

Point the OPENAI_BASE_URL environment variable at Router One before launching Codex CLI.

  1. 1Create a Router One API keySign up at router.one and create an API key. Top up with WeChat Pay, Alipay, Stripe, or USDT/USDC — no ChatGPT Plus or foreign credit card required.
  2. 2Point Codex CLI at Router OneExport OPENAI_BASE_URL=https://api.router.one/v1 and OPENAI_API_KEY set to your Router One key. Add the lines to your shell profile to persist them.
  3. 3Launch Codex CLIRun Codex CLI as usual. Requests route through Router One's China-reachable, OpenAI-compatible endpoint, billed per token from your wallet.
terminal
# Use Codex CLI through Router One
export OPENAI_BASE_URL=https://api.router.one/v1
export OPENAI_API_KEY=sk-your-router-one-key
Read the Codex CLI alternative guideView the China latency benchmark ->

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 — just change OPENAI_BASE_URL to https://api.router.one/v1 and use your Router One API key. 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. Set per-project and per-API-key spending limits in the dashboard with real-time token counting and alerts.

Start using Codex CLI in China

Get started free