This uses the gateway key auth pattern: your TrueFoundry key in
ANTHROPIC_AUTH_TOKEN, and an Anthropic API key on the model account. If your users are on a Team, Pro, or Max subscription and you want usage billed to their seats instead, finish this page first, then switch to subscription passthrough.Prerequisites
- A TrueFoundry account with the AI Gateway enabled — sign up and follow the Gateway quick start if you haven’t.
- Claude Code installed (
npm install -g @anthropic-ai/claude-code).
1
Add a Claude model account
In TrueFoundry, go to AI Gateway → Models and add an Anthropic account with your Anthropic API key (Bedrock and Vertex work too). Add at least Opus, Sonnet, and Haiku so Claude Code’s model aliases all resolve. Full steps in Anthropic model integration.
2
Copy your gateway base URL and a model name
Open the Playground, pick one of the Claude models you just added, and open the code snippet. Copy the base URL and the model name (it looks like 
Create a TrueFoundry API key from Settings → API Keys if you don’t have one. See Generating API keys.
your-account/claude-sonnet-4-6).
3
Point Claude Code at the gateway
Add the following to
~/.claude/settings.json (or .claude/settings.json inside one project), replacing the placeholders:Keep a recognizable Anthropic model id (
claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5, …) in each model value. Claude Code string-matches the id to decide which features to enable, and an unrecognized name can trigger 400: This model does not support the effort parameter. Details under Model configuration.4
Send a request
Start Claude Code and ask it anything:Run
/model inside the session to confirm the picker shows your gateway models.5
See it on the gateway
In TrueFoundry, open AI Gateway → Analytics. The request appears under your API key with its model, token counts, and cost. Open Request Logs to see the prompt and response. See Analytics overview and Request logging.
Now roll it out
Pick the auth pattern for your plan
Enterprise, or Team / Pro / Max subscription passthrough.
Set up Claude Desktop
Same gateway, third-party inference mode.
Govern MCP servers
Route every connector through the MCP Gateway.
Enforce fleet-wide with MDM
Lock the config so developers can’t remove it.