Sign inSign up

9router/9router

By 9router

β€’Updated 5 months ago

https://github.com/decolua/9router/blob/master/README.md

Image
3

10K+

9router/9router repository overview

9Router Dashboard

⁠9Router - FREE AI Router & Token Saver

Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models.

Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.

npm Downloads License

πŸš€ Quick Start⁠ β€’ πŸ’‘ Features⁠ β€’ πŸ“– Setup⁠ β€’ 🌐 Website⁠

πŸ‡»πŸ‡³ TiαΊΏng Việt⁠ β€’ πŸ‡¨πŸ‡³ 中文⁠ β€’ πŸ‡―πŸ‡΅ ζ—₯本θͺžβ 


β πŸ€” Why 9Router?

Stop wasting money, tokens and hitting limits:

  • ❌ Subscription quota expires unused every month
  • ❌ Rate limits stop you mid-coding
  • ❌ Tool outputs (git diff, grep, ls...) burn tokens fast
  • ❌ Expensive APIs ($20-50/month per provider)
  • ❌ Manual switching between providers

9Router solves this:

  • βœ… RTK Token Saver - Auto-compress tool_result content, save 20-40% tokens per request
  • βœ… Maximize subscriptions - Track quota, use every bit before reset
  • βœ… Auto fallback - Subscription β†’ Cheap β†’ Free, zero downtime
  • βœ… Multi-account - Round-robin between accounts per provider
  • βœ… Universal - Works with Claude Code, Codex, Cursor, Cline, any CLI tool

β πŸ”„ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Your CLI   β”‚  (Claude Code, Codex, OpenClaw, Cursor, Cline...)
β”‚   Tool      β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚ http://localhost:20128/v1
       ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           9Router (Smart Router)            β”‚
β”‚  β€’ RTK Token Saver (cut tool_result tokens) β”‚
β”‚  β€’ Format translation (OpenAI ↔ Claude)     β”‚
β”‚  β€’ Quota tracking                           β”‚
β”‚  β€’ Auto token refresh                       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”œβ”€β†’ [Tier 1: SUBSCRIPTION] Claude Code, Codex, GitHub Copilot
       β”‚   ↓ quota exhausted
       β”œβ”€β†’ [Tier 2: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)
       β”‚   ↓ budget limit
       └─→ [Tier 3: FREE] Kiro, OpenCode Free, Vertex ($300 credits)

Result: Never stop coding, minimal cost + 20-40% token savings via RTK

⁠⚑ Quick Start

1. Install globally:

npm install -g 9router
9router

πŸŽ‰ Dashboard opens at http://localhost:20128

2. Connect a FREE provider (no signup needed):

Dashboard β†’ Providers β†’ Connect Kiro AI (free Claude unlimited) or OpenCode Free (no auth) β†’ Done!

3. Use in your CLI tool:

Claude Code/Codex/OpenClaw/Cursor/Cline Settings:
  Endpoint: http://localhost:20128/v1
  API Key: [copy from dashboard]
  Model: kr/claude-sonnet-4.5

That's it! Start coding with FREE AI models.

Alternative: run from source (this repository):

This repository package is private (9router-app), so source/Docker execution is the expected local development path.

cp .env.example .env
npm install
PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev

Production mode:

npm run build
PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start

Default URLs:

  • Dashboard: http://localhost:20128/dashboard
  • OpenAI-compatible API: http://localhost:20128/v1

Tag summary

Content type

Image

Digest

sha256:9e5dfc635…

Size

82.5 MB

Last updated

5 months ago

docker pull 9router/9router