9router

Route AI coding tool requests across 40+ providers with auto-fallback and token-saving compression to minimize costs and downtime.

Route AI coding tool requests across 40+ providers with auto-fallback and token-saving compression to minimize costs and downtime.

The gist

9Router is a free, open-source AI router and token saver for developers. It sits between command-line coding tools and various AI model providers, solving problems like hitting rate limits, managing multiple subscriptions, and overspending on API tokens. It intelligently routes requests to maximize value and ensure coding sessions are never interrupted, connecting to over 40 providers and 100+ models.

What it does

  • Route requests between 40+ AI providers, including OpenAI, Claude, and Gemini.
  • Compress tool outputs like git diff and ls to save 20-40% on input tokens.
  • Automatically fall back from subscription models to cheap, then free tiers.
  • Translate API request formats between different providers.
  • Track token usage and subscription quotas in a real-time dashboard.
  • Load-balance requests across multiple accounts for a single provider.

How it works

Install 9Router via npm to run a local server. Users configure their AI coding tools (e.g., Cursor, Claude Code) to send API requests to this local endpoint. 9Router intercepts these requests, applies token-saving compression, and routes them to the appropriate AI provider based on a user-defined, tiered fallback logic (e.g., subscription → cheap → free). The software itself is free and open-source; users pay the AI providers directly.

Best for

This tool is best for developers who use multiple AI coding assistants and want to optimize costs, avoid rate-limiting interruptions, and fully utilize their various API subscriptions.

Watch out for

The tool itself is free, but you are still responsible for paying the underlying AI providers. The dashboard's cost display is an estimate to show savings, not an actual bill from 9Router.