Before you start
You need:- Claude Code installed. See the Claude Code docs if you don’t have it yet.
- A Consus API key. Get one from your Consus admin.
Step 1 (recommended): Set up an isolated Consus profile
If you use Claude Code for anything else (personal account or another organization) we recommend setting up an isolated Consus Gateway profile. This keeps your Consus credentials and settings fully isolated. Add this alias to your shell profile (~/.zshrc or ~/.bashrc):
source ~/.zshrc (or source ~/.bashrc) to pick up the alias.
Run it once to bootstrap the profile, then exit with Ctrl+C:
~/.claude-gateway/settings.json, which you’ll edit in the next step.
The rest of this guide uses claude-gateway and ~/.claude-gateway/ throughout. If you skip this step, substitute claude and ~/.claude/.
Step 2: Configure your gateway settings
Open~/.claude-gateway/settings.json and replace its contents with one of the configurations below — the one that matches your data classification. The two are identical except for the model IDs.
Option A — ITAR
Use this when handling ITAR / export-controlled data. Every call is served by Claude Sonnet 4.5 with ITAR authorization on AWS GovCloud Bedrock.Option B — FedRAMP High
Use this for FedRAMP High (non-ITAR) workloads. Same structure as Option A — only the model IDs change to carry the:fedramp-high level, which gives you Claude Opus 4.6, Sonnet 4.6, and Haiku 4.5 (a real Haiku model for background calls).
<CONSUS_API_KEY> with your actual key.
Conflicting shell variables: If
ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN are exported in your shell, they take precedence over apiKeyHelper and will route Claude Code around the gateway. Unset them with unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN and remove any export lines for them from ~/.zshrc or ~/.bashrc.Previous login: If you previously logged in to Claude Code against api.anthropic.com, run /logout inside a Claude Code session to clear cached credentials before the gateway configuration takes effect.Step 3: Start your session
Step 4: Verify
Inside the Claude Code session, run/status:
Auth token shows anything other than apiKeyHelper (for example ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN), one of those environment variables is still set in your shell — see the Conflicting shell variables note in Step 2.
Then ask Claude Code to do something real:
What gets served
Every request from Claude Code — coding turns, background Haiku-class calls, tool use — is served by the model you configure in Step 2. With Option A that’s Claude Sonnet 4.5 with ITAR authorization for every call; with Option B it’s Claude Opus 4.6 / Sonnet 4.6 at FedRAMP High. The gateway routes each request to whichever government-authorized provider hosts that model at the requested compliance level (AWS GovCloud Bedrock, GCP Assured Workloads Vertex AI); the compliance boundary is enforced at the gateway architecture level. The response headerx-consus-served-model confirms the model that served each successful request (e.g. claude-sonnet-4-5).
What each setting does
apiKeyHelper
: A shell command Claude Code runs to obtain the API key. echo <key> is the simplest form — Claude Code reads the key off stdout and sends it as the x-api-key header on every request.
model and availableModels
: Pin Claude Code’s client-side model selection to the model and compliance level you want served. Must include a :level suffix.
env.ANTHROPIC_BASE_URL
: Routes Claude Code’s requests to the gateway (https://api.consus.io) instead of api.anthropic.com. The gateway exposes the same Anthropic Messages API surface.
env.ANTHROPIC_DEFAULT_OPUS_MODEL, env.ANTHROPIC_DEFAULT_SONNET_MODEL, and env.ANTHROPIC_DEFAULT_HAIKU_MODEL
: Override Claude Code’s default model IDs for its Opus, Sonnet, and background (Haiku-class) tiers. Each must be a full model:level ID; set them to the model you want serving that class of call. Option A only needs the Sonnet and Haiku tiers; Option B adds the Opus tier.