Brutal AI

Brutal AIModelsGuidesUse Claude Code with an uncensored model

Guide4 min read

Use Claude Code with an uncensored model

Claude Code works with any API that speaks the Anthropic Messages format. Set three environment variables and it runs on an abliterated open model: same tools, subagents, hooks and MCP servers, without stopping mid-task on security work.

Short answer: set ANTHROPIC_BASE_URL to https://xfield.cloud.brutal.ai/api, ANTHROPIC_AUTH_TOKEN to your XField key and ANTHROPIC_MODEL to an abliterated model such as deepseek-v4.1-flash-1017-uncensored. Then start claude from the same shell. Nothing else in Claude Code changes.

Why Claude Code stops on security tasks

Claude Code is an agent. It reads files, runs commands and writes code across dozens of steps. When the model behind it refuses one step, the whole run stops: the fuzzer is half written, the exploit proof of concept for your own bug is missing, the malware sample's strings are not decoded. Most of these refusals hit ordinary defensive work.

A router or a different system prompt does not fix this, because the refusal sits in the model weights. An abliterated model has the direction that leads to refusals removed, so it does the task instead. Read more in Routing doesn't remove refusals.

Setup in three variables

You need Claude Code installed and an XField API key. No key yet? Request access.

export XFIELD_API_KEY="sk-xf-v1-..."
export ANTHROPIC_BASE_URL="https://xfield.cloud.brutal.ai/api"
export ANTHROPIC_AUTH_TOKEN="$XFIELD_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4.1-flash-1017-uncensored"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-5.3-flash-uncensored"
claude
VariableWhat it does
ANTHROPIC_BASE_URLSends every request to XField. Claude Code appends /v1/messages itself, so the URL ends in /api, not /api/v1.
ANTHROPIC_AUTH_TOKENYour key, sent as a bearer token. ANTHROPIC_API_KEY also works, but Claude Code asks you to approve it once.
ANTHROPIC_MODELThe main model for the session.
ANTHROPIC_DEFAULT_HAIKU_MODELThe small model for background work such as titles and summaries. Older Claude Code versions read ANTHROPIC_SMALL_FAST_MODEL; set both if you share config across versions.

To make it permanent, including for background agents, put the same values in the env block of ~/.claude/settings.json. The full reference is in the Claude Code docs page.

Which model for which job

JobModel
Most coding-agent runs, fastest answersdeepseek-v4.1-flash-1017-uncensored
Hard security research, long reports, large diffsglm-5.3-uncensored
Long agentic runs and very long outputskimi-k3.1-pro-uncensored
Background work (titles, summaries, quick checks)glm-5.3-flash-uncensored

Every model answers on the Anthropic Messages format, so switching is one variable. See all models.

Check that it works

Before starting a long run, confirm the key and the base URL:

curl https://xfield.cloud.brutal.ai/api/v1/key \
  -H "Authorization: Bearer $XFIELD_API_KEY"

Then start claude and give it a small task from your real work, for example writing a test fixture that contains an injection string.

Common errors

  • 404 Not Found: the base URL ends in /v1. For Claude Code it must be https://xfield.cloud.brutal.ai/api. The OpenAI-style base with /v1 is only for OpenAI SDKs and tools.
  • 401 Unauthorized: the key is missing, mistyped or deleted. Check that ANTHROPIC_AUTH_TOKEN is set in the shell you start claude from, or in settings.json.
  • Claude Code still uses your subscription: the variables are not set in that shell. Values in settings.json win over shell exports.
  • Remote Control or voice dictation are gone: both need a claude.ai login and are off while Claude Code points at another API. Unset the variables to get them back.

Other coding agents

The same models work with OpenAI-compatible agents through the base URL https://xfield.cloud.brutal.ai/api/v1: see the setup pages for Codex, opencode and other tools.

What happens to your code

XField is hosted in the EU on Brutal AI's own servers. Prompts and completions are not stored and not used for training; each request leaves only a usage record with the model, token counts, timing and cost. Details: Data handling. Your own tools may still log requests, so check their settings.

Access

Access is by invitation and reviewed per company. Tell Lukas what you are building and where your current model refuses. Pricing comes with the invitation.

lukas@brutal.ai

Uncensored models don't change what is allowed: you stay responsible for use and results under our acceptable use policy.

More guides