Prerequisites
Set up Claude Code
Add three environment variables to your shell profile (~/.zshrc or ~/.bashrc):
claude works. Every Claude Code session routes through Auriko.
ANTHROPIC_API_KEY="" must be explicitly set to empty. If it contains a value, Claude Code uses it directly against Anthropic, bypassing the gateway.Set up Claude Agent SDK
The Claude Agent SDK spawns the Claude Code CLI as a subprocess. Pass the environment variables throughClaudeAgentOptions.env:
As defensive practice, pass
setting_sources=[] in options to disable loading filesystem settings. This guarantees your env values take effect regardless of SDK version.Use non-Claude models
Claude Code supports any model via Auriko’s routing:/model gpt-4o, or override default aliases:
Control costs and routing
Without Auriko, Claude Code talks directly to Anthropic. One provider, one price, no controls. With Auriko:- Cost visibility: see what Claude Code costs per session, per key, per team member
- Budget controls: cap spend per API key so a runaway agentic loop doesn’t burn the budget
- Provider routing: same Claude model available through Anthropic direct, Bedrock, and Vertex; Auriko picks the cheapest or fastest based on workspace config
- Fallbacks: if Anthropic direct is rate-limited or down, automatically fail over to Bedrock or Vertex
- Data policies: enforce zero data retention (ZDR) or no-training across all Claude Code usage
- Unified billing: Claude Code usage in the same dashboard as all other LLM usage
- Non-Claude models:
claude --model gpt-4oroutes through Auriko to OpenAI
Use the Anthropic SDK directly
Any application built on the Anthropic SDK can use Auriko as a drop-in backend:Configure routing
Pass routing options throughextra_body:
Check compatibility
- All Claude Code features work through Auriko: tool use (Bash, Read, Write, Edit), MCP servers, streaming, extended thinking, and prompt caching
- Agentic features (file operations, bash execution, MCP) run locally in the CLI; only LLM inference calls route through Auriko
- Non-Claude models work for simple tasks but degrade on complex multi-file refactors (this is inherent to Claude Code, not Auriko-specific):
| Capability | Claude | GPT-4o | DeepSeek/Gemini | Local models |
|---|---|---|---|---|
| Tool calling | Excellent | Good | Simple calls work | Unreliable |
| Edit accuracy | ~98% | ~85-90% | ~60-80% | Worst |
| Long sessions | Stable | Degrades | Degrades faster | Degrades fastest |
- Fast mode’s org eligibility check is hardcoded to
https://api.anthropic.comand doesn’t respectANTHROPIC_BASE_URL. Fast mode is silently disabled when routing through a gateway.