Claude Code is Anthropic’s terminal-based coding agent. Pointing it at Consus Gateway routes every Anthropic request through ITAR authorized infrastructure — no other code changes, no other configuration.Documentation Index
Fetch the complete documentation index at: https://gateway.consus.io/llms.txt
Use this file to discover all available pages before exploring further.
1. Set Three Environment Variables
~/.zshrc or ~/.bashrc to persist.
2. Run Claude Code
What Each Variable Does
CONSUS_API_KEY
: Your Consus Gateway API key. Stored once and reused by the variables below — purely for ergonomics, not read by Claude Code directly.
ANTHROPIC_BASE_URL=https://api.consus.io
: Routes Claude Code’s requests to the gateway instead of api.anthropic.com. The gateway exposes the same Anthropic Messages API surface.
ANTHROPIC_AUTH_TOKEN="$CONSUS_API_KEY"
: Authenticates against the gateway. Claude Code sends this as a bearer token, which the gateway accepts as the API key. This is the credential that actually authorizes the request.
ANTHROPIC_API_KEY=""
: Must be explicitly set to an empty string. If it is unset, Claude Code falls back to its default behavior and may try to authenticate against Anthropic’s servers directly. Setting it to empty forces Claude Code to use ANTHROPIC_AUTH_TOKEN and the Consus base URL instead. It also suppresses the first-run “Detected a custom API key” approval prompt, so the flow works in CI and other non-interactive contexts with no extra configuration.
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-sonnet-4-5
: Claude Code uses a Haiku-class model for background tasks (file enumeration, summaries, classification). The gateway hardcodes Sonnet 4.5 for every request anyway, but setting this keeps Claude Code’s client-side model selection consistent with what it actually receives. Without it, Claude Code may behave oddly when it expects Haiku response sizes/latencies but receives Sonnet.
The gateway is robust to this variable being absent — it will still serve Sonnet 4.5 — so it’s recommended but not required.
What Gets Served
Every request from Claude Code — coding turns, background Haiku-class calls, tool use, the lot — is served by Claude Sonnet 4.5 with ITAR authorization. The compliance boundary is enforced at the gateway architecture level. The response headerx-consus-served-model: claude-sonnet-4-5 confirms what was served on every successful request.