Claude Code

Point Claude Code at Depaza to use EU-hosted models and switch between them mid-session with /model — no restart needed.

Depaza API key
Model

Your key stays in this browser (local storage) and is sent only to depaza.eu. Test connection sends one real, billed or metered chat request. Don’t do this on a shared machine.

Setup

The recommended way is the one-line installer. It writes ~/.claude/settings.json (merging with whatever is already there) and never overwrites unrelated keys.

shell
curl -fsSL https://depaza.eu/install-claude.sh | sh -s -- {{KEY}}
claude

Trying it out in a single terminal without installing anything? Set these environment variables before starting Claude Code:

shell
export ANTHROPIC_BASE_URL={{ANTHROPIC_URL}}
export ANTHROPIC_AUTH_TOKEN={{KEY}}
export ANTHROPIC_MODEL={{MODEL}}
claude
Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. Both work, but ANTHROPIC_API_KEY makes Claude Code prompt for approval of a custom key on first run, which fails outright in non-interactive use (claude -p, CI, scripts) with “Not logged in · Please run /login”. ANTHROPIC_AUTH_TOKEN skips that prompt and does not conflict with an existing claude.ai session.

Or write the same values into ~/.claude/settings.json yourself for a setup that persists across terminals:

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "{{ANTHROPIC_URL}}",
    "ANTHROPIC_AUTH_TOKEN": "{{KEY}}",
    "ANTHROPIC_MODEL": "{{MODEL}}",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "max",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "core",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "lite",
    "ANTHROPIC_SMALL_FAST_MODEL": "lite",
    "API_TIMEOUT_MS": "3000000"
  }
}
The Anthropic base URL is https://depaza.eu — there is no /v1. Claude Code appends /v1/messages itself. The OpenAI URL the other editors use is https://depaza.eu/v1.

VS Code extension

The Claude Code extension for VS Code reads its own environment block, not ~/.claude/settings.json. Open Settings → Extensions → Claude Code, or edit settings.json directly:

VS Code settings.json
{
  "claudeCode.disableLoginPrompt": true,
  "claudeCode.environmentVariables": [
    { "name": "ANTHROPIC_BASE_URL", "value": "{{ANTHROPIC_URL}}" },
    { "name": "ANTHROPIC_AUTH_TOKEN", "value": "{{KEY}}" },
    { "name": "ANTHROPIC_MODEL", "value": "{{MODEL}}" },
    { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL", "value": "max" },
    { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL", "value": "core" },
    { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL", "value": "lite" },
    { "name": "ANTHROPIC_SMALL_FAST_MODEL", "value": "lite" },
    { "name": "API_TIMEOUT_MS", "value": "3000000" },
    { "name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "value": "1" }
  ]
}

claudeCode.disableLoginPrompt is what stops the extension asking you to sign in to claude.ai. Without it the login prompt keeps appearing even though the token is set. Reload the window after saving. The same block works in the JetBrains plugin’s environment settings.

Switching models mid-session

Pass any Depaza model ID directly to /model inside Claude Code. The switch takes effect with your next message. No restart; your conversation context stays.

claude
/model core
/model max
/model advanced
/model coder

Model mapping

Anthropic tier names map to Depaza models automatically when you use the installer (or the settings.json below):

Claude tierDepaza model
claude-opus-* / claude-fable-*max
claude-sonnet-*core
claude-haiku-*lite

Switching from Anthropic to Depaza

If you previously used Claude Code with a direct Anthropic key, update both the base URL and the token — not just the URL. Run /logout inside Claude Code before setting the Depaza key so a leftover claude.ai session does not fight the custom endpoint.

Note on 1M context models

Avoid sonnet[1m] or similar extended-context variants. The [1m] suffix is Anthropic-specific and Claude Code will not connect through the proxy with it set. Use sonnet, or a Depaza id such as core.

Troubleshooting

Selected “No (not recommended)” at the API key prompt? On first start, Claude Code may ask whether to use the configured API key. If you decline, it stores that choice and never asks again, so requests will not reach Depaza. Run /logout, then start claude again and select Yes.