Guide for China Users

Claude Code China Complete Guide

As of 2026-10-07, developers in China can run Claude Code by pointing ANTHROPIC_BASE_URL at QCode (for mainland China the docs recommend the asia.qcode.cc Asian node) and topping up with Alipay or WeChat Pay. claude-opus-5-5, claude-sonnet-5-5 and other models are available, and the same key also works with Codex.

Why Can't You Use Claude Code Directly in China?

Chinese developers face three barriers

Network Restrictions

api.anthropic.com cannot be reached directly from mainland China

Payment Incompatibility

Anthropic only accepts Visa/MasterCard and other international cards; Alipay, WeChat Pay, and UnionPay are not supported

Account Registration Barriers

Registering an Anthropic account requires an overseas phone number, and certain IP ranges are blocked from registration

Three Solutions Compared

From self-hosted proxies to professional subscription services — which works best for you?

Solution Stability Setup Difficulty Payment Overall Cost Recommended
VPN + Direct Access Unstable Complex Int'l Card Low ⚠️
Self-Hosted Proxy Fairly Stable Very Complex Int'l Card High ⚠️
QCode.cc Relay High Availability 5 Minutes Alipay / WeChat / Cards Low ✅

QCode.cc Setup Tutorial

5-minute setup, start using Claude Code immediately

1

Create a QCode.cc Account

Register at qcode.cc. QCode is prepaid: top up first (Alipay or WeChat Pay for CNY), then pick a plan paid from your balance. No international credit card needed.

Sign Up Now →
2

Get Your API Key

After signing in, create your API key in the dashboard (it starts with cr_). This is your credential for Claude Code and Codex.

3

Configure Environment Variables

Set two environment variables in your terminal: ANTHROPIC_BASE_URL to https://api.qcode.cc/api (no trailing slash) and your key in ANTHROPIC_AUTH_TOKEN; if a tool only reads ANTHROPIC_API_KEY, the same cr_ key works there. For mainland China, the docs recommend the asia.qcode.cc domain.

# Set the endpoint and key
export ANTHROPIC_BASE_URL=https://api.qcode.cc/api
export ANTHROPIC_AUTH_TOKEN=cr_your-qcode-key
# Launch Claude Code
claude
4

Verify the Connection

Run the following command to verify the connection works:

# Test connectivity
claude "Hello, briefly introduce yourself"
✓ Connection successful! Claude is responding

Claude Code Feature Compatibility

Local CLI features (chat, file edits, Bash, MCP, Skills, Plugins, subagents) work as usual; features that rely on Anthropic account-side hosted services, such as cloud sessions and Remote Control, are not available with a third-party API key

✅

Claude Code Agent Teams

Multi-agent work in parallel — Agent Teams runs over the same Messages API path

✅

MCP Protocol Integration

Model Context Protocol fully proxied, third-party tools connect seamlessly

✅

Claude Hooks

Automated Hooks workflows and event-triggered scripts work normally

✅

Official Agent SDK

Official Agent SDK (Python / TypeScript) on the same key — just point ANTHROPIC_BASE_URL here

✅

Codex CLI

Codex CLI uses the OpenAI Responses protocol: set base_url to https://api.qcode.cc/openai and call GPT models such as gpt-6.1-sol

✅

Streaming Responses (SSE)

Server-sent event streaming with low-latency real-time responses

Flexible Plans with Alipay Support

Choose your plan, scale anytime, no international card needed; daily limits reset at 00:00 Beijing time

Starter

¥60/mo

Daily limit $5

Great for individual developers

Most Popular

Basic

¥360/mo

Daily limit $35

Ideal for heavy use and small teams

Professional

¥820/mo

Daily limit $85

For high-frequency use and enterprise

Frequently Asked Questions

Local features are unaffected. Chat, file edits, Bash, MCP, Skills, Plugins and subagents run in the local CLI and work normally with a QCode key; features tied to Anthropic account-side hosted services, such as cloud sessions, Remote Control and voice dictation, do not work with any third-party API key. The Claude Code feature availability page on docs.qcode.cc lists each item and how it was checked.
Every QCode endpoint uses HTTPS, and how QCode collects, uses and retains data is governed by the privacy policy at qcode.cc/privacy. You can look up the model, context length and usage of each of your requests at probe.qcode.cc with your own key.
In CNY you can pay with Alipay (fee covered by QCode) or WeChat Pay; in USD with Visa / Mastercard / AMEX credit or debit cards, Apple Pay, Google Pay, or crypto across many coins and networks (0% platform fee, manual review in about a day). The Russian-language interface adds SBP and Russian bank cards (you pay in rubles, the balance is credited in USD). Card payments are credited as soon as they complete; CNY and USD balances are kept separately.
QCode has three endpoints with identical capabilities that you can switch between at any time: api.qcode.cc (global, nearest node), us.qcode.cc (Los Angeles, for North America and Europe) and asia.qcode.cc (Asian nodes in Korea, Taiwan and Hong Kong). One key works on all three. For mainland China the docs suggest asia.qcode.cc first and api.qcode.cc if it becomes unstable.
One Plan, Three Platforms

QCode also powers OpenAI Codex / GPT-5.6

Your QCode quota works across Claude Code and OpenAI Codex CLI — one shared balance, zero duplicate spend.

Start Using Claude Code Today

5-minute setup, top up with Alipay or WeChat Pay; for mainland China the docs recommend asia.qcode.cc

Try first, then decide

Not sure which tier? Start with Starter ($8.57/mo) and upgrade when you're happy — the unused value of the old plan goes back to your balance.