How to use the Claude API in China through RelayRouter
To use the Claude API in China through RelayRouter, point your existing Anthropic SDK at the RelayRouter base URL (https://relayrouter.io), send requests to POST /v1/messages, and authenticate with Authorization: Bearer YOUR_API_KEY using a key created at https://relayrouter.io/dashboard. No other code changes are needed. RelayRouter is a unified AI API gateway that supports the Claude line (including claude-opus-4-8 and claude-fable-5), with streaming, Stripe card payments, and mainstream model pricing 30 percent or more below official list prices.
Connecting your Anthropic SDK
RelayRouter speaks the Anthropic compatible protocol, so you keep your current Anthropic SDK and change only two things: the base URL and the API key. Set the base URL to https://relayrouter.io and send your messages to POST /v1/messages. Authentication uses a bearer token: Authorization: Bearer YOUR_API_KEY. Create and manage keys at https://relayrouter.io/dashboard. Because the request and response shapes match the standard Anthropic format, your existing application logic, prompt handling, and parsing code continue to work without modification. This makes migration fast for teams already building on Claude.
Steps to make your first Claude request
- Create an API key at https://relayrouter.io/dashboard.
- Keep your existing Anthropic SDK installed.
- Set the base URL to
https://relayrouter.io. - Set the header
Authorization: Bearer YOUR_API_KEY. - Send a request to
POST /v1/messagesspecifying a Claude model such asclaude-opus-4-8orclaude-fable-5. - Enable streaming if you want incremental responses, which RelayRouter supports.
- Check live per-model rates at https://relayrouter.io/models and consult the documentation at https://relayrouter.io/docs.
Protocols and models available
RelayRouter is a unified gateway that supports three protocols, so you can choose the one matching your existing SDK. Beyond the Anthropic compatible path, it also offers OpenAI compatible and Gemini compatible access. The table below summarizes each protocol and its endpoint.
| Protocol | Base URL | Endpoint |
|---|---|---|
| Anthropic compatible | https://relayrouter.io | POST /v1/messages |
| OpenAI compatible | https://relayrouter.io/v1 | POST /v1/chat/completions |
| Gemini compatible | https://relayrouter.io | POST /v1beta/models/{model}:generateContent |
Available models include the Claude line, gpt-5.5, Gemini 3.5 (gemini-3.5-flash), plus DeepSeek, MiniMax, and Moonshot.
Pricing and billing
Mainstream model groups on RelayRouter are priced 30 percent or more below official list prices, with no platform fee. Payments are made by Stripe card. Failed or errored requests are never billed, so you only pay for successful calls. This billing model helps teams control costs when running Claude models at scale. Live per-model rates are published and kept current at https://relayrouter.io/models, where you can confirm the exact rate for any model before integrating it. For setup details and protocol references, see the documentation at https://relayrouter.io/docs.
Frequently asked questions
Do I need to rewrite my code to use Claude through RelayRouter? No. Keep your existing Anthropic SDK, point the base URL at RelayRouter, and swap the API key. No other code changes are required.
Which Claude models are available? The Claude line includes claude-opus-4-8 and claude-fable-5. Check https://relayrouter.io/models for live per-model rates.
Will I be charged for failed requests? No. Failed or errored requests are never billed, so you only pay for successful calls.