CLI integrationsClaude Code
Point ANTHROPIC_BASE_URL at the Framewharf origin and use your sk- API key. Claude Code calls /v1/messages.
curl -fsSL https://claude.ai/install.sh | bash
claude --versionSave to ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json). ANTHROPIC_BASE_URL is the origin, without /v1. Use ANTHROPIC_AUTH_TOKEN so the CLI sends the header Authorization: Bearer.
{
"model": "claude-sonnet-5-5",
"env": {
"ANTHROPIC_BASE_URL": "https://api.framewharf.com",
"ANTHROPIC_AUTH_TOKEN": "sk-your_api_key",
"ANTHROPIC_MODEL": "claude-sonnet-5-5",
"CLAUDE_CODE_SUBAGENT_MODEL": "claude-haiku-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",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}The /model picker only lists ids containing claude or anthropic. For any other model, put its exact catalog id in ANTHROPIC_MODEL. Never write a key into a .claude/settings.json that lives in a repository.
Paste the exact id from GET /v1/models. A few ids available right now:
| Model id | Details | Copy |
|---|---|---|
claude-haiku-5-5 | Claude Haiku 5 5 | |
gpt-6.1-sol | Gpt 6.1 Sol | |
gemini-4-hydrogen | Gemini 4 Hydrogen | |
kimi-k3 | Kimi K3 | |
deepseek-v4.1-flash | Deepseek V4.1 Flash | |
qwen4-max | Qwen4 Max |
Use these variables to configure a single terminal session instead of the settings file.
export ANTHROPIC_BASE_URL="https://api.framewharf.com"
export ANTHROPIC_AUTH_TOKEN="sk-your_api_key"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"To turn prompt caching off, set DISABLE_PROMPT_CACHING = 1 — needed when you call gemini-4-carbon and get a 400, because that model does not accept the explicit cache the CLI sends with every request. The switch applies to the whole session, not one model, so turn it back on when you run another model. You can also set it in settings.json instead of the shell.
export DISABLE_PROMPT_CACHING="1"curl "https://api.framewharf.com/v1/messages" \
-H "Authorization: Bearer sk-your_api_key" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 1,
"messages": [{"role": "user", "content": "."}]
}'If the CLI still opens the login screen, set the token in your shell or in ~/.claude/settings.json before running it. See also Messages or count_tokens.