Guide
Use an Uncensored Model in Claude Code
Uncensored model for Claude Code: point Claude Code at an abliterated Kimi or DeepSeek model with four environment variables, for security work it refuses.
Set ANTHROPIC_BASE_URL to https://abliterator.ai, put your Abliterator key in ANTHROPIC_AUTH_TOKEN, set ANTHROPIC_MODEL to kimi-k3.1-pro-abliterated and ANTHROPIC_DEFAULT_HAIKU_MODEL to deepseek-v4.1-flash-abliterated, then start claude. Claude Code then runs on an abliterated model that refuses far less, including on authorized security work.
Why run Claude Code on an abliterated model
Claude Code is a strong agent harness: it reads your repository, runs commands, edits files and loops until the task is done. The model behind it decides what it will do. Anthropic's newer models run safety classifiers, and Anthropic's refusals documentation says of the cyber category that "benign cybersecurity work can also trigger this category."
That can block work security teams do every day:
- Writing and testing detections for a newly disclosed CVE in a lab.
- Building a proof-of-concept for a vulnerability you are authorized to test, so the developers can reproduce and fix it.
- Triage of a malware sample from your own incident: unpacking, deobfuscation, IOC extraction.
- Fuzzing harnesses and crash triage for your own code.
- Red-team tooling for an engagement with a signed scope.
Abliterator serves two abliterated models through the Anthropic Messages API, so Claude Code talks to them the same way it talks to an LLM gateway. You keep the harness and swap the model. See cybersecurity for more workflows.
What you need
- Claude Code installed.
- An Abliterator key from /keys. New accounts get $1 of free credit.
Configure the environment
Claude Code reads its endpoint and model from environment variables. The names below come from Claude Code's environment variable reference and its LLM gateway guide.
export ABL_API_KEY="sk-abl-v1-..." # your key from /keys
export ANTHROPIC_BASE_URL="https://abliterator.ai"
export ANTHROPIC_AUTH_TOKEN="$ABL_API_KEY"
export ANTHROPIC_MODEL="kimi-k3.1-pro-abliterated"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash-abliterated"
claude
What each one does:
| Variable | Value | Purpose, per Claude Code's docs |
|---|---|---|
ANTHROPIC_BASE_URL |
https://abliterator.ai |
"Override the API endpoint to route requests through a proxy or gateway." Claude Code appends /v1/messages |
ANTHROPIC_AUTH_TOKEN |
your Abliterator key | Sent as Authorization: Bearer <key> |
ANTHROPIC_API_KEY |
alternative to the above | Sent as x-api-key; asks for a one-time approval in interactive mode |
ANTHROPIC_MODEL |
kimi-k3.1-pro-abliterated |
The main model for the session |
ANTHROPIC_DEFAULT_HAIKU_MODEL |
deepseek-v4.1-flash-abliterated |
The small, fast model, "also used for background functionality" such as session titles |
ANTHROPIC_SMALL_FAST_MODEL |
deepseek-v4.1-flash-abliterated |
The older name for the same setting, now marked deprecated. Set it too if you run an old Claude Code version |
Optional: set ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL so the /model aliases resolve to Abliterator models, and CLAUDE_CODE_SUBAGENT_MODEL to choose the model for subagents. For example, CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4.1-flash-abliterated makes read-heavy subagents cheaper.
Check the connection
Before opening Claude Code, send one request to the same endpoint:
curl -sS https://abliterator.ai/v1/messages \
-H "Authorization: Bearer $ABL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model": "kimi-k3.1-pro-abliterated", "max_tokens": 64, "messages": [{"role": "user", "content": "Reply with OK."}]}'
A JSON reply with a content array means the key and URL work. A 401 means the key is wrong. A 402 means the account is out of credit.
Then start claude from the same shell and run /status. The Status tab should show an Anthropic base URL line with the Abliterator address and an Auth token line naming ANTHROPIC_AUTH_TOKEN. If it shows a claude.ai login instead, the variables did not reach the session.
Keep it separate from your normal Claude Code
If you want Abliterator only for some work, a shell function keeps the two setups apart:
# Add to ~/.zshrc or ~/.bashrc, then run: claude-abl
claude-abl() {
ANTHROPIC_BASE_URL="https://abliterator.ai" \
ANTHROPIC_AUTH_TOKEN="$ABL_API_KEY" \
ANTHROPIC_MODEL="kimi-k3.1-pro-abliterated" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash-abliterated" \
claude "$@"
}
To make one project always use Abliterator, put the variables in that project's .claude/settings.local.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://abliterator.ai",
"ANTHROPIC_AUTH_TOKEN": "sk-abl-v1-...",
"ANTHROPIC_MODEL": "kimi-k3.1-pro-abliterated",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4.1-flash-abliterated"
}
}
Claude Code's docs warn not to put a credential in .claude/settings.json, which is committed and shared with everyone who clones the repository. Check that settings.local.json is in your gitignore before you save a key there.
Which model to use
| Job | Model | Price per 1M tokens (input / cached / output) |
|---|---|---|
| Main agent: multi-step investigation, exploit reproduction, code changes | kimi-k3.1-pro-abliterated |
$4.00 / $0.40 / $15.00 |
| Background tasks, subagents that read a lot, quick edits | deepseek-v4.1-flash-abliterated |
$1.00 / $0.10 / $2.00 |
Both have a 1,048,576-token context and take images. Agent sessions resend a lot of context, and Abliterator caches repeated prompt prefixes automatically at the cached price with no write surcharge, so long sessions cost less than the input price suggests. Kimi vs DeepSeek abliterated works through costs for typical jobs.
How much do they refuse? We measured DeepSeek V4.1 Flash Abliterated against the original: 1% of JailbreakBench harmful prompts refused against 94%, with reasoning, math and vision scores within noise and MMLU-Pro down 0.8 points. For Kimi K3.1 Pro Abliterated, the figure was 3% against 94%, with GPQA Diamond at 92.8 against 93.1. One Kimi result matters for Claude Code: Terminal-Bench 4.0, an agentic coding benchmark, fell from 68.8 to 56.3, a drop that is plausible but not statistically shown. Test Kimi on your own coding tasks before you switch. See benchmarks.
What changes when Claude Code runs on Abliterator
- Anthropic does not support it. Claude Code's gateway page says Anthropic "doesn't support routing Claude Code to non-Claude models through any gateway." The core loop works because Abliterator implements the Messages API, but report problems to Abliterator, not Anthropic.
- Your subscription is not used. Requests carry the Abliterator key instead of your claude.ai login, so subscription limits do not apply and Abliterator bills per token.
- Some features are off. Remote Control is disabled while
ANTHROPIC_BASE_URLpoints at a non-Anthropic host. Features tied to Claude models, such as fast mode, do not apply. - Unknown-field errors. If a request fails with a
400naming an unrecognized field, Claude Code's troubleshooting table suggestsCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. - Background traffic. Claude Code still sends telemetry and update checks to Anthropic.
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1turns that off.
The full setup reference, including VS Code and troubleshooting, is in the Claude Code guide.
Stay inside your authorization
An agent that will run any command is powerful, so scope it. Run it in a lab VM or container, give it only the credentials the engagement needs, and keep Claude Code's permission prompts on for commands that touch the network. Abliterator removes the model's refusals; it does not remove the law or our terms. Attacks on systems without authorization and malware deployed against third parties are prohibited under the acceptable use policy, and keys that violate it are suspended.
Frequently asked questions
Which variable sets the small, fast model in Claude Code?
ANTHROPIC_DEFAULT_HAIKU_MODEL. Claude Code's docs say it is also used for background functionality. The older ANTHROPIC_SMALL_FAST_MODEL is marked deprecated but still appears in older setups.
Should I use ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY?
Either works with Abliterator, because Abliterator accepts both Authorization: Bearer and x-api-key. ANTHROPIC_AUTH_TOKEN takes effect immediately; ANTHROPIC_API_KEY asks for a one-time approval in interactive mode.
Does this use my Claude subscription?
No. While a gateway credential is set, Claude Code sends it instead of your claude.ai login, and the requests are billed per token to your Abliterator balance or plan credit.
Is running Claude Code on a non-Claude model supported by Anthropic?
No. Anthropic's docs say it doesn't support routing Claude Code to non-Claude models through any gateway. It works because Abliterator implements the Anthropic Messages API, but Anthropic support will not troubleshoot it.
Can I switch back to Claude without editing files?
Yes. Put the Abliterator variables in a shell function or alias, as shown above, and run plain claude for your normal setup.