Coding tools

Claude Code

Anthropic’s coding agent, in the terminal or in your IDE, on your Unaligned balance. Claude models or any other one.

Setup

Add an env block to ~/.claude/settings.json (create the file if needed). It applies to every project, in the terminal and in the IDE extensions:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.unaligned.pw/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "sk-unal-…",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
  }
}

Then start claude and run /status: it shows the Anthropic base URL and the auth token in use. If you were logged in with a claude.ai account, run /logout once so the key is used instead.

Never put the key in a project’s .claude/settings.json: it is committed with the code. Use ~/.claude/settings.json or .claude/settings.local.json (git-ignored).

The variables

ANTHROPIC_BASE_URL url required
https://api.unaligned.pw/anthropic, without /v1.
ANTHROPIC_AUTH_TOKEN string required
Your key, sent as Authorization: Bearer. ANTHROPIC_API_KEY works too, but asks for approval once in interactive mode.
ANTHROPIC_MODEL string
The model to start with. /model switches during a session.
ANTHROPIC_DEFAULT_HAIKU_MODEL string
The small model for background work (titles, summaries). Set it: without it, that work runs on the main model and costs more.
ANTHROPIC_DEFAULT_SONNET_MODEL string
What /model sonnet picks. Same for ANTHROPIC_DEFAULT_OPUS_MODEL and /model opus.
CLAUDE_CODE_SUBAGENT_MODEL string
The model sub-agents use, when you want them cheaper than the main one.

Other models than Claude

Any model from the list works: Claude Code’s requests are translated for it, tools included. Give its ID as ANTHROPIC_MODEL, and tell Claude Code its context window, which it can’t know for a model it doesn’t recognize (it assumes 200,000 tokens):

export ANTHROPIC_MODEL="glm-5.3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000   # the model's "context"

To add one to the /model menu without making it the default, set ANTHROPIC_CUSTOM_MODEL_OPTION to its ID.

  • Anthropic builds Claude Code for Claude models: with others it works, but some rough edges are possible (a tool used a bit differently, a summary in another style).
  • The reasoning of non-Claude models is not shown while they think; the answer streams as usual.

VS Code and JetBrains

The JetBrains plugin runs the claude command, so the settings above apply as is. The VS Code extension reads them for the agent, but checks the login before starting it: add the same variables to VS Code’s own settings.json and skip the login prompt.

{
  "claudeCode.environmentVariables": [
    { "name": "ANTHROPIC_BASE_URL", "value": "https://api.unaligned.pw/anthropic" },
    { "name": "ANTHROPIC_AUTH_TOKEN", "value": "sk-unal-…" }
  ],
  "claudeCode.disableLoginPrompt": true
}

The Claude desktop app does not read these settings.

Checking the connection

curl https://api.unaligned.pw/anthropic/v1/messages \
  -H "Authorization: Bearer $UNALIGNED_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "claude-haiku-5-5", "max_tokens": 16, "messages": [{"role": "user", "content": "Hi"}]}'
  • 401: the key is wrong or revoked.
  • 402: the balance is empty, add credit.
  • 404 unknown_model: check the ID against the list.
  • Features tied to a claude.ai account (Remote Control, voice dictation) are not available with any custom URL.