# Claude Code in China — Anthropic-compatible, no VPN

> Markdown mirror of https://router.one/claude-code-china for AI assistants and crawlers. Router One is an OpenAI-compatible LLM API gateway.
> Last updated: 2026-08-26

Router One runs Claude Code from Mainland China without a VPN: point ANTHROPIC_BASE_URL at the Anthropic-compatible endpoint https://api.router.one, use a Router One key, and pay per token from a wallet topped up by card or Alipay (or USDT/USDC on six chains) — no foreign credit card, and a cost trace on every request. Reaching Anthropic's own API from the mainland is slow and unreliable and bills to a foreign card; the gateway removes both blockers.

## Direct access, no VPN

Claude Code uses the Anthropic-compatible endpoint at https://api.router.one. Review the published benchmark below before relying on any point-in-time network result.

## Pay in RMB

Top up with a card or Alipay through one hosted checkout, or with USDT/USDC on six chains. No foreign credit card required.

## Paid-usage headroom

No low fixed cap for normal paid usage. Abuse prevention, per-account protection limits, and upstream constraints may still apply; if a request returns 429, check Dashboard -> Logs or contact support to raise limits.

## Review the China latency benchmark

This setup guide does not make a separate latency promise. The published snapshot, last updated 2026-05-15, covers Beijing, Shanghai, and Shenzhen on China Telecom, China Unicom, and China Mobile in a rolling 7-day window. It is not an SLA, and individual networks may vary; review the full method and caveats before judging fit for your workload.

## 2-minute setup

If you have Claude Code installed, export two variables and relaunch. Persistent setup: add these lines to ~/.zshrc or ~/.bashrc. ANTHROPIC_API_KEY is not required — leave it unset.

### Create a Router One API key

Sign up at router.one and create an API key in the dashboard. Top up with a card or Alipay on the hosted checkout, or with USDT/USDC — no foreign credit card required.

### Point Claude Code at Router One

Export ANTHROPIC_BASE_URL=https://api.router.one and ANTHROPIC_AUTH_TOKEN set to your Router One key. ANTHROPIC_API_KEY is not required; unset it if you exported it earlier. Add the lines to ~/.zshrc or ~/.bashrc to persist them.

### Relaunch Claude Code

Restart Claude Code. Requests now route through Router One's China-reachable, Anthropic-compatible endpoint with no VPN.

`terminal`

```bash
# Point Claude Code at Router One
export ANTHROPIC_BASE_URL=https://api.router.one
export ANTHROPIC_AUTH_TOKEN=sk-your-router-one-key
unset ANTHROPIC_API_KEY
```

## FAQ

### Do I need a VPN?

No proxy or VPN is required for the Router One endpoint. The benchmark below documents the dated network snapshot and its caveats.

### How does billing work?

Use prepaid wallet balance or a live subscription plan. Top up with a card or Alipay in one hosted checkout, or with USDT/USDC on six chains — usage outside plan coverage is still metered per token.

### Is my data stored?

No. Router One proxies requests in real time; prompts and completions are not persisted. We log only metadata (model, tokens, latency, cost) for billing and observability.

### What if the upstream Anthropic API goes down?

Claude Code traffic routes through Router One's infrastructure with automatic failover. When upstream issues occur, requests are retried or redirected transparently.

### Can I run DeepSeek V4 inside Claude Code?

Yes. Keep the same ANTHROPIC_BASE_URL and set the model ID to deepseek-v4-pro or deepseek-v4-flash (the /model command switches mid-session). Router One serves DeepSeek V4 over the same Anthropic-compatible endpoint as the Claude family, so the request lands in the same traces and wallet. Context window and live rates: /models/deepseek-v4-pro.

## See also

- Run all coding tools through one gateway: https://router.one/use-cases/ai-coding-tools
- Fix a Claude Code 403: https://router.one/claude-code-403
- Cut the per-token price of Claude calls: https://router.one/cheap-claude-api
- A Claude Max alternative on a flat monthly plan: https://router.one/claude-max-alternative
- One-click Claude Code setup: https://router.one/docs/guides/cli-setup
- Confirm the Messages API request: https://router.one/docs/chat/createMessage
- Fund the same wallet with Alipay: https://router.one/alipay-llm-api
- Set up OpenAI Codex CLI instead: https://router.one/codex-china
- Claude Code vs Codex CLI, honestly compared: https://router.one/blog/claude-code-vs-codex-cli
- Canonical page: https://router.one/claude-code-china
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
