9Router Claude Code Setup: Free Models In Minutes

Share this post

The 9router Claude Code pairing is the most popular reason the router exists: Claude Code is brilliant and hungry, and 9Router feeds it — routing its requests through the logins you already pay for, then cheap providers, then free tiers, with token compression running the whole time. Setup is one config edit, straight from the repo’s README. Here’s the exact route and the honest caveats.

Short answer

  • Documented setup: edit ~/.claude/config.jsonanthropic_api_base: http://localhost:20128/v1 plus your 9Router key.
  • Claude Code then rides 9Router’s three-tier fallback — Subscription → Cheap → Free — across 40+ providers.
  • RTK compression (20–40% input tokens per the docs) applies to every Claude Code request through the proxy.
  • Caveat: routed “free Claude” comes via other providers’ tiers and quotas — behaviour can differ from a native Anthropic connection.


The documented 9router Claude Code setup

Install and start 9Router (npm install -g 9router, then 9router — full detail in the install guide), open the dashboard at localhost:20128, connect your logins, and copy your local API key. Then the README’s Claude Code step is a single file edit — ~/.claude/config.json:

{ "anthropic_api_base": "http://localhost:20128/v1", "anthropic_api_key": "your-9router-api-key" }

Restart Claude Code and it now speaks to 9Router, which speaks to everyone else. Claude Code itself notices nothing — same interface, same workflow — while the proxy underneath decides which provider actually answers each request.

What you actually gain (and the trade-offs)

Three gains, per the docs and my daily use. Resilience: hitting a limit no longer ends your session — the fallback steps down and keeps you coding. Economics: RTK’s 20–40% input-token compression stacks with whatever plan you’re on, and pairs naturally with the tactics in my Claude Code token guide. Reach: model names like cc/claude-opus-4-7 let tools select routed models explicitly across providers.

The honest trade-offs: you’re inserting a proxy into a tool’s expected API — when Claude Code updates or a provider changes formats, the router needs to keep up (the repo’s active push history is reassuring there). And “free Claude” through routed tiers means other providers’ quotas and terms, not a native Anthropic subscription — expect occasional differences in limits and behaviour, and keep your native config one revert away.

πŸ”₯ Want this set up without the guesswork? A Claude Code stack that never hits a wall mid-build is exactly the kind of thing we set up together inside the AI Profit Boardroom — 3,700+ members, four live calls a week, daily tutorials, done-for-you templates and a 30-day roadmap. Prefer 1-on-1 help? Book a free SEO strategy session and we’ll map it out for your business.

A sane rollout for real work

  • Day one: route a side project, not your production repo — confirm tools, MCP servers and long sessions behave.
  • Turn on RTK in the dashboard — it’s the setting most people miss, and it’s the compounding one.
  • Watch the quota panel for a few days to learn your real usage shape before trusting the fallback blindly.
  • Keep the native config handy: reverting is deleting two lines — that’s your escape hatch if anything feels off.

Run it like that for a week and you’ll know exactly what the router saves you — on my stack it’s the difference between watching limits and forgetting they exist.

The bottom line on 9router Claude Code

The 9router claude code setup is two lines of config for a permanently calmer relationship with rate limits: same Claude Code workflow, three tiers of fallback underneath, and token compression working every request. Roll it out on a side project first, keep the revert path in your pocket, and let the quota dashboard prove the value in your own numbers.

A note on team setups: because the router runs per-machine, each developer gets their own dashboard, their own connected logins and their own quota pool — there’s no shared bottleneck to fight over, and one person’s burned quota never stalls a colleague. The flip side is that config drift between machines becomes your problem: agree on the same RTK setting and fallback expectations across the team, or debugging “why does it behave differently on your laptop” becomes a Tuesday ritual. Two machines, same two-line config, same dashboard toggles — boring consistency is the whole trick.

FAQ: 9router claude code

How do I connect Claude Code to 9Router?

Edit ~/.claude/config.json to set anthropic_api_base to http://localhost:20128/v1 with your 9Router API key, then restart Claude Code — the README’s documented route.

Does Claude Code behave differently through 9Router?

The interface is identical; underneath, requests ride 9Router’s fallback tiers, so limits and model behaviour can differ from a native Anthropic connection.

Can I really run Claude models free this way?

The repo’s free tier routes through providers like Kiro’s monthly credits — genuinely free, but bounded by those providers’ quotas and terms.

Does RTK compression work with Claude Code?

Yes — the proxy applies it to requests passing through, with the docs citing 20–40% input-token savings.

How do I undo the setup?

Remove the two config.json lines (or restore your native values) and restart — the escape hatch is deliberately trivial.

Is this against Claude Code’s rules?

You’re changing a documented base-URL setting; the routed providers’ own terms are what govern each tier — read them for anything you rely on commercially.

Next step: if you want Claude Code running cheaper and never blocked working for you this week, join the AI Profit Boardroom for the full walkthroughs and live help — or book a free SEO strategy session and I’ll point you at the fastest path for your situation.

About Julian Goldie: SEO agency owner with 10+ years in SEO, 394K+ subscribers on YouTube, a 100% job-success score on Upwork, 75K+ members across his communities, and author of a best-selling SEO book. He runs the AI Profit Boardroom community and offers a free SEO strategy session.

Related reading

Last updated September 2026. This is the living guide to 9router claude code — it gets updated as the tools change.

Table of contents

Related Articles

9router AI overview: the free, MIT-licensed router that connects 16 coding tools to 40+ providers with auto-fallback and token compression.
9router Antigravity setup: the repo lists Google’s IDE as a supported tool and OAuth provider β€” here’s the documented route and what’s missing.
9router install guide: one npm command (or Docker), the localhost:20128 dashboard, connecting your logins, and verifying your first request.
9router vs OmniRoute compared: tools, providers, token compression and fallback β€” plus the two-coder setup where you don’t actually choose.