Quickstart
Claude Code proxy setup
InferRoute is a drop-in proxy for the Anthropic API. Install the CLI and run ir — it launches Claude Code routed through InferRoute, automatically sending simple requests to cheaper models and complex ones to premium, cutting your Anthropic API costs by up to 70%.
Prerequisites
- Claude Code installed and working with a direct Anthropic API key
- A free InferRoute account (takes 30 seconds, no credit card required)
- Windows users: Claude Code runs on Windows via WSL — once WSL is set up, use the same commands below in your WSL terminal
Create a free account and get your API key
Sign up at inferroute.ai, then go to your dashboard and create an API key — it starts with inf_. You'll hand it to ir login in the next step.
inf_xxxxxxxxxxxxxxxxxxxx
Install the CLI and log in
$ ir login # paste your inf_ key
ir login saves your key to ~/.config/inferroute/credentials. The CLI sets ANTHROPIC_BASE_URL for you — scoped only to the session it launches, so your regular claude stays untouched.
Run ir exactly like claude
Same flags, same workflow, same Claude Code. ir just launches it pointed at InferRoute, which routes your session to the most cost-efficient model that can handle it — automatically, or pin one yourself.
Check your dashboard
Open your InferRoute dashboard to see your sessions being routed in real-time, your token usage, and exactly how much you're saving compared to direct Anthropic pricing.
How routing works
Each session is matched by specialty and complexity to the model on the Pareto frontier for that task — from leading open-source models to top closed-source providers. Or pin a model yourself.
- →Simple tasks — code completion, file edits, short Q&A — route to the cheapest capable model for that task type
- →Complex tasks — multi-step reasoning, large context windows, agentic planning — route to a specialized frontier model matched to the task's demands
No added latency on the routing step itself.
Ready to see your savings? The free tier gets you started in seconds.