Uncensored model in Claude Code through claude-code-router

Put claude-code-router between Claude Code and this OpenAI-format API: a config.json, two env vars, one test request, and the per-turn price from the catalog.

Steps checked October 26, 2026 · prices as of November 16, 2026

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 claude on 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.

shell
1node --version # 22 or newer
2npm install -g @musistudio/claude-code-router
3ccr --help

Write 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:

~/.claude-code-router/config.json
1{
2 "APIKEY": "a-client-key-you-choose",
3 "HOST": "127.0.0.1",
4 "PORT": 3456,
5 "Providers": [
6 {
7 "name": "unrestrictable",
8 "api_base_url": "https://api.unrestrictable.ai/v1/chat/completions",
9 "api_key": "sk-unr-live-…",
10 "models": ["glm-5.3-uncensored", "glm-5.3-flash-uncensored", "deepseek-v4-pro-uncensored"]
11 }
12 ]
13}
APIKEY
any string you choose
the secret Claude Code presents to the router; it is not the API key
api_base_url
https://api.unrestrictable.ai/v1/chat/completions
the 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 page
every id Claude Code is allowed to request

Start the router and test the chain

shell
1ccr serve --no-open
2curl -s http://127.0.0.1:3456/health
3# {"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:

shell
1curl -s http://127.0.0.1:3456/v1/messages \
2 -H "x-api-key: a-client-key-you-choose" \
3 -H "anthropic-version: 2023-06-01" \
4 -H "content-type: application/json" \
5 -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:

shell
1export ANTHROPIC_BASE_URL="http://127.0.0.1:3456"
2export ANTHROPIC_API_KEY="a-client-key-you-choose"
3claude --model glm-5.3-uncensored

The 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.

ModelOne turn
GLM-5.3 Uncensored$0.0082
GLM-5.3 Flash Uncensored$0.0016
DeepSeek V4 Pro Uncensored$0.02
Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94

Prices per million tokens, read from the live catalog on 2026-11-16.

When it fails

  • A 400 about the model being served in the openai format: Claude Code bypassed the router. Make sure ANTHROPIC_BASE_URL names the router’s port.
  • The router answers 401: APIKEY in config.json does not match ANTHROPIC_API_KEY.
  • The API answers 401 invalid_api_key: the provider block’s api_key is wrong. Paste it fresh from the console.
  • 404 model_not_found: that id is not on the models page, or not in the provider’s models array.
  • 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.

Get a keyPrepaid from $10, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Join on Telegram