Skip to main content

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.

Appropriate when your compliance requirement is ITAR routing of model traffic. The gateway enforces that boundary; it does not control client-side behavior — local tool execution, file access, and outbound destinations are the customer’s responsibility.
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.

1. Set Three Environment Variables

export CONSUS_API_KEY="<your-api-key>"
export ANTHROPIC_BASE_URL="https://api.consus.io"
export ANTHROPIC_AUTH_TOKEN="$CONSUS_API_KEY"
export ANTHROPIC_API_KEY="" # Important: Must be explicitly empty
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-sonnet-4-5 # Important due to ITAR constraints
Add them to ~/.zshrc or ~/.bashrc to persist.

2. Run Claude Code

claude
That’s it.

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 header x-consus-served-model: claude-sonnet-4-5 confirms what was served on every successful request.

Verifying It Works

A quick smoke test:
claude "say hi in 5 words"
Or for a real agentic check:
claude "create a file hello.py with a fibonacci function and run it"
The file should appear on disk and the run output should be real (not hallucinated).