Claude Code Router
Last updated: 15 November 2026
Claude Code Router (CCR) is a local app that sits between Claude Code and your model providers. To use Inferray with it, add a provider with the Other / custom API endpoint preset, enter https://api.inferray.com/v1 and your key, start the server, and pick an Inferray model in Claude Code's Agent Config.
Do you need a router?
Not to use Inferray. Claude Code talks to Inferray's Anthropic-compatible endpoint directly, with two environment variables and no extra software; see Claude Code. Every model in the catalogue answers there, including GPT, Gemini, GLM, Kimi and DeepSeek.
| Claude Code directly | Claude Code through CCR | |
|---|---|---|
| Setup | ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN | Install CCR, add a provider, start its server |
| Model choice | ANTHROPIC_MODEL, one model per session | Rules per request, such as a different model for subagents |
| Fallbacks | None | Ordered fallback models and several providers |
| Runs locally | Nothing extra | A local gateway on 127.0.0.1:3456 |
Use CCR when you want what it adds: routing rules, fallbacks across several providers, or one place to manage several agents.
Install
CCR ships as a desktop app (releases) and as an npm CLI, which needs Node.js 22 or newer:
npm install -g @musistudio/claude-code-router
ccr ui
ccr ui starts CCR and opens its settings at http://127.0.0.1:3458.
Add Inferray as a provider
- Open Providers and click Add Provider.
- Choose Other / custom API endpoint.
- Fill in the fields:
| Field | What to enter |
|---|---|
| Name | inferray |
| API endpoint | https://api.inferray.com/v1 |
| API key | Your key, inferray_... |
| Models | The ids you want from the catalogue, for example claude-sonnet-5-5, glm-5.3, kimi-k3 |
- CCR detects the protocol on its own. If you need to set it by hand, open Advanced settings and choose OpenAI Chat.
- Click Check Connection, and save once it passes. The check sends real requests, so select only a model or two.
Point Claude Code at it
- Open Server and click Start. The gateway listens on
http://127.0.0.1:3456. - Open Agent Config, click Add Profile, and choose Claude Code.
- Pick an Inferray model as the Model, save, and launch Claude Code from the profile card.
- Send a message, then open Logs in CCR to confirm the request went to the
inferrayprovider.
Inside Claude Code, /model lists the models CCR exposes, so you can switch between Inferray models mid-session.
FAQ
What is Claude Code Router?
An open-source local gateway for coding agents. Claude Code and other agents send their requests to CCR, and CCR forwards each one to the provider and model your rules pick.
Can Claude Code use Inferray without Claude Code Router?
Yes. Set ANTHROPIC_BASE_URL to https://api.inferray.com and ANTHROPIC_AUTH_TOKEN to your key; see Claude Code.
Which protocol should the provider use?
OpenAI Chat works for every Inferray model. Inferray also serves Anthropic Messages, but you don't need it here: CCR converts Claude Code's requests for you.
Models that work well here
- Claude Opus 5.5$4 in · $20 out per 1M tokens
- Claude Sonnet 5.5$2 in · $10 out per 1M tokens
- GPT-6.1 Sol$2 in · $10 out per 1M tokens
- Gemini 4 Argon$4 in · $20 out per 1M tokens
- Kimi K3$3 in · $15 out per 1M tokens
- GLM-5.3$0.77 in · $2.42 out per 1M tokens
- Gemini 3.8 Flash$0.75 in · $3.75 out per 1M tokens
- DeepSeek V4.1 Flash$0.15 in · $0.6 out per 1M tokens
- Run it on a Token Plan$20 a month buys $60 of usage across these models.