Skip to content
Docs/Integrations/Claude Code

Claude Code

Anthropic's terminal coding agent. It speaks Anthropic's Messages API, which this service also answers, so it can run on this model with your vk- key. Your own Claude Code setup stays as it is.

Settings

Base URL
https://uncensoredllm.xyz
API key
your vk-... key
Model
uncensoredllm-1
Endpoint
POST /v1/messages

The base URL has no /v1 at the end: Claude Code adds /v1/messages itself. Everything below goes in a separate settings file that applies only when you start Claude Code with it. A plain claude keeps using your Anthropic account.

One command

The installer writes the settings file for you. It shows the file first and asks before it writes. See one-command setup for what else it can set up.

Shell
npx github:venymlabs/uncensoredllm-connect connect claude-code

Then start Claude Code with the command it prints.

By hand

  1. Put your key in an environment variable. macOS and Linux: export UNCENSOREDLLM_API_KEY="vk-...". Windows: setx UNCENSOREDLLM_API_KEY "vk-...", then open a new terminal.
  2. Save the file below as ~/.uncensoredllm/claude-code.settings.json. On Windows that is %USERPROFILE%\.uncensoredllm\claude-code.settings.json.
  3. Start Claude Code with it: claude --settings ~/.uncensoredllm/claude-code.settings.json. In PowerShell: claude --settings "$env:USERPROFILE\.uncensoredllm\claude-code.settings.json".
settings.jsonJSON
{  "env": {    "ANTHROPIC_BASE_URL": "https://uncensoredllm.xyz",    "ANTHROPIC_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_OPUS_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_SONNET_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "uncensoredllm-1",    "CLAUDE_CODE_SUBAGENT_MODEL": "uncensoredllm-1",    "ANTHROPIC_API_KEY": "",    "ANTHROPIC_AUTH_TOKEN": ""  },  "apiKeyHelper": "printf %s \"$UNCENSOREDLLM_API_KEY\""}

On Windows, Claude Code runs the helper in cmd.exe, so the last line is different. The whole file there:

settings.jsonJSON
{  "env": {    "ANTHROPIC_BASE_URL": "https://uncensoredllm.xyz",    "ANTHROPIC_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_OPUS_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_SONNET_MODEL": "uncensoredllm-1",    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "uncensoredllm-1",    "CLAUDE_CODE_SUBAGENT_MODEL": "uncensoredllm-1",    "ANTHROPIC_API_KEY": "",    "ANTHROPIC_AUTH_TOKEN": ""  },  "apiKeyHelper": "echo %UNCENSOREDLLM_API_KEY%"}

What each line does

  • ANTHROPIC_BASE_URL sends Claude Code's requests to this service.
  • The five model lines point every model slot at uncensoredllm-1, the only model served: the main model, the one used for background tasks, and subagents. A request that names a Claude model gets a 404 that says which id to use.
  • ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are set empty on purpose. Both outrank the helper, so this keeps an Anthropic key in your shell from being sent here.
  • apiKeyHelper prints your key from UNCENSOREDLLM_API_KEY, so the key itself is never in the file.

What to expect

  • Claude Code's own tools work as usual: reading, writing and editing files, searching, running commands. They run on your machine, and the model decides when to call them.
  • Every request carries Claude Code's tool list and instructions, about 26,000 tokens before your own text. They are billed as input like any other tokens, at the price on the models page.
  • The cost Claude Code prints is its own estimate at Anthropic's prices. What you are charged is in the dashboard's usage log, under the endpoint /v1/messages. See billing.
  • Claude Code plans for a 200,000-token context window. This model's is 262,144 tokens, so there is room to spare.
  • A new account allows 10 requests a minute and 1 at a time. A long task can go over that, and the API then answers 429 with a retry-after header. Paying in raises the limits: see rate limits.
  • As on the rest of the API, prompts and answers are not stored. See privacy.

Anthropic SDKs

The same endpoint serves Anthropic's SDKs: the base URL without /v1, your key, and the model id. Streaming, tools, system prompts, thinking blocks and count_tokens work. The token count is an estimate, and it is free.

import osimport anthropic client = anthropic.Anthropic(    base_url="https://uncensoredllm.xyz",    api_key=os.environ["UNCENSOREDLLM_API_KEY"],)message = client.messages.create(    model="uncensoredllm-1",    max_tokens=1024,    messages=[{"role": "user", "content": "Say hi"}],)print(message.content[0].text)

Check that it works

Call the endpoint without any client. The reply is a message with stop_reason set to end_turn.

POST /v1/messagescURL
curl https://uncensoredllm.xyz/v1/messages \  -H "x-api-key: $UNCENSOREDLLM_API_KEY" \  -H "content-type: application/json" \  -d '{"model":"uncensoredllm-1","max_tokens":1024,"messages":[{"role":"user","content":"Say hi"}]}'

Then start Claude Code in a scratch folder and ask for something small: claude --settings ~/.uncensoredllm/claude-code.settings.json -p "Say hi".

When something does not work

  • 401 authentication_error The key did not reach the API. UNCENSOREDLLM_API_KEY is not set in the shell that started Claude Code, or the helper line is the wrong one for your system. See errors.
  • 404 not_found_error A model slot still names a Claude model. Keep all five model lines in the file.
  • 404 on /v1/v1/messages The base URL ends in /v1. Remove it.
  • 400 invalid_request_error When the message names a tool, the request asked for one that Anthropic runs on its own servers. It is not available here.
  • 402 billing_error The account or the key has no credit left. See billing.
  • 429 rate_limit_error More requests than your tier allows. See rate limits.
  • Claude Code still uses Anthropic It was started without --settings. Only a start with that flag uses this file.