By the end of this page Claude Code is editing files with an uncensored build behind it. The pieces: claude-code-router from npm, one provider entry pointing at this base URL, two environment variables, and a single request that confirms the chain. Router details were read on 2026-10-19.
What you need
- Node.js 22 or later with npm; that is the CLI’s own requirement as of 2026-10-19.
- Claude Code already installed, with
claudeon the PATH. - An API key from the console. The balance is prepaid and starts at $10.
- Model ids, chosen on the models page or read from
GET https://api.unrestrictable.ai/v1/models.
Why Claude Code needs a router here
Claude Code talks in Anthropic’s request format. Every build in this catalog answers OpenAI’s; the wire_formats field in GET https://api.unrestrictable.ai/v1/catalog says so per model. Point Claude Code straight at this API and the reply is a 400 whose message says this model is served in the openai format. In the middle sits claude-code-router: it receives Claude Code’s Anthropic-format call, forwards it to the provider you configured in the OpenAI format, and converts the response on the way back. A terminal agent that reads OpenAI-compatible providers natively, OpenCode or Kilo Code, skips the router entirely.
Install the router
The claude-code-router project (musistudio, MIT) comes as a desktop app, an npm package and a Docker image. The npm CLI is used here, at version 3.1.3 when read on 2026-10-19.
node --version # 22 or newernpm install -g @musistudio/claude-code-routerccr --helpWrite the provider block
In version 3.1.3 the configuration lives in a database under ~/.claude-code-router and is edited through a browser UI. On its first start, though, it still looks for an older-style config.json in that folder and imports what it finds. Create the file before running ccr serve for the first time:
{ "APIKEY": "a-client-key-you-choose", "HOST": "127.0.0.1", "PORT": 3456, "Providers": [ { "name": "unrestrictable", "api_base_url": "https://api.unrestrictable.ai/v1/chat/completions", "api_key": "sk-unr-live-…", "models": ["glm-5.3-uncensored", "glm-5.3-flash-uncensored", "deepseek-v4-pro-uncensored"] } ]}- APIKEY
- any string you choosethe secret Claude Code presents to the router; it is not the API key
- api_base_url
- https://api.unrestrictable.ai/v1/chat/completionsthe whole Chat Completions URL; the base alone is not enough
- api_key
- sk-unr-live-…the sk-unr- key from the Unrestrictable console
- models
- ids from the models pageevery id Claude Code is allowed to request
Start the router and test the chain
ccr serve --no-opencurl -s http://127.0.0.1:3456/health# {"runtimeId":"...","status":"ok","timestamp":"..."}Before Claude Code enters the picture, send one Anthropic-format request through the router by hand. If it comes back, every link in the chain works:
curl -s http://127.0.0.1:3456/v1/messages \ -H "x-api-key: a-client-key-you-choose" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model": "glm-5.3-uncensored", "max_tokens": 64, "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'The reply arrives in Anthropic’s response shape and names the model you requested. On the console’s usage page the request appears with its token counts and its charge.
Connect Claude Code
Set two environment variables, then launch claude with one of the ids in your provider block:
export ANTHROPIC_BASE_URL="http://127.0.0.1:3456"export ANTHROPIC_API_KEY="a-client-key-you-choose"claude --model glm-5.3-uncensoredThe router can also write a Claude Code profile plus a wrapper script carrying those variables, started with ccr <profile-name>. Web fetch and web search inside Claude Code are unaffected; the only thing redirected is the model call. To try a build before any of this setup, the browser chat answers three turns a day free with no account.
Price per turn
Late in a Claude Code session each turn drags a long cached prefix behind a little fresh input and a short edit. The example turn: 80,000 cached tokens, 2,000 input and 1,500 output, priced from the catalog on 2026-11-16. Where a build publishes a cached rate, its cached tokens are billed at it.
| Model | One turn |
|---|---|
| GLM-5.3 Uncensored | $0.0082 |
| GLM-5.3 Flash Uncensored | $0.0016 |
| DeepSeek V4 Pro Uncensored | $0.02 |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| DeepSeek V4 Pro Uncensored | Uncensored | $0.97 | $1.94 |
When it fails
- A 400 about the model being served in the openai format: Claude Code bypassed the router. Make sure
ANTHROPIC_BASE_URLnames the router’s port. - The router answers
401:APIKEYin config.json does not matchANTHROPIC_API_KEY. - The API answers
401 invalid_api_key: the provider block’sapi_keyis wrong. Paste it fresh from the console. 404 model_not_found: that id is not on the models page, or not in the provider’smodelsarray.402 insufficient_balance: the balance is empty. Top up in the console; nothing was charged for the call it turned away.
Questions
Its README (read 2026-10-19) calls it a local gateway for coding agents. Claude Code posts its Anthropic-format requests to a port on your machine, and the router relays them to whichever provider and model you set up, in that provider's format. With this key, it is how an uncensored build gets inside Claude Code: these builds answer the OpenAI format, and Claude Code speaks only Anthropic's.
Through two environment variables: ANTHROPIC_BASE_URL=http://127.0.0.1:3456, and ANTHROPIC_API_KEY set to the client key you wrote into the router config. Start claude with --model and one of the ids from your provider block.
Not with Claude Code, which has no OpenAI-format setting. OpenCode and Kilo Code do: both accept an OpenAI-compatible provider as-is and run these same ids with nothing in between.
Yes. The repository includes a Compose file that exposes the management UI and the gateway on a single port (its Docker guide, read 2026-10-19). Provider and client key are configured the same way; Claude Code then points at the exposed port.
Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.