Do you need a router?
- For Claude models, no. Point Claude Code at another Anthropic-compatible API with two environment variables; Claude Code pricing has the setup for Zurelay.
- For DeepSeek, Kimi, GLM or MiniMax, maybe not. Those labs serve Anthropic's format themselves, so
ANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENare enough; the Anthropic-compatible URLs list has each one, and the DeepSeek key guide shows it. - For GPT, Gemini, Grok, Qwen and anything served only OpenAI-style, yes. CCR also lets you mix providers, pick models per task and fall back when one fails.
Set it up
Version 3 of CCR is managed in a local web page rather than a JSON file. These steps are from CCR 3.1.3 with Claude Code 2.1.312.
- Install it (Node.js 22 or later), with Claude Code if you don't have it yet.
npm install -g @musistudio/claude-code-router @anthropic-ai/claude-codeccr ui- Open the management page.
ccr uistarts CCR in the background and opens it athttp://127.0.0.1:3458. The gateway Claude Code talks to runs athttp://127.0.0.1:3456once a provider has a model. - Add a provider. Choose Other / custom API endpoint, give it a name, and enter its base URL and API key. For Zurelay that's
https://api.zurelay.com/v1and azr_live_key. CCR reads the provider's model list; add the models you want. - Set the protocol by hand. In the provider's Advanced settings, turn off Auto detect protocols and leave only OpenAI Chat selected. See the next section for why.
- Create a Claude Code profile under Agent Profiles: a name, the default model, and optionally a model for each of Claude Code's Opus, Sonnet and Haiku tiers. An effect scope of Only opened from CCR leaves your normal
claudeuntouched. - Launch Claude Code through it with the profile's name. Inside,
/modellists the models CCR offers.
ccr zurelay cli# or start on another model from the same providerccr zurelay cli -- --model zurelay/gpt-6.1-terraThe setting that breaks it
Our first run failed with API Error: 400 All target providers failed. CCR had detected that Zurelay also answers Anthropic's Messages API, so it passed Claude Code's requests through unchanged. Zurelay serves that API for Claude models only, so every DeepSeek and GPT request was refused. With auto detection off and only OpenAI Chat selected, CCR translated the requests and the same tasks worked. Any provider that serves Anthropic's format for some models and not others needs the same setting.
One more, on Windows: passing a quoted prompt with -p through the ccr command lost every word after the first in our test. Piping the prompt in worked: echo "your prompt" | ccr zurelay cli -- -p.
What it cost in our test
We asked Claude Code, through CCR, to write a small Python file on DeepSeek V4.1 Flash, then to edit it on GPT-6.1 Terra. Both used Claude Code's file tools correctly. Zurelay billed:
| Model | Task | Requests | Prompt tokens (cached) | Cost |
|---|---|---|---|---|
| DeepSeek V4.1 Flash | Create hello.py | 3 | 38,265 (21,760) | $0.0006 |
| GPT-6.1 Terra | Edit hello.py | 4 | 44,407 (21,632) | $0.0063 |
Every request carried 11,000 to 13,000 tokens of Claude Code's instructions and tool definitions before any of the conversation, which is why prompt caching matters: from the second or third request on, most of the prompt came back from the cache at a fraction of the input price. Caching worked through CCR without any setting.
Things to know
- Claude Code's prompts are written for Claude. Other models follow its tool instructions well on short tasks; on long, many-step ones, results vary more by model, so try a couple on your own work.
- Pick models that support tool calling. A model without it can chat but can't read or edit files.
- Keep CCR on
127.0.0.1. Its own docs warn against exposing it on0.0.0.0without a strong token, a firewall and TLS. - CCR is a third-party project, not Anthropic's. Check its docs after an update: version 3 changed the setup completely from version 2's
config.json.
Prices for the models you'd route to
Per 1M tokens, the lab's list price and Zurelay's:
| Model | Input | Output | On Zurelay (in / out) |
|---|---|---|---|
| DeepSeek V4.1 Flash | $0.30 | $1.20 | $0.03 / $0.12 |
| GPT-6.1 Terra | $1.00 | $5.00 | $0.25 / $1.25 |
| GPT-6 Astra | $10.00 | $50.00 | $2.50 / $12.50 |
| Gemini 3.8 Flash | $0.75 | $3.75 | $0.32 / $1.59 |
| Kimi K3.1 Pro | $2.00 | $10.00 | $0.80 / $4.00 |
| GLM-5.3 | $1.40 | $4.40 | $0.38 / $1.21 |
| Qwen 3.8 Max | $2.00 | $6.00 | $1.20 / $3.60 |
Tested on October 28, 2026 with Claude Code Router 3.1.3 and Claude Code 2.1.312 on Windows, against Zurelay's OpenAI-compatible API. CCR's own documentation: GitHub and provider settings.