Claude Code with an uncensored model
To run Claude Code with an uncensored model, point ANTHROPIC_BASE_URL at an API that serves abliterated models in the Anthropic Messages format.
Which model to use in Claude Code
| Model | Use it for | Model id |
|---|---|---|
| Kimi K3.1 Pro | Hard multi-file and security work | kimi-k3.1-pro-uncensored |
| DeepSeek V4.1 Flash | Everyday work, and the default here | deepseek-v4.1-flash-1017-uncensored |
| GLM-5.3 | A second opinion, text only | glm-5.3-uncensored |
| GLM-5.3 Flash | Bulk edits and many subagents | glm-5.3-flash-uncensored |
Set it up
- Install Claude Code
Shell curl -fsSL https://claude.ai/install.sh | bashPowerShell irm https://claude.ai/install.ps1 | iex - Set your API key
Create a key at Silk Compute, export it, and add the line to
~/.zshrcor~/.bashrc.Shell export SILK_API_KEY="sk-..." - Add the models
Paste this into
~/.claude/settings.json, or add these keys to the settings already there.~/.claude/settings.json { "apiKeyHelper": "echo $SILK_API_KEY", "env": { "ANTHROPIC_BASE_URL": "https://api.silkcompute.com", "ANTHROPIC_DEFAULT_MODEL": "deepseek-v4.1-flash-1017-uncensored", "ANTHROPIC_DEFAULT_FABLE_MODEL": "kimi-k3.1-pro-uncensored", "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3.1-pro-uncensored", "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4.1-flash-1017-uncensored", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4.1-flash-1017-uncensored", "CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1048576" }, "modelPicker": { "replaceBuiltInOptions": true, "options": [ { "model": "kimi-k3.1-pro-uncensored", "label": "Kimi K3.1 Pro" }, { "model": "deepseek-v4.1-flash-1017-uncensored", "label": "DeepSeek V4.1 Flash 1017" }, { "model": "deepseek-v4.1-flash-1017-fast-uncensored", "label": "DeepSeek V4.1 Flash 1017 Fast" }, { "model": "glm-5.3-uncensored", "label": "GLM-5.3" }, { "model": "glm-5.3-flash-uncensored", "label": "GLM-5.3 Flash" }, { "model": "hy4-uncensored", "label": "Hy4" } ] } } - Run it
Shell claudeSwitch models with
/modeland reasoning effort with/effort. - Check the key
A list of models means the key works, and a
401meansSILK_API_KEYis empty or wrong.Shell curl -s https://api.silkcompute.com/models -H "Authorization: Bearer $SILK_API_KEY"
What each setting does
| Setting | What it does |
|---|---|
| apiKeyHelper | Lets you "run your own command to produce the credential", so the key stays out of the file (settings reference). |
| ANTHROPIC_BASE_URL | Sends every request to https://api.silkcompute.com instead of Anthropic (environment variables). |
| ANTHROPIC_DEFAULT_MODEL | The model a new session starts on. |
| ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_FABLE_MODEL | Points the opus and fable aliases at Kimi K3.1 Pro. |
| ANTHROPIC_DEFAULT_SONNET_MODEL ANTHROPIC_DEFAULT_HAIKU_MODEL | Points sonnet and haiku at DeepSeek V4.1 Flash 1017, so subagents get a model the API serves. |
| CLAUDE_CODE_MAX_CONTEXT_TOKENS | Sets the context to 1,048,576 tokens. |
| modelPicker | Lists these models in /model. |
Limits
- Anthropic server tools such as web search are not available.
- Kimi K3.1 Pro can't take video, because the Anthropic format carries none.
- The model list also adds Hy4, which is not ranked here.
Other APIs that work with Claude Code
Three of the seven APIs for coding agents document the Anthropic Messages format Claude Code needs.
With a local model
Ollama "supports a subset of the Anthropic Messages API" (Ollama docs), and its guide points ANTHROPIC_BASE_URL at http://localhost:11434 (Claude Code on Ollama). Load one of the local abliterated models there, and expect less from it on large codebases.
Related
Silk Compute's own guide is at silkcompute.com/docs/claude-code.