How to Access Claude & GPT API in China (2026 Guide)
Developers in mainland China face a real problem: Anthropic and OpenAI don't officially serve the region, direct connections are blocked, and payment requires overseas cards. This guide shows how an API relay solves all three.
Why direct access fails
The official endpoints (api.anthropic.com, api.openai.com) are unreachable on Chinese networks. Even with a VPN, you face account risk-control, card rejections, and unstable latency.
The relay approach
An API relay sits overseas, connects directly to the official providers, and exposes an OpenAI-compatible interface. You just swap the Base URL and API key — no VPN, no foreign card needed.
Quick setup
Cursor
Settings → Models → enable "Override OpenAI Base URL", paste the relay URL and key, set model to claude-opus-4-8.
Claude Code
export ANTHROPIC_BASE_URL="https://your-relay-url"
export ANTHROPIC_API_KEY="your-key"
claude
What to look for in a relay
| Factor | Why it matters |
|---|---|
| Direct upstream | Avoids quality degradation from reverse-engineered routes |
| Model coverage | Latest Opus 4.8, GPT-5.5, Gemini 3 Pro |
| Protocol support | Both OpenAI & native Anthropic format |
Looking for a stable, direct-upstream relay that supports Claude, GPT and Gemini with one key? Give ours a try.
官方直连 · 一个接口接入 Claude / GPT / Gemini · 7×24 稳定
免费注册试用 →