Observed since 20 Oct, 21:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
9Router Plus - Enhanced AI Router
Never stop coding. Auto-route to FREE & cheap AI models with smart fallback.
Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.
🚀 Quick Start • 💡 Features • 📖 Setup • 🔄 vs 9Router
Based on 9Router by decolua
| Feature | 9Router | 9Router Plus |
|---|---|---|
| Core Routing | ✅ Smart fallback | ✅ Smart fallback |
| Providers | 40+ providers | 40+ providers |
| Translation Layer | OpenAI ↔ Claude | ✅ OpenAI ↔ Claude ↔ Gemini |
| Morph Proxy | ❌ | ✅ Full morphllm namespace (apply, compact, embeddings, rerank, warpgrep) |
| Morph Key Rotation | ❌ | ✅ Round-robin key failover + auto-exhausted detection |
| Morph Usage Dashboard | ❌ | ✅ Credits tracking, capability breakdown, auto-compact stats |
| Tab-Based UI | ❌ | ✅ Main/Cloud tabs |
| Security Hardening | Basic | ✅ 12 critical bug fixes + SSRF protection |
| Real-Time Monitoring | Basic | ✅ Live status + logs viewer |
| Auto-Restart | ❌ | ✅ Config change detection |
| Responsive Design | Basic | ✅ Mobile/Tablet/Desktop optimized |
Key Enhancements:
api.morphllm.com) dengan namespace morphllm, round-robin key rotation, usage tracking, dan dedicated dashboardStop wasting money and hitting limits:
9Router Plus solves this:
┌─────────────┐
│ Your CLI │ (Claude Code, Codex, Gemini CLI, OpenClaw, Cursor, Cline...)
│ Tool │
└──────┬──────┘
│ http://localhost:20128/v1
↓
┌─────────────────────────────────────────┐
│ 9Router Plus (Smart Router) │
│ • Format translation (OpenAI ↔ Claude ↔ Gemini) │
│ • Quota tracking │
│ • Auto token refresh │
└──────┬──────────────────────────────────┘
│
├─→ [Tier 1: SUBSCRIPTION] Claude Code, Codex, Gemini CLI
│ ↓ quota exhausted
├─→ [Tier 2: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)
│ ↓ budget limit
└─→ [Tier 3: FREE] iFlow, Qwen, Kiro (unlimited)
Result: Never stop coding, minimal cost
1. Run directly with npx
npx 9router-plus
Or install globally:
npm install -g 9router-plus
9router-plus
Or install locally in a project:
mkdir 9router-plus-app
cd 9router-plus-app
npm init -y
npm install 9router-plus
npx 9router-plus
2. Start 9Router Plus
You can also run the underlying script directly if needed:
PORT=20128 HOSTNAME=0.0.0.0 node ./node_modules/9router-plus/scripts/start.js
Open:
http://localhost:20128/dashboardhttp://localhost:20128/v1Notes:
9router-plus CLI for both npx and global install..env in your app directory before starting.20128; override with PORT=3000, 9router-plus --port 3000, or 9router-plus -p 3000.3. Connect a FREE provider (no signup needed):
Dashboard → Providers → Connect Claude Code or Antigravity → OAuth login → Done!
3. Use in your CLI tool:
Claude Code/Codex/Gemini CLI/OpenClaw/Cursor/Cline Settings:
Endpoint: http://localhost:20128/v1
API Key: [copy from dashboard]
Model: if/kimi-k2-thinking
That's it! Start coding with FREE AI models.
Start command examples:
npx 9router-plus
# or
9router-plus
# or
9router-plus --port 3000
# or
PORT=20128 HOSTNAME=0.0.0.0 node ./node_modules/9router-plus/scripts/start.js
If port 20128 is already in use, 9Router Plus will print a clear error showing:
--port 3000If the package cannot find a runnable runtime, 9Router Plus will also explain whether the standalone build is missing or whether you are starting it from the wrong directory.
If you want to free the default port manually:
fuser -k 20128/tcp
# fallback:
lsof -ti :20128 | xargs -r kill -9
Default URLs:
http://localhost:20128/dashboardhttp://localhost:20128/v1🎬 Watch the complete step-by-step tutorial:
⏱️ Duration: 20 minutes | 👥 By: Developer Community
9Router works seamlessly with all major AI coding tools:
![]() Claude-Code |
![]() OpenClaw |
![]() Codex |
![]() OpenCode |
![]() Cursor |
![]() Antigravity |
![]() Cline |
![]() Continue |
![]() Droid |
![]() Roo |
![]() Copilot |
![]() Kilo Code |
![]() Claude-Code |
![]() Antigravity |
![]() Codex |
![]() GitHub |
![]() Cursor |
![]() iFlow AI 8+ models • Unlimited |
![]() Qwen Code 3+ models • Unlimited |
![]() Gemini CLI 180K/month FREE |
![]() Kiro AI Claude • Unlimited |
![]() OpenRouter |
![]() GLM |
![]() Kimi |
![]() MiniMax |
![]() OpenAI |
![]() Anthropic |
![]() Gemini |
![]() DeepSeek |
![]() Groq |
![]() xAI |
![]() Mistral |
![]() Perplexity |
![]() Together AI |
![]() Fireworks |
![]() Cerebras |
![]() Cohere |
![]() NVIDIA |
SiliconFlow |
...and 20+ more providers including Nebius, Chutes, Hyperbolic, and custom OpenAI/Anthropic compatible endpoints
| Feature | What It Does | Why It Matters |
|---|---|---|
| 🎯 Smart 3-Tier Fallback | Auto-route: Subscription → Cheap → Free | Never stop coding, zero downtime |
| 📊 Real-Time Quota Tracking | Live token count + reset countdown | Maximize subscription value |
| 🔄 Format Translation | OpenAI ↔ Claude ↔ Gemini seamless | Works with any CLI tool |
| 👥 Multi-Account Support | Multiple accounts per provider | Load balancing + redundancy |
| 🔄 Auto Token Refresh | OAuth tokens refresh automatically | No manual re-login needed |
| 🎨 Custom Combos | Create unlimited model combinations | Tailor fallback to your needs |
| 📝 Request Logging | Debug mode with full request/response logs | Troubleshoot issues easily |
| 💾 Cloud Sync | Sync config across devices | Same setup everywhere |
| 📊 Usage Analytics | Track tokens, cost, trends over time | Optimize spending |
| 🌐 Deploy Anywhere | Localhost, VPS, Docker, Cloudflare Workers | Flexible deployment options |
Create combos with automatic fallback:
Combo: "my-coding-stack"
1. cc/claude-opus-4-6 (your subscription)
2. glm/glm-4.7 (cheap backup, $0.6/1M)
3. if/kimi-k2-thinking (free fallback)
→ Auto switches when quota runs out or errors occur
Seamless translation between formats:
BASE_URL (internal callback URL used by sync scheduler)CLOUD_URL (cloud sync endpoint base)NEXT_PUBLIC_BASE_URL and NEXT_PUBLIC_CLOUD_URL are still supported for compatibility/UI, but server runtime now prioritizes BASE_URL/CLOUD_URL.💡 IMPORTANT - Understanding Dashboard Costs:
The "cost" displayed in Usage Analytics is for tracking and comparison purposes only. 9Router itself never charges you anything. You only pay providers directly (if using paid services).
Example: If your dashboard shows "$290 total cost" while using iFlow models, this represents what you would have paid using paid APIs directly. Your actual cost = $0 (iFlow is free unlimited).
Think of it as a "savings tracker" showing how much you're saving by using free models or routing through 9Router!
| Tier | Provider | Cost | Quota Reset | Best For |
|---|---|---|---|---|
| 💳 SUBSCRIPTION | Claude Code (Pro) | $20/mo | 5h + weekly | Already subscribed |
| Codex (Plus/Pro) | $20-200/mo | 5h + weekly | OpenAI users | |
| Gemini CLI | FREE | 180K/mo + 1K/day | Everyone! | |
| GitHub Copilot | $10-19/mo | Monthly | GitHub users | |
| 💰 CHEAP | GLM-4.7 | $0.6/1M | Daily 10AM | Budget backup |
| MiniMax M2.1 | $0.2/1M | 5-hour rolling | Cheapest option | |
| Kimi K2 | $9/mo flat | 10M tokens/mo | Predictable cost | |
| 🆓 FREE | iFlow | $0 | Unlimited | 8 models free |
| Qwen | $0 | Unlimited | 3 models free | |
| Kiro | $0 | Unlimited | Claude free |
💡 Pro Tip: Start with Gemini CLI (180K free/month) + iFlow (unlimited free) combo = $0 cost!
9Router Billing Reality:
✅ 9Router software = FREE forever (open source, never charges)
✅ Dashboard "costs" = Display/tracking only (not actual bills)
✅ You pay providers directly (subscriptions or API fees)
✅ FREE providers stay FREE (iFlow, Kiro, Qwen = $0 unlimited)
❌ 9Router never sends invoices or charges your card
How Cost Display Works:
The dashboard shows estimated costs as if you were using paid APIs directly. This is not billing - it's a comparison tool to show your savings.
Example Scenario:
Dashboard Display:
• Total Requests: 1,662
• Total Tokens: 47M
• Display Cost: $290
Reality Check:
• Provider: iFlow (FREE unlimited)
• Actual Payment: $0.00
• What $290 Means: Amount you SAVED by using free models!
Payment Rules:
Problem: Quota expires unused, rate limits during heavy coding
Solution:
Combo: "maximize-claude"
1. cc/claude-opus-4-6 (use subscription fully)
2. glm/glm-4.7 (cheap backup when quota out)
3. if/kimi-k2-thinking (free emergency fallback)
Monthly cost: $20 (subscription) + ~$5 (backup) = $25 total
vs. $20 + hitting limits = frustration
Problem: Can't afford subscriptions, need reliable AI coding
Solution:
Combo: "free-forever"
1. gc/gemini-3-flash (180K free/month)
2. if/kimi-k2-thinking (unlimited free)
3. qw/qwen3-coder-plus (unlimited free)
Monthly cost: $0
Quality: Production-ready models
Problem: Deadlines, can't afford downtime
Solution:
Combo: "always-on"
1. cc/claude-opus-4-6 (best quality)
2. cx/gpt-5.2-codex (second subscription)
3. glm/glm-4.7 (cheap, resets daily)
4. minimax/MiniMax-M2.1 (cheapest, 5h reset)
5. if/kimi-k2-thinking (free unlimited)
Result: 5 layers of fallback = zero downtime
Monthly cost: $20-200 (subscriptions) + $10-20 (backup)
Problem: Need AI assistant in messaging apps (WhatsApp, Telegram, Slack...), completely free
Solution:
Combo: "openclaw-free"
1. if/glm-4.7 (unlimited free)
2. if/minimax-m2.1 (unlimited free)
3. if/kimi-k2-thinking (unlimited free)
Monthly cost: $0
Access via: WhatsApp, Telegram, Slack, Discord, iMessage, Signal...
The dashboard tracks your token usage and displays estimated costs as if you were using paid APIs directly. This is not actual billing - it's a reference to show how much you're saving by using free models or existing subscriptions through 9Router.
Example:
The cost display is a "savings tracker" to help you understand your usage patterns and optimization opportunities.
No. 9Router is free, open-source software that runs on your own computer. It never charges you anything.
You only pay:
9Router is a local proxy/router. It doesn't have your credit card, can't send invoices, and has no billing system. It's completely free software.
Yes! Providers marked as FREE (iFlow, Kiro, Qwen) are genuinely unlimited with no hidden charges.
These are free services offered by those respective companies:
9Router just routes your requests to them - there's no "catch" or future billing. They're truly free services, and 9Router makes them easy to use with fallback support.
Note: Some subscription providers (Antigravity, GitHub Copilot) may have free preview periods that could become paid later, but this would be clearly announced by those providers, not 9Router.
Free-First Strategy:
Start with 100% free combo:
1. gc/gemini-3-flash (180K/month free from Google)
2. if/kimi-k2-thinking (unlimited free from iFlow)
3. qw/qwen3-coder-plus (unlimited free from Qwen)
Cost: $0/month
Add cheap backup only if you need it:
4. glm/glm-4.7 ($0.6/1M tokens)
Additional cost: Only pay for what you actually use
Use subscription providers last:
Result: Most users can operate at $0/month using only free tiers!
9Router's smart fallback prevents surprise charges:
Scenario: You're on a coding sprint and blow through your quotas
Without 9Router:
With 9Router:
You're in control: Set spending limits per provider in dashboard, and 9Router respects them.
Dashboard → Providers → Connect Claude Code
→ OAuth login → Auto token refresh
→ 5-hour + weekly quota tracking
Models:
cc/claude-opus-4-6
cc/claude-sonnet-4-5-20250929
cc/claude-haiku-4-5-20251001
Pro Tip: Use Opus for complex tasks, Sonnet for speed. 9Router tracks quota per model!
Dashboard → Providers → Connect Codex
→ OAuth login (port 1455)
→ 5-hour + weekly reset
Models:
cx/gpt-5.2-codex
cx/gpt-5.1-codex-max
Dashboard → Providers → Connect Gemini CLI
→ Google OAuth
→ 180K completions/month + 1K/day
Models:
gc/gemini-3-flash-preview
gc/gemini-2.5-pro
Best Value: Huge free tier! Use this before paid tiers.
Dashboard → Providers → Connect GitHub
→ OAuth via GitHub
→ Monthly reset (1st of month)
Models:
gh/gpt-5
gh/claude-4.5-sonnet
gh/gemini-3-pro
glmyour-keyUse: glm/glm-4.7
Pro Tip: Coding Plan offers 3× quota at 1/7 cost! Reset daily 10:00 AM.
Use: minimax/MiniMax-M2.1
Pro Tip: Cheapest option for long context (1M tokens)!
Use: kimi/kimi-latest
Pro Tip: Fixed $9/month for 10M tokens = $0.90/1M effective cost!
Dashboard → Connect iFlow
→ iFlow OAuth login
→ Unlimited usage
Models:
if/kimi-k2-thinking
if/qwen3-coder-plus
if/glm-4.7
if/minimax-m2
if/deepseek-r1
Dashboard → Connect Qwen
→ Device code authorization
→ Unlimited usage
Models:
qw/qwen3-coder-plus
qw/qwen3-coder-flash
Dashboard → Connect Kiro
→ AWS Builder ID, AWS IAM Identity Center, Google, GitHub
→ Unlimited usage
Models:
kr/claude-sonnet-4.5
kr/claude-haiku-4.5
Dashboard → Combos → Create New
Name: premium-coding
Models:
1. cc/claude-opus-4-6 (Subscription primary)
2. glm/glm-4.7 (Cheap backup, $0.6/1M)
3. minimax/MiniMax-M2.1 (Cheapest fallback, $0.20/1M)
Use in CLI: premium-coding
Monthly cost example (100M tokens):
80M via Claude (subscription): $0 extra
15M via GLM: $9
5M via MiniMax: $1
Total: $10 + your subscription
Name: free-combo
Models:
1. gc/gemini-3-flash-preview (180K free/month)
2. if/kimi-k2-thinking (unlimited)
3. qw/qwen3-coder-plus (unlimited)
Cost: $0 forever!
Settings → Models → Advanced:
OpenAI API Base URL: http://localhost:20128/v1
OpenAI API Key: [from 9router dashboard]
Model: cc/claude-opus-4-6
Or use combo: premium-coding
Edit ~/.claude/config.json:
{
"anthropic_api_base": "http://localhost:20128/v1",
"anthropic_api_key": "your-9router-api-key"
}
export OPENAI_BASE_URL="http://localhost:20128"
export OPENAI_API_KEY="your-9router-api-key"
codex "your prompt"
Option 1 — Dashboard (recommended):
Dashboard → CLI Tools → OpenClaw → Select Model → Apply
Option 2 — Manual: Edit ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "9router/if/glm-4.7"
}
}
},
"models": {
"providers": {
"9router": {
"baseUrl": "http://127.0.0.1:20128/v1",
"apiKey": "sk_9router",
"api": "openai-completions",
"models": [
{
"id": "if/glm-4.7",
"name": "glm-4.7"
}
]
}
}
}
}
Note: OpenClaw only works with local 9Router. Use
127.0.0.1instead oflocalhostto avoid IPv6 resolution issues.
Provider: OpenAI Compatible
Base URL: http://localhost:20128/v1
API Key: [from dashboard]
Model: cc/claude-opus-4-6
# Clone and install
git clone https://github.com/decolua/9router.git
cd 9router
npm install
npm run build
# Configure
export JWT_SECRET="your-secure-secret-change-this"
export INITIAL_PASSWORD="your-password"
export DATA_DIR="/var/lib/9router"
export PORT="20128"
export HOSTNAME="0.0.0.0"
export NODE_ENV="production"
export NEXT_PUBLIC_BASE_URL="http://localhost:20128"
export NEXT_PUBLIC_CLOUD_URL="https://9router.com"
export API_KEY_SECRET="endpoint-proxy-api-key-secret"
export MACHINE_ID_SALT="endpoint-proxy-salt"
# Start
npm run start
# Or use PM2
npm install -g pm2
pm2 start npm --name 9router -- start
pm2 save
pm2 startup
# Build image (from repository root)
docker build -t 9router .
# Run container (command used in current setup)
docker run -d \
--name 9router \
-p 20128:20128 \
--env-file /root/dev/9router/.env \
-v 9router-data:/app/data \
-v 9router-usage:/root/.9router \
9router
Portable command (if you are already at repository root):
docker run -d \
--name 9router \
-p 20128:20128 \
--env-file ./.env \
-v 9router-data:/app/data \
-v 9router-usage:/root/.9router \
9router
Container defaults:
PORT=20128HOSTNAME=0.0.0.0Useful commands:
docker logs -f 9router
docker restart 9router
docker stop 9router && docker rm 9router
| Variable | Default | Description |
|---|---|---|
JWT_SECRET | Auto-generated per process when unset | JWT signing secret for dashboard auth cookie (set a stable random value in production so sessions survive restarts) |
INITIAL_PASSWORD | 12345677 | First login password when no saved hash exists |
DATA_DIR | ~/.9router | Main app database location (db.json) |
PORT | framework default | Service port (20128 in examples) |
HOSTNAME | framework default | Bind host (Docker defaults to 0.0.0.0) |
NODE_ENV | runtime default | Set production for deploy |
BASE_URL | http://localhost:20128 | Server-side internal base URL used by cloud sync jobs |
CLOUD_URL | https://9router.com | Server-side cloud sync endpoint base URL |
NEXT_PUBLIC_BASE_URL | http://localhost:3000 | Backward-compatible/public base URL (prefer BASE_URL for server runtime) |
NEXT_PUBLIC_CLOUD_URL | https://9router.com | Backward-compatible/public cloud URL (prefer CLOUD_URL for server runtime) |
API_KEY_SECRET | endpoint-proxy-api-key-secret | HMAC secret for generated API keys |
MACHINE_ID_SALT | endpoint-proxy-salt | Salt for stable machine ID hashing |
ENABLE_REQUEST_LOGS | false | Enables request/response logs under logs/ |
AUTH_COOKIE_SECURE | false | Force Secure auth cookie (set true behind HTTPS reverse proxy) |
REQUIRE_API_KEY | false | Enforce Bearer API key on /v1/* routes (recommended for internet-exposed deploys) |
HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY | empty | Optional outbound proxy for upstream provider calls |
REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_DB, REDIS_USERNAME, REDIS_PASSWORD, REDIS_TLS, REDIS_CLIENT_NAME, REDIS_CONNECT_TIMEOUT_MS | empty | Optional Redis backend for hot quota/account state; if unset, local fallback is used |
Notes:
http_proxy, https_proxy, all_proxy, no_proxy..env is not baked into Docker image (.dockerignore); inject runtime config with --env-file or -e.APPDATA can be used for local storage path resolution.INSTANCE_NAME appears in older docs/env templates, but is currently not used at runtime.By default, dashboard access from localhost and Docker networks is allowed. Configure custom IPs in Settings or data/db.json:
{
"ipWhitelist": ["127.0.0.1", "::1", "172.17.0.0/16", "10.0.0.0/8"]
}
Supports:
127.0.0.1, ::1172.17.0.0/16, 10.0.0.0/8If behind nginx/Cloudflare, enable trusted proxy to read X-Forwarded-For:
{
"trustedProxyEnabled": true
}
⚠️ Only enable if you trust the proxy. Malicious proxies can spoof IPs.
Security events are logged to data/audit.log (default: enabled, 10MB max):
{
"auditLogEnabled": true,
"auditLogMaxSize": 10485760
}
Events logged:
Login endpoint: 5 attempts per IP per 15 minutes. Automatic cleanup every 5 minutes.
See docs/security/DASHBOARD_AUTH.md for complete security documentation.
${DATA_DIR}/db.json (providers, combos, aliases, keys, settings), managed by src/lib/localDb.js.~/.9router/usage.json and ~/.9router/log.txt, managed by src/lib/usageDb.js.<repo>/logs/... when ENABLE_REQUEST_LOGS=true.~/.9router path logic and is independent from DATA_DIR.REDIS_URL or REDIS_HOST is configured; otherwise the app keeps the current local fallback path.Claude Code (cc/) - Pro/Max:
cc/claude-opus-4-6cc/claude-sonnet-4-5-20250929cc/claude-haiku-4-5-20251001Codex (cx/) - Plus/Pro:
cx/gpt-5.2-codexcx/gpt-5.1-codex-maxGemini CLI (gc/) - FREE:
gc/gemini-3-flash-previewgc/gemini-2.5-proGitHub Copilot (gh/):
gh/gpt-5gh/claude-4.5-sonnetGLM (glm/) - $0.6/1M:
glm/glm-4.7MiniMax (minimax/) - $0.2/1M:
minimax/MiniMax-M2.1iFlow (if/) - FREE:
if/kimi-k2-thinkingif/qwen3-coder-plusif/deepseek-r1Qwen (qw/) - FREE:
qw/qwen3-coder-plusqw/qwen3-coder-flashKiro (kr/) - FREE:
kr/claude-sonnet-4.5kr/claude-haiku-4.5"Language model did not provide messages"
Rate limiting
cc/claude-opus-4-6 → glm/glm-4.7 → if/kimi-k2-thinkingOAuth token expired
High costs
Dashboard opens on wrong port
PORT=20128 and NEXT_PUBLIC_BASE_URL=http://localhost:20128First login not working
INITIAL_PASSWORD in .env12345677No request logs under logs/
ENABLE_REQUEST_LOGS=truePOST http://localhost:20128/v1/chat/completions
Authorization: Bearer your-api-key
Content-Type: application/json
{
"model": "cc/claude-opus-4-6",
"messages": [
{"role": "user", "content": "Write a function to..."}
],
"stream": true
}
GET http://localhost:20128/v1/models
Authorization: Bearer your-api-key
→ Returns all models + combos in OpenAI format
Thanks to all contributors who helped make 9Router better!
OmniRoute — A full-featured TypeScript fork of 9Router. Adds 36+ providers, 4-tier auto-fallback, multi-modal APIs (images, embeddings, audio, TTS), circuit breaker, semantic cache, LLM evaluations, and a polished dashboard. 368+ unit tests. Available via npm and Docker.
Special thanks to CLIProxyAPI - the original Go implementation that inspired this JavaScript port.
MIT License - see LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:750fbdb5d43c36ee6651ec4f7d4072adc30df1fc6f9f6c58a1cc2f9764f29296