At the end of this page Claude Code runs an uncensored build through claude-code-router on one API key: a provider block on this base URL, two environment variables, and one check request that proves the chain. Router facts were read on 2026-10-19.
Why a router
Claude Code sends Anthropic-format requests, and every build on this catalog answers the OpenAI format (wire_formats in GET https://api.uncensoredllm.ai/v1/catalog). Sent straight here, Claude Code gets a 400 that says the model is served in the openai format. Claude Code Router takes the Anthropic-format request from Claude Code and re-sends it in the OpenAI format to the provider you name, then translates the answer back. If you only want an uncensored build in a terminal agent, OpenCode and Kilo Code take an OpenAI-compatible provider directly and need no router.
Prerequisites
- Node.js 22 or newer and npm (the CLI’s requirement, read 2026-10-19).
- Claude Code installed;
claudeon your PATH. - A key from the console, prepaid from $10.
- The ids you want, from the models page or
GET https://api.uncensoredllm.ai/v1/models.
Install claude-code-router
claude-code-router (musistudio, MIT) ships as a desktop app, an npm CLI and a Docker image. This guide uses the npm CLI, version 3.1.3 on 2026-10-19.
node --version # 22 or newernpm install -g @musistudio/claude-code-routerccr --helpOne provider block
Version 3.1.3 keeps its configuration in a database under ~/.claude-code-router and edits it in the browser UI, but it reads an older-style config.json from that folder once on first start and imports it. Write this file before the first ccr serve:
{ "APIKEY": "a-client-key-you-choose", "HOST": "127.0.0.1", "PORT": 3456, "Providers": [ { "name": "uncensoredllm", "api_base_url": "https://api.uncensoredllm.ai/v1/chat/completions", "api_key": "sk-ullm-live-…", "models": ["glm-5.3-uncensored", "glm-5.3-flash-uncensored", "deepseek-v4-pro-uncensored"] } ]}- APIKEY
- any string you choosewhat Claude Code sends the router; not your API key
- api_base_url
- https://api.uncensoredllm.ai/v1/chat/completionsthe full Chat Completions path, not just the base
- api_key
- sk-ullm-live-…your UncensoredLLM key
- models
- ids from the models pagethe ones Claude Code may ask for
Start it and check it
ccr serve --no-opencurl -s http://127.0.0.1:3456/health# {"runtimeId":"...","status":"ok","timestamp":"..."}One Anthropic-format request through the router proves the whole chain before Claude Code is involved:
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 answer comes back in Anthropic’s shape with the model id you asked for. The request shows on the console’s usage page with its tokens and charge.
Point Claude Code at the router
Two environment variables, then run claude with an id from the 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 also generates a Claude Code profile and a wrapper script that sets the same variables; ccr <profile-name> launches it. Claude Code’s own web fetch and search tools keep working: only the model request changes where it goes.
What a turn costs
A Claude Code turn late in a session carries a long cached prefix, a little new input and a short edit: 80,000 cached, 2,000 input and 1,500 output tokens here, at the catalog prices on 2026-11-07. Cached tokens bill at the build’s cached rate where it has one.
| 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 | $1.00 | $2.00 |
Errors and fixes
- A 400 saying the model is served in the openai format: Claude Code is talking to the API directly. Check
ANTHROPIC_BASE_URLpoints at the router port. 401from the router: theAPIKEYin config.json andANTHROPIC_API_KEYdiffer.401 invalid_api_keyfrom the API: theapi_keyin the provider block is wrong. Copy it again from the console.404 model_not_found: the id is not on the models page, or not in the provider’smodelslist.402 insufficient_balance: top up in the console; a refused request is not charged.
Questions
Claude Code Router is a local gateway for coding agents (its README, read 2026-10-19): Claude Code sends its Anthropic-format requests to a local port, and the router forwards them to the provider and model you configured, in that provider's own format. On this key it is the way to run an uncensored build inside Claude Code, because these builds answer the OpenAI format and Claude Code only speaks Anthropic's.
Two environment variables point Claude Code at the local gateway: ANTHROPIC_BASE_URL=http://127.0.0.1:3456 and ANTHROPIC_API_KEY set to the client key you chose in the router. Then run claude with --model and an id from your provider block.
For a terminal agent on an uncensored build, OpenCode and Kilo Code take an OpenAI-compatible provider directly and run the same ids without a router. Claude Code itself has no OpenAI-format setting.
Yes: the repository ships a Compose file that publishes the management UI and the gateway through one port (its Docker guide, read 2026-10-19). The provider and client key are set the same way; point Claude Code at the published 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.