Claude Code
Claude Code is Anthropic's official CLI for AI-assisted coding.
Quick Setup with Bankr CLI
The fastest way to get started is with the Bankr CLI:
# Print the env vars to add to your shell profile
bankr llm setup claude
Or launch Claude Code directly through the gateway — no manual config needed:
bankr llm claude
This sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN automatically and spawns Claude Code. You can pass any Claude Code flags after it:
bankr llm claude --model claude-opus-4-8
# Dotted form also works — bankr llm claude auto-translates it
bankr llm claude --model claude-opus-4.8
If you haven't logged in yet, run bankr login first. The CLI uses your stored API key.
Model Format
Claude Code's --model flag (and the model field in ~/.claude/settings.json) accepts Anthropic-style dashed IDs:
claude-opus-4-8claude-sonnet-4-6claude-haiku-4-5
If you pass the gateway-canonical dotted form (e.g. claude-opus-4.8), Claude Code silently falls back to its default — the flag appears honored but the real request is a different model, and you'll see the wrong model name in the UI banner.
bankr llm claude translates dotted → dashed automatically. If you invoke claude directly (via ANTHROPIC_BASE_URL) or edit settings.json by hand, use the dashed form explicitly.
To force the 1M-token context tier on Opus 4.6+/Sonnet 4.6, append [1m]: claude-opus-4-8[1m].
Private Inference
Route Claude Code through a hardware-secured enclave (TEE) by pointing it at an open-weight model with the :private suffix:
bankr llm claude --model glm-5.2:private
bankr llm claude forwards the model id verbatim — the dotted → dashed translation only rewrites Claude IDs and preserves any suffix — so the :private opt-in reaches the gateway unchanged. The gateway verifies the enclave's attestation on every request and fail-closes rather than downgrading. It works the same when you set "model": "glm-5.2:private" in settings.json or invoke claude directly via ANTHROPIC_BASE_URL.
Private inference covers open-weight models only (DeepSeek, GLM, Kimi, MiniMax, Gemma). Claude, GPT, and Gemini are not served confidentially, so there is no claude-*:private twin — append :private when you point Claude Code at an open-weight model. List the current set with bankr llm models --private, and see Private Inference for the full flow, response headers, and attestation verification.
Manual Configuration
Create or edit ~/.claude/settings.json:
{
"apiKeyHelper": "echo $BANKR_LLM_KEY",
"apiBaseUrl": "https://llm.bankr.bot"
}
Use https://llm.bankr.bot (without /v1) for Claude Code.
Specifying a Model
{
"apiKeyHelper": "echo $BANKR_LLM_KEY",
"apiBaseUrl": "https://llm.bankr.bot",
"model": "claude-opus-4-8"
}
Environment Variables Alternative
You can also set environment variables in your shell profile (~/.zshrc, ~/.bashrc):
export ANTHROPIC_BASE_URL="https://llm.bankr.bot"
export ANTHROPIC_AUTH_TOKEN="bk_your_api_key_here"
See Available Models for all supported models.