Skip to content

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 directlyClaude Code through CCR
SetupANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKENInstall CCR, add a provider, start its server
Model choiceANTHROPIC_MODEL, one model per sessionRules per request, such as a different model for subagents
FallbacksNoneOrdered fallback models and several providers
Runs locallyNothing extraA 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

  1. Open Providers and click Add Provider.
  2. Choose Other / custom API endpoint.
  3. Fill in the fields:
FieldWhat to enter
Nameinferray
API endpointhttps://api.inferray.com/v1
API keyYour key, inferray_...
ModelsThe ids you want from the catalogue, for example claude-sonnet-5-5, glm-5.3, kimi-k3
  1. CCR detects the protocol on its own. If you need to set it by hand, open Advanced settings and choose OpenAI Chat.
  2. 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

  1. Open Server and click Start. The gateway listens on http://127.0.0.1:3456.
  2. Open Agent Config, click Add Profile, and choose Claude Code.
  3. Pick an Inferray model as the Model, save, and launch Claude Code from the profile card.
  4. Send a message, then open Logs in CCR to confirm the request went to the inferray provider.

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