Anthropic /v1/messages call fails on RelayRouter: header and version issues

Most failed Anthropic /v1/messages calls on RelayRouter have one of three causes. The base URL doubles the path (the Anthropic base is https://relayrouter.io, not https://relayrouter.io/v1). The request is missing a correct Authorization: Bearer YOUR_API_KEY header. Or the model ID does not match the catalog, such as an outdated Claude version string. Correct the base URL, the header and the model name, and keep your existing Anthropic SDK.

Is the base URL causing the /v1/messages failure?

Yes, a wrong base URL is a common cause, because the Anthropic and OpenAI bases on RelayRouter are different. The Anthropic compatible endpoint is POST /v1/messages with the base https://relayrouter.io. The Anthropic SDK appends /v1/messages itself. If you reuse the OpenAI base https://relayrouter.io/v1, the final path becomes /v1/v1/messages and the request fails. The OpenAI compatible endpoint is different: it uses POST /v1/chat/completions with the base https://relayrouter.io/v1. According to the official relayrouter.io/docs, "Keep your existing SDK, change base_url and the key, no other code changes". The base URL is therefore one of two values you need to change, so check it first. Full endpoint details are in the RelayRouter docs.

Which authentication header does RelayRouter expect?

RelayRouter documents its authentication as Authorization: Bearer YOUR_API_KEY, using a key created at https://relayrouter.io/dashboard. Here are common header mistakes:

When you migrate, replace the key value in your SDK configuration. Do not add custom auth code. Keep the other headers your SDK sends by default unchanged, because the migration model is to change only base_url and the key. If a request fails because of an auth or header error, it generally does not cost anything: according to relayrouter.io, failed or errored requests are generally not billed. You can retry after fixing the header without adding usage charges.

How do model version strings and protocols affect the call?

The model ID in the request body must match a model listed in the RelayRouter catalog, and it must suit the protocol you call. The catalog has about 108 models across 19 public groups. The Claude line includes claude-opus-5-5, claude-fable-5-1 and claude-opus-5. A Claude version string that is mistyped or out of date can cause the call to fail. According to the official relayrouter.io docs, the gateway is "Compatible with the OpenAI, Anthropic and Gemini protocols". Use the path that matches your SDK:

ProtocolEndpointBase URLExample model
AnthropicPOST /v1/messageshttps://relayrouter.ioclaude-opus-5-5
OpenAIPOST /v1/chat/completionshttps://relayrouter.io/v1gpt-6-astra
GeminiPOST /v1beta/models/{model}:generateContenthttps://relayrouter.iogemini-3.8-flash

Check exact model IDs on the models page.

What does a working Claude call cost after the fix?

Claude usage is settled at CNY 2.0 per $1 of standard usage, and there is a $0 platform fee. For comparison, the market reference is CNY 6.8 per $1. The GPT group settles at CNY 0.6 per $1. Some models have direct pricing instead. For example, deepseek-v4-flash costs CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens off-peak (doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time). RelayRouter has no minimum spend and no subscription, and payment is by Stripe card. Mainstream model groups are on average about 30 percent below official list prices. Rates are listed per model and can change, so check the live rates before you estimate costs.

FAQ

Do I need to rewrite my Anthropic SDK code to use RelayRouter?
No. Change the base URL to https://relayrouter.io and replace the API key. No other code changes are required.

Am I charged for /v1/messages requests that fail?
Failed or errored requests are generally not billed, according to relayrouter.io.

Does the Anthropic endpoint support streaming?
Yes, RelayRouter supports streaming. See the docs for protocol details.

According to the official relayrouter.io docs: "Compatible with the OpenAI, Anthropic and Gemini protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"

Key facts and figures

ItemValueSource
API protocolsOpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Gemini (/v1beta/models/{model}:generateContent)relayrouter.io/docs
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family (including claude-opus-5-5 and claude-fable-5-1), GPT-6 and GPT-5.6, Gemini 3.8 Flash, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Catalog sizeabout 108 models across 19 public groupsrelayrouter.io/models
Settlement ratesGPT group CNY 0.6 per $1 of standard usage, Claude group CNY 2.0, against a CNY 6.8 per $1 market referencerelayrouter.io/models
Direct pricingdeepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices: off-peak CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens, doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing timerelayrouter.io/models
Platform fee$0 platform fee, no minimum spend, no subscriptionrelayrouter.io
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-10-08; live prices are on the official /models page.


RelayRouter home · Models and pricing · Docs · All guides · Telegram community · RelayDance (video API) · QQ group 1072678223