Skip to content

9Router

A local router that lets AI coding tools use multiple model providers, with fallback when limits hit.

Stars
31.8k
Forks
6.2k
Licence
MIT
Language
JavaScript
Last update
9 days ago
Type
Dev tool

What it is

9Router runs on your computer as a local server at localhost:20128. You point tools such as Claude Code, Codex, Cursor or Cline at it instead of a provider, and it forwards requests to one of 40+ AI providers. It can switch to a cheaper or free model when a primary subscription runs out, and its README says it compresses tool output to save tokens.

  • Point Claude Code or Cursor at http://localhost:20128/v1 and use a free model through the router
  • Set up automatic fallback from a subscription provider to cheaper or free providers
  • Track quota across accounts and providers from the dashboard
  • Rotate requests between multiple accounts for one provider

Great for

  • Developers who use AI coding tools and want to reduce spending
  • People with several AI subscriptions who want to use up their quota
  • Users who want one local endpoint for multiple AI providers
  • Tinkerers willing to configure providers and model names by hand

Not ideal for

  • Users who need guaranteed uptime or enterprise support, since the README describes no such commitments
  • People who do not want to manage API keys or provider accounts
  • Anyone expecting every listed model to be truly unlimited, since free tiers and credits have limits the README itself mentions
Step-by-step guide: how to use 9RouterInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js · npm

    Install globally with npm

    npm install -g 9router

    Start the router and dashboard

    9router
  2. 2

    Run it

    • Run 9router and open http://localhost:20128 in your browser
    • In the dashboard, go to Providers and connect a free provider such as OpenCode Free
    • Copy the API key shown in the dashboard
    • In your CLI tool, set the endpoint to http://localhost:20128/v1 and paste the key
    • Choose a model name such as kr/claude-sonnet-4.5 and start coding
  3. 3

    Get the most out of it

    • Connect several providers so auto-fallback has somewhere to go when a quota runs out
    • Add multiple accounts per provider to use round-robin distribution
    • Use the dashboard quota tracking to spend subscription credits before they reset
    • Enable the RTK token saver, which the README says compresses tool_result content

Downloads

Strengths

  • Single local endpoint works with many AI coding tools
  • Automatic fallback between tiers of providers
  • MIT licensed and open source with a large public following

Trade-offs

  • Free tiers and credits are limited and can change, so 'unlimited' is marketing wording
  • Source-based setup and production build require extra steps and system tuning
  • Relies on third-party providers whose terms and availability are outside the project's control

How it compares

ProjectStarsTypeLevelUpdatedBest for
9router (this)31.8kDev toolintermediate9 days agoDevelopers who use AI coding tools and want to reduce spending
ollama186kAppbeginner4 days agoDevelopers who want a local model API for their own apps
OmniRoute83.8kAppintermediate4 days agoDevelopers who use several AI coding tools and want one place to configure providers
hermes-agent260kAI model / agentintermediate4 days agoDevelopers who want a personal agent they can host on their own server or machine
agents42.1kDev toolbeginner4 days agoDevelopers who already use one of the listed AI coding tools and want ready-made specialist agents
humanizer63.8kAI model / agentbeginner9 days agoWriters who draft with an AI and want the final text to sound more natural

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.