Using the Claude API from mainland China: same protocol, only the Base URL changes
The Anthropic protocol is unchanged: POST /v1/messages with x-api-key and anthropic-version. Point the SDK at a compatible gateway and you keep your code.
- One sentence on the protocol layer: same body, same headers, one variable.
- Two common routes: SDK base_url override, or an OpenAI-compatible wrapper.
- Billing: watch input/output token split and cached-input pricing.
Read the full article (Chinese):Read the full article (Chinese)