You are a tester who likes Claude Code and is tired of watching it decline a question about a host you are paid to test. This page swaps the model underneath it for a security-tuned or uncensored build on one prepaid key: a provider block aimed at this API, two shell variables, and a single curl that proves the chain before Claude Code touches it. Router details were checked on 2026-10-19.
What you need
- Node.js 22 or newer with npm; that is what the router CLI asks for (checked 2026-10-19).
- Claude Code already installed, so
clauderesolves on your PATH. - A key from the console. Credit is prepaid; a top-up starts at $10.
- The model ids you plan to run, copied from the models page or from
GET https://api.pentestllm.ai/v1/models. Security-tuned builds are tagged there; auto/security picks one for you.
Where the router fits
Claude Code talks in Anthropic’s Messages format. The builds on this catalog are listed with the OpenAI wire format (wire_formats in GET https://api.pentestllm.ai/v1/catalog). claude-code-router sits on a local port, accepts the Anthropic-shaped request from Claude Code, re-sends it as an OpenAI-format request to the provider you name, and converts the reply back. You get a provider block where the ids are pinned, and Claude Code never sees your real key. The agents page covers pointing Claude Code at this API with no router at all. A terminal agent that reads an OpenAI-compatible provider natively, such as OpenCode or Kilo Code, skips the whole question.
Install the router
claude-code-router by musistudio is MIT-licensed and comes three ways: a desktop app, an npm CLI, a Docker image. The steps below use the npm CLI at version 3.1.3, the current release 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 live configuration lives in a database under ~/.claude-code-router, edited through a browser UI. On its very first start the CLI also looks for a classic config.json in that folder and imports it, so drop this file in place before you run ccr serve for the first time:
{ "APIKEY": "a-client-key-you-choose", "HOST": "127.0.0.1", "PORT": 3456, "Providers": [ { "name": "pentestllm", "api_base_url": "https://api.pentestllm.ai/v1/chat/completions", "api_key": "sk-ptl-live-…", "models": ["glm-5.3-uncensored", "glm-5.3-flash-uncensored", "deepseek-v4-pro-uncensored"] } ]}- APIKEY
- any string you choosethe credential Claude Code presents to the router; it is not your API key
- api_base_url
- https://api.pentestllm.ai/v1/chat/completionsthe complete Chat Completions URL; the base alone is not enough
- api_key
- sk-ptl-live-…the PentestLLM key from the console
- models
- ids from the models pagethe builds Claude Code is allowed to request
First reply, without Claude Code
ccr serve --no-opencurl -s http://127.0.0.1:3456/health# {"runtimeId":"...","status":"ok","timestamp":"..."}Before you open Claude Code, push one Anthropic-format request through the router by hand. If this works, 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."}]}'You should get an Anthropic-shaped reply naming the id you sent. A few seconds later the request appears on the console’s usage page with its token counts and charge.
Hand Claude Code to the router
Set two variables in the shell, then start claude with any 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 can also write a Claude Code profile plus a wrapper script that exports the same two variables, launched with ccr <profile-name>. Nothing else about Claude Code changes: its file edits, shell commands, web fetch and search still run locally. Only the model call is redirected. A first task worth trying: open the scope document for an engagement you are on and ask the build to list every host, port range and exclusion as a checklist.
No install at all: the home page gives a few free demo turns in its prompt box, and the playground runs the same ids from a key.
Cost of one turn
Deep into a session a Claude Code turn is mostly prefix the model has already seen, plus a small new message and a short edit. The table takes 80,000 cached tokens, 2,000 fresh input tokens and 1,500 output tokens at the catalog prices on 2026-11-17. Where a build publishes a cached rate, the cached share bills at that rate.
| 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 breaks
- A 400 complaining about the wire format: Claude Code is not going through the router. Make sure
ANTHROPIC_BASE_URLnames the router’s host and port. 401from the router itself:ANTHROPIC_API_KEYin the shell does not matchAPIKEYin config.json.401 invalid_api_keyfrom this API: theapi_keyinside the provider block is wrong or revoked. Paste a fresh copy from the console.404 model_not_found: either the id is missing from the models page, or it is not in the provider’smodelsarray.402 insufficient_balance: the balance is empty. Top up in the console. A request the API refuses is never billed.
Questions
Claude Code only emits Anthropic-format requests, and the builds here are listed with the OpenAI wire format. claude-code-router is a local gateway for coding agents (per its README, read 2026-10-19): Claude Code sends to a local port, and the router forwards each request to the provider and model in your config, in that provider's format. With one provider block it runs any security-tuned or uncensored id on this key inside Claude Code.
Two shell variables. ANTHROPIC_BASE_URL=http://127.0.0.1:3456 sends requests to the local gateway, and ANTHROPIC_API_KEY carries the client string you set as APIKEY in the router config. Start claude with --model and one of the ids from the provider block.
OpenCode and Kilo Code accept an OpenAI-compatible provider directly, so the same ids run there with nothing in between. Claude Code has no setting for the OpenAI format; the agents page on this site shows the direct route for it.
Yes. The repository includes a Compose file that serves the management UI and the gateway on a single published port (Docker guide, read 2026-10-19). Configure the provider and client key the same way, then aim Claude Code at that 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.