talira

FREE AI Router & Token Saver

open sourceMITself-hostablefree

9Router is a local AI router for coding tools: it runs on your machine or server (default http://localhost:20128/v1) as an OpenAI-compatible endpoint, and you point Claude Code, Codex, Cursor, Cline, Copilot, OpenClaw and other tools at it. Behind it you connect your own accounts: subscriptions signed in with OAuth (Claude Code, Codex, GitHub Copilot, Cursor, Antigravity), API keys for 40+ providers (OpenRouter, Anthropic, OpenAI, Gemini, DeepSeek, GLM, MiniMax, Kimi and more), free tiers such as Kiro and OpenCode Free, and self-hosted speech and embedding servers. It translates between OpenAI, Claude, Gemini and other formats, falls back from subscription to cheap to free models in combos you define, round-robins several accounts per provider, refreshes OAuth tokens, tracks quota resets and estimated costs, and compresses tool output (its port of RTK) to save tokens. It's a Next.js app with SQLite, installed with npm or Docker under the MIT licence; its README credits CLIProxyAPI as the Go project it ports, and OmniRoute is a fork of it.

Ways to install

Problems it solves

  • keep coding when my Claude Pro quota runs out by falling back to a cheaper model automatically
  • use my Claude Code or Codex subscription from other coding tools through one local endpoint
  • route Cursor, Cline and Claude Code through one OpenAI-compatible URL to many AI providers
  • rotate between several accounts of the same AI provider to avoid rate limits
  • cut the tokens my coding agent spends on git diff and grep output
  • see how much of my AI subscription quota is left before the 5-hour reset
  • combine free and cheap AI models into one fallback chain for my coding agent
  • translate Claude-format requests to OpenAI-format providers and back
  • connect a free model provider to Claude Code without paying for an API key
  • estimate what my AI coding usage would cost at API prices
  • a self-hosted AI router I can run on a VPS and share across my laptops
  • sync my AI provider and model routing settings across devices

Features

  • OpenAI-compatible endpoint (/v1/chat/completions, /v1/models) for AI coding tools
  • OAuth sign-in to Claude Code, Codex, GitHub Copilot, Cursor and Antigravity subscriptions, with automatic token refresh
  • API keys for 40+ providers and custom OpenAI- or Anthropic-compatible endpoints
  • free providers such as Kiro and OpenCode Free
  • self-hosted speech-to-text, text-to-speech and embedding servers
  • format translation between OpenAI, Claude, Gemini, Cursor, Kiro, Vertex, Antigravity, Ollama and OpenAI Responses
  • combos with automatic fallback from subscription to cheap to free models
  • multiple accounts per provider with round-robin or priority routing
  • real-time quota tracking with reset countdowns, usage analytics and cost estimates
  • RTK token saver that compresses tool outputs, optional Headroom compression, Caveman and Ponytail prompt modes
View 4 more
  • spending limits per provider
  • request logging in debug mode
  • cloud sync of providers, combos and settings, and a Cloudflare tunnel to reach the router from anywhere
  • runs on localhost, a VPS, Docker or Cloudflare Workers; optional API key enforcement on /v1

Limitations

  • Doesn't supply AI models or quota itself: you connect your own subscriptions, API keys and free provider accounts, and pay providers directly4

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Forks

  • OmniRoute The free AI gateway: one endpoint for hundreds of providers, with quota-aware fallback. Its own project since 2026.

Alternatives

The same job

These do what 9Router does.

  1. OmniRoute The free AI gateway: one endpoint for hundreds of providers, with quota-aware fallback
  2. CLIProxyAPI Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code and Devin as an OpenAI/Gemini/Claude/Codex compatible API service
  3. OpenRouter One API for text, image, video, and audio models.
  4. New API An AI gateway for models, applications, and agents
  5. LiteLLM The AI Gateway for platform teams.
  6. Bifrost Open-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway.

Compare 9Router with the top 3