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-7
# Dotted form also works — bankr llm claude auto-translates it
bankr llm claude --model claude-opus-4.7
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-7claude-sonnet-4-6claude-haiku-4-5
If you pass the gateway-canonical dotted form (e.g. claude-opus-4.7), 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-7[1m].
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-7"
}
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.