@yina-npm/openrouterx 0.4.52 → 0.4.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -1245
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +1 -1
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next/server/app/api/users/[id]/route.js +1 -1
- package/app/.next/server/app/api/users/route.js +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next/server/app/api/version/update/route.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +1 -1
- package/app/.next/server/chunks/1350.js +1 -1
- package/app/.next/server/chunks/3110.js +1 -1
- package/app/.next/server/chunks/3493.js +1 -1
- package/app/.next/server/chunks/412.js +1 -1
- package/app/.next/server/chunks/7177.js +1 -1
- package/app/.next/server/chunks/7595.js +1 -1
- package/app/.next/server/chunks/7930.js +5 -2
- package/app/.next/server/chunks/8760.js +1 -1
- package/app/.next/server/chunks/9489.js +1 -1
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +1 -1
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/static/chunks/1321-10e8aa266aa71e22.js +1 -0
- package/app/.next/static/chunks/4072-fdb34c3bf82582e6.js +6 -0
- package/app/.next/static/chunks/{5095-c2bb7e2fc99ab8c3.js → 5095-47fe70cd930f3c59.js} +2 -2
- package/app/.next/static/chunks/{5497-bebd4378b1048022.js → 5497-b59396fb56e7b9b1.js} +1 -1
- package/app/.next/static/css/{402ee8646e1afa89.css → 9b92fc8235e99d1e.css} +1 -1
- package/app/package.json +2 -2
- package/app/public/i18n/literals/ar.json +25 -1
- package/app/public/i18n/literals/bn.json +25 -1
- package/app/public/i18n/literals/cs.json +25 -1
- package/app/public/i18n/literals/da.json +25 -1
- package/app/public/i18n/literals/de.json +25 -1
- package/app/public/i18n/literals/el.json +25 -1
- package/app/public/i18n/literals/es.json +25 -1
- package/app/public/i18n/literals/fi.json +25 -1
- package/app/public/i18n/literals/fr.json +25 -1
- package/app/public/i18n/literals/he.json +25 -1
- package/app/public/i18n/literals/hi.json +25 -1
- package/app/public/i18n/literals/hu.json +25 -1
- package/app/public/i18n/literals/id.json +25 -1
- package/app/public/i18n/literals/it.json +25 -1
- package/app/public/i18n/literals/ja.json +25 -1
- package/app/public/i18n/literals/ko.json +25 -1
- package/app/public/i18n/literals/nl.json +25 -1
- package/app/public/i18n/literals/no.json +25 -1
- package/app/public/i18n/literals/pl.json +25 -1
- package/app/public/i18n/literals/pt-BR.json +25 -1
- package/app/public/i18n/literals/pt-PT.json +25 -1
- package/app/public/i18n/literals/ro.json +25 -1
- package/app/public/i18n/literals/ru.json +25 -1
- package/app/public/i18n/literals/sv.json +25 -1
- package/app/public/i18n/literals/th.json +25 -1
- package/app/public/i18n/literals/tl.json +25 -1
- package/app/public/i18n/literals/tr.json +25 -1
- package/app/public/i18n/literals/uk.json +25 -1
- package/app/public/i18n/literals/ur.json +25 -1
- package/app/public/i18n/literals/vi.json +25 -1
- package/app/public/i18n/literals/zh-CN.json +26 -1
- package/app/public/i18n/literals/zh-TW.json +25 -1
- package/package.json +3 -3
- package/app/.next/static/chunks/1321-621ed3470478397e.js +0 -1
- package/app/.next/static/chunks/4072-cc92fb1222a2752b.js +0 -3
- /package/app/.next/static/{Q5oB2dEL7XeWBhjwqT_vo → 48OCpyZEnW_7tu0tLGvSX}/_buildManifest.js +0 -0
- /package/app/.next/static/{Q5oB2dEL7XeWBhjwqT_vo → 48OCpyZEnW_7tu0tLGvSX}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,1318 +1,166 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="./images/9router.png?1" alt="9Router Dashboard" width="800"/>
|
|
3
|
-
|
|
4
|
-
# 9Router - FREE AI Router & Token Saver
|
|
5
|
-
|
|
6
|
-
**Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models.**
|
|
7
|
-
|
|
8
|
-
**Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.**
|
|
9
|
-
|
|
10
|
-
[](https://www.npmjs.com/package/9router)
|
|
11
|
-
[](https://www.npmjs.com/package/9router)
|
|
12
|
-
[](https://hub.docker.com/r/decolua/9router)
|
|
13
|
-
[](https://github.com/decolua/9router/pkgs/container/9router)
|
|
14
|
-
[](https://github.com/decolua/9router/blob/main/LICENSE)
|
|
1
|
+
# openrouterX
|
|
15
2
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[🚀 Quick Start](#-quick-start) • [💡 Features](#-key-features) • [📖 Setup](#-setup-guide) • [🌐 Website](https://9router.com)
|
|
3
|
+
openrouterX is a local AI provider router and management dashboard for coding
|
|
4
|
+
agents and AI developer tools.
|
|
19
5
|
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
It exposes OpenAI-compatible, Anthropic-compatible, Gemini-compatible, and
|
|
7
|
+
provider-scoped endpoints, then routes requests to the provider accounts you
|
|
8
|
+
connect in the dashboard. It is designed for local and self-hosted workflows
|
|
9
|
+
where you want one endpoint, many provider accounts, quota visibility, and
|
|
10
|
+
predictable fallback behavior.
|
|
22
11
|
|
|
23
|
-
|
|
12
|
+
[npm package](https://www.npmjs.com/package/@yina-npm/openrouterx)
|
|
24
13
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
**Stop wasting money, tokens and hitting limits:**
|
|
28
|
-
|
|
29
|
-
- ❌ Subscription quota expires unused every month
|
|
30
|
-
- ❌ Rate limits stop you mid-coding
|
|
31
|
-
- ❌ Tool outputs (git diff, grep, ls...) burn tokens fast
|
|
32
|
-
- ❌ Expensive APIs ($20-50/month per provider)
|
|
33
|
-
- ❌ Manual switching between providers
|
|
34
|
-
|
|
35
|
-
**9Router solves this:**
|
|
36
|
-
|
|
37
|
-
- ✅ **RTK Token Saver** - Auto-compress tool_result content, save 20-40% tokens per request
|
|
38
|
-
- ✅ **Maximize subscriptions** - Track quota, use every bit before reset
|
|
39
|
-
- ✅ **Auto fallback** - Subscription → Cheap → Free, zero downtime
|
|
40
|
-
- ✅ **Multi-account** - Round-robin between accounts per provider
|
|
41
|
-
- ✅ **Universal** - Works with Claude Code, Codex, Cursor, Cline, any CLI tool
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## 🔄 How It Works
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
┌─────────────┐
|
|
49
|
-
│ Your CLI │ (Claude Code, Codex, OpenClaw, Cursor, Cline...)
|
|
50
|
-
│ Tool │
|
|
51
|
-
└──────┬──────┘
|
|
52
|
-
│ http://localhost:20128/v1
|
|
53
|
-
↓
|
|
54
|
-
┌─────────────────────────────────────────────┐
|
|
55
|
-
│ 9Router (Smart Router) │
|
|
56
|
-
│ • RTK Token Saver (cut tool_result tokens) │
|
|
57
|
-
│ • Format translation (OpenAI ↔ Claude) │
|
|
58
|
-
│ • Quota tracking │
|
|
59
|
-
│ • Auto token refresh │
|
|
60
|
-
└──────┬──────────────────────────────────────┘
|
|
61
|
-
│
|
|
62
|
-
├─→ [Tier 1: SUBSCRIPTION] Claude Code, Codex, GitHub Copilot
|
|
63
|
-
│ ↓ quota exhausted
|
|
64
|
-
├─→ [Tier 2: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)
|
|
65
|
-
│ ↓ budget limit
|
|
66
|
-
└─→ [Tier 3: FREE] Kiro, OpenCode Free, Vertex ($300 credits)
|
|
67
|
-
|
|
68
|
-
Result: Never stop coding, minimal cost + 20-40% token savings via RTK
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## ⚡ Quick Start
|
|
74
|
-
|
|
75
|
-
**1. Install globally:**
|
|
14
|
+
## Install
|
|
76
15
|
|
|
77
16
|
```bash
|
|
78
|
-
npm install -g
|
|
79
|
-
|
|
17
|
+
npm install -g @yina-npm/openrouterx
|
|
18
|
+
openrouterX
|
|
80
19
|
```
|
|
81
20
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
**2. Connect a FREE provider (no signup needed):**
|
|
85
|
-
|
|
86
|
-
Dashboard → Providers → Connect **Kiro AI** (free Claude unlimited) or **OpenCode Free** (no auth) → Done!
|
|
21
|
+
The dashboard starts on:
|
|
87
22
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
Claude Code/Codex/OpenClaw/Cursor/Cline Settings:
|
|
92
|
-
Endpoint: http://localhost:20128/v1
|
|
93
|
-
API Key: [copy from dashboard]
|
|
94
|
-
Model: kr/claude-sonnet-4.5
|
|
23
|
+
```text
|
|
24
|
+
http://localhost:20502/dashboard
|
|
95
25
|
```
|
|
96
26
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
**Alternative: run from source (this repository):**
|
|
100
|
-
|
|
101
|
-
This repository package is private (`9router-app`), so source/Docker execution is the expected local development path.
|
|
27
|
+
Useful commands:
|
|
102
28
|
|
|
103
29
|
```bash
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Production mode:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
npm run build
|
|
113
|
-
PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Default URLs:
|
|
117
|
-
- Dashboard: `http://localhost:20128/dashboard`
|
|
118
|
-
- OpenAI-compatible API: `http://localhost:20128/v1`
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Video Guides
|
|
123
|
-
|
|
124
|
-
<div align="center">
|
|
125
|
-
|
|
126
|
-
<table>
|
|
127
|
-
<tr>
|
|
128
|
-
<td align="center" width="320">
|
|
129
|
-
<a href="https://www.youtube.com/watch?v=raEyZPg5xE0">
|
|
130
|
-
<img src="https://img.youtube.com/vi/raEyZPg5xE0/maxresdefault.jpg" alt="9Router Setup Tutorial" width="300"/>
|
|
131
|
-
</a><br/>
|
|
132
|
-
<b>🇺🇸 English</b><br/>
|
|
133
|
-
<sub>9Router + Claude Code FREE Setup<br/>by <a href="https://www.youtube.com/@BuildAIWithHamid">Build AI With Hamid</a></sub>
|
|
134
|
-
</td>
|
|
135
|
-
<td align="center" width="320">
|
|
136
|
-
<a href="https://www.youtube.com/watch?v=X69n5Lm06Yw">
|
|
137
|
-
<img src="https://img.youtube.com/vi/X69n5Lm06Yw/maxresdefault.jpg" alt="Tiết kiệm chi phí LLM với 9Router" width="300"/>
|
|
138
|
-
</a><br/>
|
|
139
|
-
<b>🇻🇳 Tiếng Việt</b><br/>
|
|
140
|
-
<sub>Tiết kiệm chi phí LLM cho OpenClaw với 9Router<br/>by <a href="https://www.youtube.com/c/M%C3%ACAIblog">Mì AI</a></sub>
|
|
141
|
-
</td>
|
|
142
|
-
<td align="center" width="320">
|
|
143
|
-
<a href="https://www.youtube.com/watch?v=o3qYCyjrFYg">
|
|
144
|
-
<img src="https://img.youtube.com/vi/o3qYCyjrFYg/maxresdefault.jpg" alt="Claude Code FREE Forever" width="300"/>
|
|
145
|
-
</a><br/>
|
|
146
|
-
<b>🇺🇸 English</b><br/>
|
|
147
|
-
<sub>Claude Code FREE Forever — Unlimited Models<br/>by <a href="https://www.youtube.com/@BuildAIWithHamid">Build AI With Hamid</a></sub>
|
|
148
|
-
</td>
|
|
149
|
-
</tr>
|
|
150
|
-
<tr>
|
|
151
|
-
<td align="center" width="320">
|
|
152
|
-
<a href="https://www.youtube.com/watch?v=Ttpc26m39Dw">
|
|
153
|
-
<img src="https://img.youtube.com/vi/Ttpc26m39Dw/maxresdefault.jpg" alt="Claude CLI Free Setup" width="300"/>
|
|
154
|
-
</a><br/>
|
|
155
|
-
<b>🇺🇸 English</b><br/>
|
|
156
|
-
<sub>Claude CLI Free Setup with 9Router 🚀<br/>by <a href="https://www.youtube.com/@CodeVerseSoban">CodeVerse Soban</a></sub>
|
|
157
|
-
</td>
|
|
158
|
-
<td align="center" width="320">
|
|
159
|
-
<a href="https://www.youtube.com/watch?v=G-5A_D5Pm6Y">
|
|
160
|
-
<img src="https://img.youtube.com/vi/G-5A_D5Pm6Y/maxresdefault.jpg" alt="Cài đặt OpenClaw Free A-Z" width="300"/>
|
|
161
|
-
</a><br/>
|
|
162
|
-
<b>🇻🇳 Tiếng Việt</b><br/>
|
|
163
|
-
<sub>Cài Đặt OpenClaw Free Từ A-Z + 9Router<br/>by <a href="https://www.youtube.com/@maigia">Mai Gia</a></sub>
|
|
164
|
-
</td>
|
|
165
|
-
<td align="center" width="320">
|
|
166
|
-
<a href="https://www.youtube.com/watch?v=JXmg8_gccgE">
|
|
167
|
-
<img src="https://img.youtube.com/vi/JXmg8_gccgE/maxresdefault.jpg" alt="FREE OpenClaw with Claude Opus" width="300"/>
|
|
168
|
-
</a><br/>
|
|
169
|
-
<b>🇺🇸 English</b><br/>
|
|
170
|
-
<sub>FREE OpenClaw + Claude Opus 4.6<br/>by <a href="https://www.youtube.com/@BuildAIWithHamid">Build AI With Hamid</a></sub>
|
|
171
|
-
</td>
|
|
172
|
-
</tr>
|
|
173
|
-
</table>
|
|
174
|
-
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
> 🎬 **Made a video about 9Router?** Submit a [Pull Request](https://github.com/decolua/9router/pulls) adding your video to this section — we'll merge it!
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## 🛠️ Supported CLI Tools
|
|
182
|
-
|
|
183
|
-
9Router works seamlessly with all major AI coding tools:
|
|
184
|
-
|
|
185
|
-
<div align="center">
|
|
186
|
-
<table>
|
|
187
|
-
<tr>
|
|
188
|
-
<td align="center" width="120">
|
|
189
|
-
<img src="./public/providers/claude.png" width="60" alt="Claude Code"/><br/>
|
|
190
|
-
<b>Claude-Code</b>
|
|
191
|
-
</td>
|
|
192
|
-
<td align="center" width="120">
|
|
193
|
-
<img src="./public/providers/openclaw.png" width="60" alt="OpenClaw"/><br/>
|
|
194
|
-
<b>OpenClaw</b>
|
|
195
|
-
</td>
|
|
196
|
-
<td align="center" width="120">
|
|
197
|
-
<img src="./public/providers/codex.png" width="60" alt="Codex"/><br/>
|
|
198
|
-
<b>Codex</b>
|
|
199
|
-
</td>
|
|
200
|
-
<td align="center" width="120">
|
|
201
|
-
<img src="./public/providers/opencode.png" width="60" alt="OpenCode"/><br/>
|
|
202
|
-
<b>OpenCode</b>
|
|
203
|
-
</td>
|
|
204
|
-
<td align="center" width="120">
|
|
205
|
-
<img src="./public/providers/cursor.png" width="60" alt="Cursor"/><br/>
|
|
206
|
-
<b>Cursor</b>
|
|
207
|
-
</td>
|
|
208
|
-
<td align="center" width="120">
|
|
209
|
-
<img src="./public/providers/antigravity.png" width="60" alt="Antigravity"/><br/>
|
|
210
|
-
<b>Antigravity</b>
|
|
211
|
-
</td>
|
|
212
|
-
</tr>
|
|
213
|
-
<tr>
|
|
214
|
-
<td align="center" width="120">
|
|
215
|
-
<img src="./public/providers/cline.png" width="60" alt="Cline"/><br/>
|
|
216
|
-
<b>Cline</b>
|
|
217
|
-
</td>
|
|
218
|
-
<td align="center" width="120">
|
|
219
|
-
<img src="./public/providers/continue.png" width="60" alt="Continue"/><br/>
|
|
220
|
-
<b>Continue</b>
|
|
221
|
-
</td>
|
|
222
|
-
<td align="center" width="120">
|
|
223
|
-
<img src="./public/providers/droid.png" width="60" alt="Droid"/><br/>
|
|
224
|
-
<b>Droid</b>
|
|
225
|
-
</td>
|
|
226
|
-
<td align="center" width="120">
|
|
227
|
-
<img src="./public/providers/roo.png" width="60" alt="Roo"/><br/>
|
|
228
|
-
<b>Roo</b>
|
|
229
|
-
</td>
|
|
230
|
-
<td align="center" width="120">
|
|
231
|
-
<img src="./public/providers/copilot.png" width="60" alt="Copilot"/><br/>
|
|
232
|
-
<b>Copilot</b>
|
|
233
|
-
</td>
|
|
234
|
-
<td align="center" width="120">
|
|
235
|
-
<img src="./public/providers/kilocode.png" width="60" alt="Kilo Code"/><br/>
|
|
236
|
-
<b>Kilo Code</b>
|
|
237
|
-
</td>
|
|
238
|
-
</tr>
|
|
239
|
-
</table>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
## 🌐 Supported Providers
|
|
245
|
-
|
|
246
|
-
### 🔐 OAuth Providers
|
|
247
|
-
|
|
248
|
-
<div align="center">
|
|
249
|
-
<table>
|
|
250
|
-
<tr>
|
|
251
|
-
<td align="center" width="120">
|
|
252
|
-
<img src="./public/providers/claude.png" width="60" alt="Claude Code"/><br/>
|
|
253
|
-
<b>Claude-Code</b>
|
|
254
|
-
</td>
|
|
255
|
-
<td align="center" width="120">
|
|
256
|
-
<img src="./public/providers/antigravity.png" width="60" alt="Antigravity"/><br/>
|
|
257
|
-
<b>Antigravity</b>
|
|
258
|
-
</td>
|
|
259
|
-
<td align="center" width="120">
|
|
260
|
-
<img src="./public/providers/codex.png" width="60" alt="Codex"/><br/>
|
|
261
|
-
<b>Codex</b>
|
|
262
|
-
</td>
|
|
263
|
-
<td align="center" width="120">
|
|
264
|
-
<img src="./public/providers/github.png" width="60" alt="GitHub"/><br/>
|
|
265
|
-
<b>GitHub</b>
|
|
266
|
-
</td>
|
|
267
|
-
<td align="center" width="120">
|
|
268
|
-
<img src="./public/providers/cursor.png" width="60" alt="Cursor"/><br/>
|
|
269
|
-
<b>Cursor</b>
|
|
270
|
-
</td>
|
|
271
|
-
</tr>
|
|
272
|
-
</table>
|
|
273
|
-
</div>
|
|
274
|
-
|
|
275
|
-
### 🆓 Free Providers
|
|
276
|
-
|
|
277
|
-
<div align="center">
|
|
278
|
-
<table>
|
|
279
|
-
<tr>
|
|
280
|
-
<td align="center" width="150">
|
|
281
|
-
<img src="./public/providers/kiro.png" width="70" alt="Kiro"/><br/>
|
|
282
|
-
<b>Kiro AI</b><br/>
|
|
283
|
-
<sub>Claude 4.5 + GLM-5 + MiniMax<br/>Unlimited FREE</sub>
|
|
284
|
-
</td>
|
|
285
|
-
<td align="center" width="150">
|
|
286
|
-
<img src="./public/providers/opencode.png" width="70" alt="OpenCode Free"/><br/>
|
|
287
|
-
<b>OpenCode Free</b><br/>
|
|
288
|
-
<sub>No auth • Auto-fetch models<br/>Unlimited FREE</sub>
|
|
289
|
-
</td>
|
|
290
|
-
<td align="center" width="150">
|
|
291
|
-
<img src="./public/providers/gemini.png" width="70" alt="Vertex AI"/><br/>
|
|
292
|
-
<b>Vertex AI</b><br/>
|
|
293
|
-
<sub>Gemini 3 Pro + GLM-5 + DeepSeek<br/>$300 credits free</sub>
|
|
294
|
-
</td>
|
|
295
|
-
</tr>
|
|
296
|
-
</table>
|
|
297
|
-
</div>
|
|
298
|
-
|
|
299
|
-
> **Note:** iFlow, Qwen and Gemini CLI free tiers were discontinued in 2026. Use Kiro / OpenCode Free / Vertex instead.
|
|
300
|
-
|
|
301
|
-
### 🔑 API Key Providers (40+)
|
|
302
|
-
|
|
303
|
-
<div align="center">
|
|
304
|
-
<table>
|
|
305
|
-
<tr>
|
|
306
|
-
<td align="center" width="100">
|
|
307
|
-
<img src="./public/providers/openrouter.png" width="50" alt="OpenRouter"/><br/>
|
|
308
|
-
<sub>OpenRouter</sub>
|
|
309
|
-
</td>
|
|
310
|
-
<td align="center" width="100">
|
|
311
|
-
<img src="./public/providers/glm.png" width="50" alt="GLM"/><br/>
|
|
312
|
-
<sub>GLM</sub>
|
|
313
|
-
</td>
|
|
314
|
-
<td align="center" width="100">
|
|
315
|
-
<img src="./public/providers/kimi.png" width="50" alt="Kimi"/><br/>
|
|
316
|
-
<sub>Kimi</sub>
|
|
317
|
-
</td>
|
|
318
|
-
<td align="center" width="100">
|
|
319
|
-
<img src="./public/providers/minimax.png" width="50" alt="MiniMax"/><br/>
|
|
320
|
-
<sub>MiniMax</sub>
|
|
321
|
-
</td>
|
|
322
|
-
<td align="center" width="100">
|
|
323
|
-
<img src="./public/providers/openai.png" width="50" alt="OpenAI"/><br/>
|
|
324
|
-
<sub>OpenAI</sub>
|
|
325
|
-
</td>
|
|
326
|
-
<td align="center" width="100">
|
|
327
|
-
<img src="./public/providers/anthropic.png" width="50" alt="Anthropic"/><br/>
|
|
328
|
-
<sub>Anthropic</sub>
|
|
329
|
-
</td>
|
|
330
|
-
</tr>
|
|
331
|
-
<tr>
|
|
332
|
-
<td align="center" width="100">
|
|
333
|
-
<img src="./public/providers/gemini.png" width="50" alt="Gemini"/><br/>
|
|
334
|
-
<sub>Gemini</sub>
|
|
335
|
-
</td>
|
|
336
|
-
<td align="center" width="100">
|
|
337
|
-
<img src="./public/providers/deepseek.png" width="50" alt="DeepSeek"/><br/>
|
|
338
|
-
<sub>DeepSeek</sub>
|
|
339
|
-
</td>
|
|
340
|
-
<td align="center" width="100">
|
|
341
|
-
<img src="./public/providers/groq.png" width="50" alt="Groq"/><br/>
|
|
342
|
-
<sub>Groq</sub>
|
|
343
|
-
</td>
|
|
344
|
-
<td align="center" width="100">
|
|
345
|
-
<img src="./public/providers/xai.png" width="50" alt="xAI"/><br/>
|
|
346
|
-
<sub>xAI</sub>
|
|
347
|
-
</td>
|
|
348
|
-
<td align="center" width="100">
|
|
349
|
-
<img src="./public/providers/mistral.png" width="50" alt="Mistral"/><br/>
|
|
350
|
-
<sub>Mistral</sub>
|
|
351
|
-
</td>
|
|
352
|
-
<td align="center" width="100">
|
|
353
|
-
<img src="./public/providers/perplexity.png" width="50" alt="Perplexity"/><br/>
|
|
354
|
-
<sub>Perplexity</sub>
|
|
355
|
-
</td>
|
|
356
|
-
</tr>
|
|
357
|
-
<tr>
|
|
358
|
-
<td align="center" width="100">
|
|
359
|
-
<img src="./public/providers/together.png" width="50" alt="Together"/><br/>
|
|
360
|
-
<sub>Together AI</sub>
|
|
361
|
-
</td>
|
|
362
|
-
<td align="center" width="100">
|
|
363
|
-
<img src="./public/providers/fireworks.png" width="50" alt="Fireworks"/><br/>
|
|
364
|
-
<sub>Fireworks</sub>
|
|
365
|
-
</td>
|
|
366
|
-
<td align="center" width="100">
|
|
367
|
-
<img src="./public/providers/cerebras.png" width="50" alt="Cerebras"/><br/>
|
|
368
|
-
<sub>Cerebras</sub>
|
|
369
|
-
</td>
|
|
370
|
-
<td align="center" width="100">
|
|
371
|
-
<img src="./public/providers/cohere.png" width="50" alt="Cohere"/><br/>
|
|
372
|
-
<sub>Cohere</sub>
|
|
373
|
-
</td>
|
|
374
|
-
<td align="center" width="100">
|
|
375
|
-
<img src="./public/providers/nvidia.png" width="50" alt="NVIDIA"/><br/>
|
|
376
|
-
<sub>NVIDIA</sub>
|
|
377
|
-
</td>
|
|
378
|
-
<td align="center" width="100">
|
|
379
|
-
<img src="./public/providers/siliconflow.png" width="50" alt="SiliconFlow"/><br/>
|
|
380
|
-
<sub>SiliconFlow</sub>
|
|
381
|
-
</td>
|
|
382
|
-
</tr>
|
|
383
|
-
</table>
|
|
384
|
-
<p><i>...and 20+ more providers including Nebius, Chutes, Hyperbolic, and custom OpenAI/Anthropic compatible endpoints</i></p>
|
|
385
|
-
</div>
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## 💡 Key Features
|
|
390
|
-
|
|
391
|
-
| Feature | What It Does | Why It Matters |
|
|
392
|
-
|---------|--------------|----------------|
|
|
393
|
-
| 🚀 **RTK Token Saver** ([RTK](https://github.com/rtk-ai/rtk) ⭐40K) | Compress tool outputs (`git diff`, `grep`, `ls`, `tree`...) before sending to LLM | Save **20-40% input tokens** per request |
|
|
394
|
-
| 🪨 **Caveman Mode** ([Caveman](https://github.com/JuliusBrussee/caveman) ⭐52K) | Inject caveman-speak prompt → LLM replies terse, technical substance preserved | Save **up to 65% output tokens** |
|
|
395
|
-
| 🎯 **Smart 3-Tier Fallback** | Auto-route: Subscription → Cheap → Free | Never stop coding, zero downtime |
|
|
396
|
-
| 📊 **Real-Time Quota Tracking** | Live token count + reset countdown | Maximize subscription value |
|
|
397
|
-
| 🔄 **Format Translation** | OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro ↔ Vertex | Works with any CLI tool |
|
|
398
|
-
| 👥 **Multi-Account Support** | Multiple accounts per provider | Load balancing + redundancy |
|
|
399
|
-
| 🔄 **Auto Token Refresh** | OAuth tokens refresh automatically | No manual re-login needed |
|
|
400
|
-
| 🎨 **Custom Combos** | Create unlimited model combinations | Tailor fallback to your needs |
|
|
401
|
-
| 📝 **Request Logging** | Debug mode with full request/response logs | Troubleshoot issues easily |
|
|
402
|
-
| 💾 **Cloud Sync** | Sync config across devices | Same setup everywhere |
|
|
403
|
-
| 📊 **Usage Analytics** | Track tokens, cost, trends over time | Optimize spending |
|
|
404
|
-
| 🌐 **Deploy Anywhere** | Localhost, VPS, Docker, Cloudflare Workers | Flexible deployment options |
|
|
405
|
-
|
|
406
|
-
<details>
|
|
407
|
-
<summary><b>📖 Feature Details</b></summary>
|
|
408
|
-
|
|
409
|
-
### 🚀 RTK Token Saver
|
|
410
|
-
|
|
411
|
-
Tool outputs (`git diff`, `grep`, `find`, `ls`, `tree`, log dumps...) often eat 30-50% of your prompt budget. RTK detects them and applies smart, lossless compression **before** the request hits the LLM:
|
|
412
|
-
|
|
413
|
-
- **Filters:** `git-diff`, `git-status`, `grep`, `find`, `ls`, `tree`, `dedup-log`, `smart-truncate`, `read-numbered`, `search-list`
|
|
414
|
-
- **Auto-detect:** No config needed — RTK peeks the first 1KB of each `tool_result` and picks the right filter.
|
|
415
|
-
- **Safe by design:** If a filter fails, throws, or makes output bigger, RTK silently keeps the original text. Errors never break your request.
|
|
416
|
-
- **Universal:** Works across all formats (OpenAI, Claude, Gemini, Cursor, Kiro, OpenAI Responses) because it runs **before** any format translation.
|
|
417
|
-
- **Default ON:** Toggle anytime in Dashboard → Endpoint settings.
|
|
418
|
-
|
|
30
|
+
openrouterX --version
|
|
31
|
+
openrouterX status
|
|
32
|
+
openrouterX restart --skip-update
|
|
33
|
+
openrouterX stop
|
|
419
34
|
```
|
|
420
|
-
Without RTK: 47K tokens sent to LLM
|
|
421
|
-
With RTK: 28K tokens sent to LLM (40% saved · same context · same answer)
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
### 🎯 Smart 3-Tier Fallback
|
|
425
35
|
|
|
426
|
-
|
|
36
|
+
Runtime data is stored outside the package:
|
|
427
37
|
|
|
38
|
+
```text
|
|
39
|
+
macOS/Linux: ~/.openrouterx
|
|
40
|
+
Windows: %APPDATA%/openrouterx
|
|
428
41
|
```
|
|
429
|
-
Combo: "my-coding-stack"
|
|
430
|
-
1. cc/claude-opus-4-6 (your subscription)
|
|
431
|
-
2. glm/glm-4.7 (cheap backup, $0.6/1M)
|
|
432
|
-
3. if/kimi-k2-thinking (free fallback)
|
|
433
|
-
|
|
434
|
-
→ Auto switches when quota runs out or errors occur
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
### 📊 Real-Time Quota Tracking
|
|
438
|
-
|
|
439
|
-
- Token consumption per provider
|
|
440
|
-
- Reset countdown (5-hour, daily, weekly)
|
|
441
|
-
- Cost estimation for paid tiers
|
|
442
|
-
- Monthly spending reports
|
|
443
|
-
|
|
444
|
-
### 🔄 Format Translation
|
|
445
|
-
|
|
446
|
-
Seamless translation between formats:
|
|
447
|
-
- **OpenAI** ↔ **Claude** ↔ **Gemini** ↔ **Cursor** ↔ **Kiro** ↔ **Vertex** ↔ **Antigravity** ↔ **Ollama** ↔ **OpenAI Responses**
|
|
448
|
-
- Your CLI tool sends OpenAI format → 9Router translates → Provider receives native format
|
|
449
|
-
- Works with any tool that supports custom OpenAI endpoints
|
|
450
|
-
|
|
451
|
-
### 👥 Multi-Account Support
|
|
452
|
-
|
|
453
|
-
- Add multiple accounts per provider
|
|
454
|
-
- Auto round-robin or priority-based routing
|
|
455
|
-
- Fallback to next account when one hits quota
|
|
456
|
-
|
|
457
|
-
### 🔄 Auto Token Refresh
|
|
458
|
-
|
|
459
|
-
- OAuth tokens automatically refresh before expiration
|
|
460
|
-
- No manual re-authentication needed
|
|
461
|
-
- Seamless experience across all providers
|
|
462
|
-
|
|
463
|
-
### 🎨 Custom Combos
|
|
464
|
-
|
|
465
|
-
- Create unlimited model combinations
|
|
466
|
-
- Mix subscription, cheap, and free tiers
|
|
467
|
-
- Name your combos for easy access
|
|
468
|
-
- Share combos across devices with Cloud Sync
|
|
469
|
-
|
|
470
|
-
### 📝 Request Logging
|
|
471
|
-
|
|
472
|
-
- Enable debug mode for full request/response logs
|
|
473
|
-
- Track API calls, headers, and payloads
|
|
474
|
-
- Troubleshoot integration issues
|
|
475
|
-
- Export logs for analysis
|
|
476
|
-
|
|
477
|
-
### 💾 Cloud Sync
|
|
478
|
-
|
|
479
|
-
- Sync providers, combos, and settings across devices
|
|
480
|
-
- Automatic background sync
|
|
481
|
-
- Secure encrypted storage
|
|
482
|
-
- Access your setup from anywhere
|
|
483
|
-
|
|
484
|
-
#### Cloud Runtime Notes
|
|
485
|
-
|
|
486
|
-
- Prefer server-side cloud variables in production:
|
|
487
|
-
- `BASE_URL` (internal callback URL used by sync scheduler)
|
|
488
|
-
- `CLOUD_URL` (cloud sync endpoint base)
|
|
489
|
-
- `NEXT_PUBLIC_BASE_URL` and `NEXT_PUBLIC_CLOUD_URL` are still supported for compatibility/UI, but server runtime now prioritizes `BASE_URL`/`CLOUD_URL`.
|
|
490
|
-
- Cloud sync requests now use timeout + fail-fast behavior to avoid UI hanging when cloud DNS/network is unavailable.
|
|
491
|
-
|
|
492
|
-
### 📊 Usage Analytics
|
|
493
|
-
|
|
494
|
-
- Track token usage per provider and model
|
|
495
|
-
- Cost estimation and spending trends
|
|
496
|
-
- Monthly reports and insights
|
|
497
|
-
- Optimize your AI spending
|
|
498
|
-
|
|
499
|
-
> **💡 IMPORTANT - Understanding Dashboard Costs:**
|
|
500
|
-
>
|
|
501
|
-
> The "cost" displayed in Usage Analytics is **for tracking and comparison purposes only**.
|
|
502
|
-
> 9Router itself **never charges** you anything. You only pay providers directly (if using paid services).
|
|
503
|
-
>
|
|
504
|
-
> **Example:** If your dashboard shows "$290 total cost" while using iFlow models, this represents
|
|
505
|
-
> what you would have paid using paid APIs directly. Your actual cost = **$0** (iFlow is free unlimited).
|
|
506
|
-
>
|
|
507
|
-
> Think of it as a "savings tracker" showing how much you're saving by using free models or
|
|
508
|
-
> routing through 9Router!
|
|
509
|
-
|
|
510
|
-
### 🌐 Deploy Anywhere
|
|
511
|
-
|
|
512
|
-
- 💻 **Localhost** - Default, works offline
|
|
513
|
-
- ☁️ **VPS/Cloud** - Share across devices
|
|
514
|
-
- 🐳 **Docker** - One-command deployment
|
|
515
|
-
- 🚀 **Cloudflare Workers** - Global edge network
|
|
516
|
-
|
|
517
|
-
</details>
|
|
518
|
-
|
|
519
|
-
---
|
|
520
|
-
|
|
521
|
-
## 💰 Pricing at a Glance
|
|
522
|
-
|
|
523
|
-
| Tier | Provider | Cost | Quota Reset | Best For |
|
|
524
|
-
|------|----------|------|-------------|----------|
|
|
525
|
-
| **🚀 TOKEN SAVER** | **RTK (built-in)** | **FREE** | Always on | **Save 20-40% tokens on EVERY request** |
|
|
526
|
-
| **💳 SUBSCRIPTION** | Claude Code (Pro/Max) | $20-200/mo | 5h + weekly | Already subscribed |
|
|
527
|
-
| | Codex (Plus/Pro) | $20-200/mo | 5h + weekly | OpenAI users |
|
|
528
|
-
| | GitHub Copilot | $10-19/mo | Monthly | GitHub users |
|
|
529
|
-
| | Cursor IDE | $20/mo | Monthly | Cursor users |
|
|
530
|
-
| **💰 CHEAP** | GLM-5.1 / GLM-4.7 | $0.6/1M | Daily 10AM | Budget backup |
|
|
531
|
-
| | MiniMax M2.7 | $0.2/1M | 5-hour rolling | Cheapest option |
|
|
532
|
-
| | Kimi K2.5 | $9/mo flat | 10M tokens/mo | Predictable cost |
|
|
533
|
-
| **🆓 FREE** | Kiro AI | $0 | Unlimited | Claude 4.5 + GLM-5 + MiniMax free |
|
|
534
|
-
| | OpenCode Free | $0 | Unlimited | No auth, auto-fetch models |
|
|
535
|
-
| | Vertex AI | $300 credits | New GCP accounts | Gemini 3 Pro + DeepSeek + GLM-5 |
|
|
536
|
-
|
|
537
|
-
**💡 Pro Tip:** RTK + Kiro AI + OpenCode Free combo = **$0 cost + 20-40% token savings**!
|
|
538
|
-
|
|
539
|
-
---
|
|
540
|
-
|
|
541
|
-
### 📊 Understanding 9Router Costs & Billing
|
|
542
|
-
|
|
543
|
-
**9Router Billing Reality:**
|
|
544
|
-
|
|
545
|
-
✅ **9Router software = FREE forever** (open source, never charges)
|
|
546
|
-
✅ **Dashboard "costs" = Display/tracking only** (not actual bills)
|
|
547
|
-
✅ **You pay providers directly** (subscriptions or API fees)
|
|
548
|
-
✅ **FREE providers stay FREE** (iFlow, Kiro, Qwen = $0 unlimited)
|
|
549
|
-
❌ **9Router never sends invoices** or charges your card
|
|
550
|
-
|
|
551
|
-
**How Cost Display Works:**
|
|
552
|
-
|
|
553
|
-
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.
|
|
554
|
-
|
|
555
|
-
**Example Scenario:**
|
|
556
|
-
```
|
|
557
|
-
Dashboard Display:
|
|
558
|
-
• Total Requests: 1,662
|
|
559
|
-
• Total Tokens: 47M
|
|
560
|
-
• Display Cost: $290
|
|
561
|
-
|
|
562
|
-
Reality Check:
|
|
563
|
-
• Provider: iFlow (FREE unlimited)
|
|
564
|
-
• Actual Payment: $0.00
|
|
565
|
-
• What $290 Means: Amount you SAVED by using free models!
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
**Payment Rules:**
|
|
569
|
-
- **Subscription providers** (Claude Code, Codex): Pay them directly via their websites
|
|
570
|
-
- **Cheap providers** (GLM, MiniMax): Pay them directly, 9Router just routes
|
|
571
|
-
- **FREE providers** (iFlow, Kiro, Qwen): Genuinely free forever, no hidden charges
|
|
572
|
-
- **9Router**: Never charges anything, ever
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## 🎯 Use Cases
|
|
577
|
-
|
|
578
|
-
### Case 1: "I have Claude Pro subscription"
|
|
579
|
-
|
|
580
|
-
**Problem:** Quota expires unused, rate limits during heavy coding
|
|
581
|
-
|
|
582
|
-
**Solution:**
|
|
583
|
-
```
|
|
584
|
-
Combo: "maximize-claude"
|
|
585
|
-
1. cc/claude-opus-4-7 (use subscription fully)
|
|
586
|
-
2. glm/glm-5.1 (cheap backup when quota out)
|
|
587
|
-
3. kr/claude-sonnet-4.5 (free emergency fallback)
|
|
588
|
-
|
|
589
|
-
Monthly cost: $20 (subscription) + ~$5 (backup) = $25 total
|
|
590
|
-
vs. $20 + hitting limits = frustration
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
### Case 2: "I want zero cost"
|
|
594
|
-
|
|
595
|
-
**Problem:** Can't afford subscriptions, need reliable AI coding
|
|
596
|
-
|
|
597
|
-
**Solution:**
|
|
598
|
-
```
|
|
599
|
-
Combo: "free-forever"
|
|
600
|
-
1. kr/claude-sonnet-4.5 (Claude 4.5 free unlimited)
|
|
601
|
-
2. kr/glm-5 (GLM-5 free via Kiro)
|
|
602
|
-
3. oc/<auto> (OpenCode Free, no auth)
|
|
603
|
-
|
|
604
|
-
Monthly cost: $0
|
|
605
|
-
Quality: Production-ready models + RTK saves 20-40% tokens
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
### Case 3: "I need 24/7 coding, no interruptions"
|
|
609
|
-
|
|
610
|
-
**Problem:** Deadlines, can't afford downtime
|
|
611
|
-
|
|
612
|
-
**Solution:**
|
|
613
|
-
```
|
|
614
|
-
Combo: "always-on"
|
|
615
|
-
1. cc/claude-opus-4-7 (best quality)
|
|
616
|
-
2. cx/gpt-5.5 (second subscription)
|
|
617
|
-
3. glm/glm-5.1 (cheap, resets daily)
|
|
618
|
-
4. minimax/MiniMax-M2.7 (cheapest, 5h reset)
|
|
619
|
-
5. kr/claude-sonnet-4.5 (free unlimited)
|
|
620
|
-
|
|
621
|
-
Result: 5 layers of fallback = zero downtime
|
|
622
|
-
Monthly cost: $20-200 (subscriptions) + $10-20 (backup)
|
|
623
|
-
```
|
|
624
|
-
|
|
625
|
-
### Case 4: "I want FREE AI in OpenClaw"
|
|
626
|
-
|
|
627
|
-
**Problem:** Need AI assistant in messaging apps (WhatsApp, Telegram, Slack...), completely free
|
|
628
|
-
|
|
629
|
-
**Solution:**
|
|
630
|
-
```
|
|
631
|
-
Combo: "openclaw-free"
|
|
632
|
-
1. kr/claude-sonnet-4.5 (Claude 4.5 free)
|
|
633
|
-
2. kr/glm-5 (GLM-5 free)
|
|
634
|
-
3. kr/MiniMax-M2.5 (MiniMax free)
|
|
635
|
-
|
|
636
|
-
Monthly cost: $0
|
|
637
|
-
Access via: WhatsApp, Telegram, Slack, Discord, iMessage, Signal...
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
---
|
|
641
|
-
|
|
642
|
-
## ❓ Frequently Asked Questions
|
|
643
|
-
|
|
644
|
-
<details>
|
|
645
|
-
<summary><b>📊 Why does my dashboard show high costs?</b></summary>
|
|
646
|
-
|
|
647
|
-
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.
|
|
648
|
-
|
|
649
|
-
**Example:**
|
|
650
|
-
- **Dashboard shows:** "$290 total cost"
|
|
651
|
-
- **Reality:** You're using iFlow (FREE unlimited)
|
|
652
|
-
- **Your actual cost:** **$0.00**
|
|
653
|
-
- **What $290 means:** Amount you **saved** by using free models instead of paid APIs!
|
|
654
|
-
|
|
655
|
-
The cost display is a "savings tracker" to help you understand your usage patterns and optimization opportunities.
|
|
656
|
-
|
|
657
|
-
</details>
|
|
658
|
-
|
|
659
|
-
<details>
|
|
660
|
-
<summary><b>💳 Will I be charged by 9Router?</b></summary>
|
|
661
|
-
|
|
662
|
-
**No.** 9Router is free, open-source software that runs on your own computer. It never charges you anything.
|
|
663
|
-
|
|
664
|
-
**You only pay:**
|
|
665
|
-
- ✅ **Subscription providers** (Claude Code $20/mo, Codex $20-200/mo) → Pay them directly on their websites
|
|
666
|
-
- ✅ **Cheap providers** (GLM, MiniMax) → Pay them directly, 9Router just routes your requests
|
|
667
|
-
- ❌ **9Router itself** → **Never charges anything, ever**
|
|
668
|
-
|
|
669
|
-
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.
|
|
670
|
-
|
|
671
|
-
</details>
|
|
672
|
-
|
|
673
|
-
<details>
|
|
674
|
-
<summary><b>🆓 Are FREE providers really unlimited?</b></summary>
|
|
675
|
-
|
|
676
|
-
**Yes!** The current FREE providers (Kiro, OpenCode Free, Vertex) are genuinely free with **no hidden charges**.
|
|
677
|
-
|
|
678
|
-
These are free services offered by those respective companies:
|
|
679
|
-
- **Kiro AI**: Free unlimited Claude 4.5 + GLM-5 + MiniMax via AWS Builder ID / Google / GitHub OAuth
|
|
680
|
-
- **OpenCode Free**: No-auth passthrough proxy, models auto-fetched from `opencode.ai/zen/v1/models`
|
|
681
|
-
- **Vertex AI**: $300 free credits for new Google Cloud accounts (90 days)
|
|
682
|
-
|
|
683
|
-
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.
|
|
684
|
-
|
|
685
|
-
**Discontinued free tiers (no longer recommended):**
|
|
686
|
-
- ❌ **iFlow**: Was free unlimited, now changed to paid (2026)
|
|
687
|
-
- ❌ **Qwen Code**: Free OAuth tier discontinued by Alibaba on 2026-04-15
|
|
688
|
-
- ❌ **Gemini CLI**: Still works, but using it with non-CLI tools (Claude, Codex, Cursor...) may result in account bans — only use if you stick to Gemini CLI itself
|
|
689
|
-
|
|
690
|
-
</details>
|
|
691
|
-
|
|
692
|
-
<details>
|
|
693
|
-
<summary><b>💰 How do I minimize my actual AI costs?</b></summary>
|
|
694
|
-
|
|
695
|
-
**Free-First Strategy:**
|
|
696
|
-
|
|
697
|
-
1. **Start with 100% free combo:**
|
|
698
|
-
```
|
|
699
|
-
1. gc/gemini-3-flash (180K/month free from Google)
|
|
700
|
-
2. if/kimi-k2-thinking (unlimited free from iFlow)
|
|
701
|
-
3. qw/qwen3-coder-plus (unlimited free from Qwen)
|
|
702
|
-
```
|
|
703
|
-
**Cost: $0/month**
|
|
704
|
-
|
|
705
|
-
2. **Add cheap backup** only if you need it:
|
|
706
|
-
```
|
|
707
|
-
4. glm/glm-4.7 ($0.6/1M tokens)
|
|
708
|
-
```
|
|
709
|
-
**Additional cost: Only pay for what you actually use**
|
|
710
|
-
|
|
711
|
-
3. **Use subscription providers last:**
|
|
712
|
-
- Only if you already have them
|
|
713
|
-
- 9Router helps maximize their value through quota tracking
|
|
714
|
-
|
|
715
|
-
**Result:** Most users can operate at $0/month using only free tiers!
|
|
716
|
-
|
|
717
|
-
</details>
|
|
718
|
-
|
|
719
|
-
<details>
|
|
720
|
-
<summary><b>📈 What if my usage suddenly spikes?</b></summary>
|
|
721
42
|
|
|
722
|
-
|
|
43
|
+
## What It Does
|
|
723
44
|
|
|
724
|
-
|
|
45
|
+
- One local endpoint for coding tools such as Claude Code, OpenAI Codex,
|
|
46
|
+
GitHub Copilot, Gemini CLI, OpenCode, Cline, Kilo Code, and compatible tools.
|
|
47
|
+
- Dashboard-based provider and account management.
|
|
48
|
+
- OAuth and API-key providers, including subscription-style provider accounts.
|
|
49
|
+
- Multi-account routing with per-provider fallback and round-robin strategies.
|
|
50
|
+
- Quota and usage views for supported providers.
|
|
51
|
+
- Sub-user accounts with provider/account-level access control.
|
|
52
|
+
- Provider-scoped OpenAI-compatible routes, for example
|
|
53
|
+
`/api/v1/providers/codex/chat/completions`.
|
|
54
|
+
- MITM helpers for supported local tooling workflows.
|
|
55
|
+
- Packaged standalone Next.js runtime for global npm installation.
|
|
725
56
|
|
|
726
|
-
|
|
727
|
-
- ❌ Hit rate limit → Work stops → Frustration
|
|
728
|
-
- ❌ Or: Accidentally rack up huge API bills
|
|
57
|
+
## Default Endpoint
|
|
729
58
|
|
|
730
|
-
|
|
731
|
-
- ✅ Subscription hits limit → Auto-fallback to cheap tier
|
|
732
|
-
- ✅ Cheap tier gets expensive → Auto-fallback to free tier
|
|
733
|
-
- ✅ Never stop coding → Predictable costs
|
|
59
|
+
Use the local OpenAI-compatible endpoint with your tools:
|
|
734
60
|
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
</details>
|
|
738
|
-
|
|
739
|
-
---
|
|
740
|
-
|
|
741
|
-
## 📖 Setup Guide
|
|
742
|
-
|
|
743
|
-
<details>
|
|
744
|
-
<summary><b>🔐 Subscription Providers (Maximize Value)</b></summary>
|
|
745
|
-
|
|
746
|
-
### Claude Code (Pro/Max)
|
|
747
|
-
|
|
748
|
-
```bash
|
|
749
|
-
Dashboard → Providers → Connect Claude Code
|
|
750
|
-
→ OAuth login → Auto token refresh
|
|
751
|
-
→ 5-hour + weekly quota tracking
|
|
752
|
-
|
|
753
|
-
Models:
|
|
754
|
-
cc/claude-opus-4-7
|
|
755
|
-
cc/claude-opus-4-6
|
|
756
|
-
cc/claude-sonnet-4-6
|
|
757
|
-
cc/claude-haiku-4-5-20251001
|
|
61
|
+
```text
|
|
62
|
+
http://localhost:20502/api/v1
|
|
758
63
|
```
|
|
759
64
|
|
|
760
|
-
|
|
65
|
+
Common examples:
|
|
761
66
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
→ 5-hour + weekly reset
|
|
768
|
-
|
|
769
|
-
Models:
|
|
770
|
-
cx/gpt-5.5
|
|
771
|
-
cx/gpt-5.4
|
|
772
|
-
cx/gpt-5.3-codex
|
|
773
|
-
cx/gpt-5.2-codex
|
|
67
|
+
```text
|
|
68
|
+
http://localhost:20502/api/v1/chat/completions
|
|
69
|
+
http://localhost:20502/api/v1/responses
|
|
70
|
+
http://localhost:20502/api/v1/embeddings
|
|
71
|
+
http://localhost:20502/api/v1/images/generations
|
|
774
72
|
```
|
|
775
73
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
```bash
|
|
779
|
-
Dashboard → Providers → Connect GitHub
|
|
780
|
-
→ OAuth via GitHub
|
|
781
|
-
→ Monthly reset (1st of month)
|
|
74
|
+
For tools that expect `/v1`, openrouterX also exposes:
|
|
782
75
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
gh/claude-opus-4.7
|
|
786
|
-
gh/claude-sonnet-4.6
|
|
787
|
-
gh/gemini-3.1-pro-preview
|
|
788
|
-
gh/grok-code-fast-1
|
|
76
|
+
```text
|
|
77
|
+
http://localhost:20502/v1
|
|
789
78
|
```
|
|
790
79
|
|
|
791
|
-
|
|
80
|
+
## Model Names
|
|
792
81
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
→ OAuth login
|
|
796
|
-
→ Monthly subscription
|
|
82
|
+
Model aliases are managed in the dashboard. Typical provider-prefixed model
|
|
83
|
+
names look like:
|
|
797
84
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
85
|
+
```text
|
|
86
|
+
codex/gpt-5.5
|
|
87
|
+
codex/gpt-5.3-codex
|
|
88
|
+
github/gpt-5.3-codex
|
|
89
|
+
claude/claude-opus-4-5
|
|
90
|
+
gemini/gemini-3-pro
|
|
802
91
|
```
|
|
803
92
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
<details>
|
|
807
|
-
<summary><b>💰 Cheap Providers (Backup)</b></summary>
|
|
808
|
-
|
|
809
|
-
### GLM-5.1 / GLM-4.7 (Daily reset, $0.6/1M)
|
|
810
|
-
|
|
811
|
-
1. Sign up: [Zhipu AI](https://open.bigmodel.cn/)
|
|
812
|
-
2. Get API key from Coding Plan
|
|
813
|
-
3. Dashboard → Add API Key:
|
|
814
|
-
- Provider: `glm`
|
|
815
|
-
- API Key: `your-key`
|
|
816
|
-
|
|
817
|
-
**Use:** `glm/glm-5.1`, `glm/glm-5`, `glm/glm-4.7`
|
|
818
|
-
|
|
819
|
-
**Pro Tip:** Coding Plan offers 3× quota at 1/7 cost! Reset daily 10:00 AM.
|
|
93
|
+
Auto routes and custom combos can be configured in the dashboard when you want
|
|
94
|
+
fallback across multiple providers.
|
|
820
95
|
|
|
821
|
-
|
|
96
|
+
## API Keys And Users
|
|
822
97
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
98
|
+
For local-only use, the dashboard can run with relaxed local defaults. For
|
|
99
|
+
shared or remote deployments, create API keys in the dashboard and assign them
|
|
100
|
+
carefully:
|
|
826
101
|
|
|
827
|
-
|
|
102
|
+
- Super admin keys are unassigned keys.
|
|
103
|
+
- Sub-user keys are bound to a specific sub-user.
|
|
104
|
+
- Sub-users can be limited to specific providers and specific provider
|
|
105
|
+
connection IDs.
|
|
828
106
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
### Kimi K2.5 ($9/month flat)
|
|
832
|
-
|
|
833
|
-
1. Subscribe: [Moonshot AI](https://platform.moonshot.ai/)
|
|
834
|
-
2. Get API key
|
|
835
|
-
3. Dashboard → Add API Key
|
|
836
|
-
|
|
837
|
-
**Use:** `kimi/kimi-k2.5`, `kimi/kimi-k2.5-thinking`
|
|
838
|
-
|
|
839
|
-
**Pro Tip:** Fixed $9/month for 10M tokens = $0.90/1M effective cost!
|
|
840
|
-
|
|
841
|
-
</details>
|
|
842
|
-
|
|
843
|
-
<details>
|
|
844
|
-
<summary><b>🆓 FREE Providers (Recommended)</b></summary>
|
|
845
|
-
|
|
846
|
-
### Kiro AI (Claude 4.5 + GLM-5 + MiniMax FREE)
|
|
847
|
-
|
|
848
|
-
```bash
|
|
849
|
-
Dashboard → Connect Kiro
|
|
850
|
-
→ AWS Builder ID, AWS IAM Identity Center, Google, or GitHub
|
|
851
|
-
→ Unlimited usage
|
|
852
|
-
|
|
853
|
-
Models:
|
|
854
|
-
kr/claude-sonnet-4.5
|
|
855
|
-
kr/claude-haiku-4.5
|
|
856
|
-
kr/glm-5
|
|
857
|
-
kr/MiniMax-M2.5
|
|
858
|
-
kr/qwen3-coder-next
|
|
859
|
-
kr/deepseek-3.2
|
|
860
|
-
```
|
|
861
|
-
|
|
862
|
-
**Pro Tip:** Best free option for Claude. No API key, no payment, fully unlimited.
|
|
863
|
-
|
|
864
|
-
### OpenCode Free (No auth, auto-fetch models)
|
|
107
|
+
## Updating
|
|
865
108
|
|
|
866
109
|
```bash
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
→ Models auto-fetched from opencode.ai/zen/v1/models
|
|
110
|
+
npm install -g @yina-npm/openrouterx@latest --prefer-online
|
|
111
|
+
openrouterX restart --skip-update
|
|
870
112
|
```
|
|
871
113
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
### Vertex AI ($300 free credits for new GCP accounts)
|
|
114
|
+
## Uninstall
|
|
875
115
|
|
|
876
116
|
```bash
|
|
877
|
-
|
|
878
|
-
→ Upload Google Cloud Service Account JSON
|
|
879
|
-
→ Enable Vertex AI API in your GCP project
|
|
880
|
-
|
|
881
|
-
Models:
|
|
882
|
-
vertex/gemini-3.1-pro-preview
|
|
883
|
-
vertex/gemini-3-flash-preview
|
|
884
|
-
vertex/gemini-2.5-flash
|
|
885
|
-
|
|
886
|
-
Vertex Partner (Anthropic / DeepSeek / GLM / Qwen via Vertex):
|
|
887
|
-
vertex-partner/glm-5-maas
|
|
888
|
-
vertex-partner/deepseek-v3.2-maas
|
|
889
|
-
vertex-partner/qwen3-next-80b-a3b-thinking-maas
|
|
890
|
-
```
|
|
891
|
-
|
|
892
|
-
**Pro Tip:** New Google Cloud accounts get $300 credits free for 90 days. Plenty for daily coding.
|
|
893
|
-
|
|
894
|
-
</details>
|
|
895
|
-
|
|
896
|
-
<details>
|
|
897
|
-
<summary><b>🎨 Create Combos</b></summary>
|
|
898
|
-
|
|
899
|
-
### Example 1: Maximize Subscription → Cheap Backup
|
|
900
|
-
|
|
901
|
-
```
|
|
902
|
-
Dashboard → Combos → Create New
|
|
903
|
-
|
|
904
|
-
Name: premium-coding
|
|
905
|
-
Models:
|
|
906
|
-
1. cc/claude-opus-4-7 (Subscription primary)
|
|
907
|
-
2. glm/glm-5.1 (Cheap backup, $0.6/1M)
|
|
908
|
-
3. minimax/MiniMax-M2.7 (Cheapest fallback, $0.20/1M)
|
|
909
|
-
|
|
910
|
-
Use in CLI: premium-coding
|
|
911
|
-
|
|
912
|
-
Monthly cost example (100M tokens):
|
|
913
|
-
80M via Claude (subscription): $0 extra
|
|
914
|
-
15M via GLM: $9
|
|
915
|
-
5M via MiniMax: $1
|
|
916
|
-
Total: $10 + your subscription
|
|
917
|
-
```
|
|
918
|
-
|
|
919
|
-
### Example 2: Free-Only (Zero Cost)
|
|
920
|
-
|
|
921
|
-
```
|
|
922
|
-
Name: free-combo
|
|
923
|
-
Models:
|
|
924
|
-
1. kr/claude-sonnet-4.5 (Claude 4.5 free unlimited)
|
|
925
|
-
2. kr/glm-5 (GLM-5 free via Kiro)
|
|
926
|
-
3. vertex/gemini-3.1-pro-preview ($300 free credits)
|
|
927
|
-
|
|
928
|
-
Cost: $0 forever (+ 20-40% token savings via RTK)!
|
|
929
|
-
```
|
|
930
|
-
|
|
931
|
-
</details>
|
|
932
|
-
|
|
933
|
-
<details>
|
|
934
|
-
<summary><b>🔧 CLI Integration</b></summary>
|
|
935
|
-
|
|
936
|
-
### Cursor IDE
|
|
937
|
-
|
|
938
|
-
```
|
|
939
|
-
Settings → Models → Advanced:
|
|
940
|
-
OpenAI API Base URL: http://localhost:20128/v1
|
|
941
|
-
OpenAI API Key: [from 9router dashboard]
|
|
942
|
-
Model: cc/claude-opus-4-7
|
|
117
|
+
npm uninstall -g @yina-npm/openrouterx
|
|
943
118
|
```
|
|
944
119
|
|
|
945
|
-
|
|
120
|
+
This removes the npm package. Runtime data under `~/.openrouterx` is not removed
|
|
121
|
+
automatically.
|
|
946
122
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
Edit `~/.claude/config.json`:
|
|
950
|
-
|
|
951
|
-
```json
|
|
952
|
-
{
|
|
953
|
-
"anthropic_api_base": "http://localhost:20128/v1",
|
|
954
|
-
"anthropic_api_key": "your-9router-api-key"
|
|
955
|
-
}
|
|
956
|
-
```
|
|
957
|
-
|
|
958
|
-
### Codex CLI
|
|
123
|
+
## Local Development
|
|
959
124
|
|
|
960
125
|
```bash
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
codex "your prompt"
|
|
965
|
-
```
|
|
966
|
-
|
|
967
|
-
### OpenClaw
|
|
968
|
-
|
|
969
|
-
**Option 1 — Dashboard (recommended):**
|
|
970
|
-
|
|
971
|
-
```
|
|
972
|
-
Dashboard → CLI Tools → OpenClaw → Select Model → Apply
|
|
973
|
-
```
|
|
974
|
-
|
|
975
|
-
**Option 2 — Manual:** Edit `~/.openclaw/openclaw.json`:
|
|
976
|
-
|
|
977
|
-
```json
|
|
978
|
-
{
|
|
979
|
-
"agents": {
|
|
980
|
-
"defaults": {
|
|
981
|
-
"model": {
|
|
982
|
-
"primary": "9router/kr/claude-sonnet-4.5"
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
"models": {
|
|
987
|
-
"providers": {
|
|
988
|
-
"9router": {
|
|
989
|
-
"baseUrl": "http://127.0.0.1:20128/v1",
|
|
990
|
-
"apiKey": "sk_9router",
|
|
991
|
-
"api": "openai-completions",
|
|
992
|
-
"models": [
|
|
993
|
-
{
|
|
994
|
-
"id": "kr/claude-sonnet-4.5",
|
|
995
|
-
"name": "Claude Sonnet 4.5 (Kiro Free)"
|
|
996
|
-
}
|
|
997
|
-
]
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
```
|
|
1003
|
-
|
|
1004
|
-
> **Note:** OpenClaw only works with local 9Router. Use `127.0.0.1` instead of `localhost` to avoid IPv6 resolution issues.
|
|
1005
|
-
|
|
1006
|
-
### Cline / Continue / RooCode
|
|
1007
|
-
|
|
1008
|
-
```
|
|
1009
|
-
Provider: OpenAI Compatible
|
|
1010
|
-
Base URL: http://localhost:20128/v1
|
|
1011
|
-
API Key: [from dashboard]
|
|
1012
|
-
Model: cc/claude-opus-4-7
|
|
126
|
+
npm install
|
|
127
|
+
npm run dev
|
|
1013
128
|
```
|
|
1014
129
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
<details>
|
|
1018
|
-
<summary><b>🚀 Deployment</b></summary>
|
|
1019
|
-
|
|
1020
|
-
### VPS Deployment
|
|
130
|
+
Build:
|
|
1021
131
|
|
|
1022
132
|
```bash
|
|
1023
|
-
# Clone and install
|
|
1024
|
-
git clone https://github.com/decolua/9router.git
|
|
1025
|
-
cd 9router
|
|
1026
|
-
npm install
|
|
1027
133
|
npm run build
|
|
1028
|
-
|
|
1029
|
-
# Configure
|
|
1030
|
-
export JWT_SECRET="your-secure-secret-change-this"
|
|
1031
|
-
export INITIAL_PASSWORD="your-password"
|
|
1032
|
-
export DATA_DIR="/var/lib/9router"
|
|
1033
|
-
export PORT="20128"
|
|
1034
|
-
export HOSTNAME="0.0.0.0"
|
|
1035
|
-
export NODE_ENV="production"
|
|
1036
|
-
export NEXT_PUBLIC_BASE_URL="http://localhost:20128"
|
|
1037
|
-
export NEXT_PUBLIC_CLOUD_URL="https://9router.com"
|
|
1038
|
-
export API_KEY_SECRET="endpoint-proxy-api-key-secret"
|
|
1039
|
-
export MACHINE_ID_SALT="endpoint-proxy-salt"
|
|
1040
|
-
|
|
1041
|
-
# Start
|
|
1042
|
-
npm run start
|
|
1043
|
-
|
|
1044
|
-
# Or use PM2
|
|
1045
|
-
npm install -g pm2
|
|
1046
|
-
pm2 start npm --name 9router -- start
|
|
1047
|
-
pm2 save
|
|
1048
|
-
pm2 startup
|
|
1049
134
|
```
|
|
1050
135
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
Published images (multi-platform `linux/amd64` + `linux/arm64`):
|
|
1054
|
-
- Docker Hub: [`decolua/9router`](https://hub.docker.com/r/decolua/9router)
|
|
1055
|
-
- GHCR: [`ghcr.io/decolua/9router`](https://github.com/decolua/9router/pkgs/container/9router)
|
|
1056
|
-
|
|
1057
|
-
**Quick start (use published image):**
|
|
136
|
+
Create and validate the npm staging package without publishing:
|
|
1058
137
|
|
|
1059
138
|
```bash
|
|
1060
|
-
|
|
1061
|
-
--name 9router \
|
|
1062
|
-
-p 20128:20128 \
|
|
1063
|
-
-v "$HOME/.9router:/app/data" \
|
|
1064
|
-
-e DATA_DIR=/app/data \
|
|
1065
|
-
decolua/9router:latest
|
|
139
|
+
npm run release:npm:dry
|
|
1066
140
|
```
|
|
1067
141
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
**Build from source (dev):**
|
|
142
|
+
Install a local test build globally:
|
|
1071
143
|
|
|
1072
144
|
```bash
|
|
1073
|
-
|
|
1074
|
-
cd 9router/app
|
|
1075
|
-
docker build -t 9router .
|
|
1076
|
-
docker run -d --name 9router -p 20128:20128 \
|
|
1077
|
-
-v "$HOME/.9router:/app/data" -e DATA_DIR=/app/data 9router
|
|
145
|
+
npm run release:npm:install-local
|
|
1078
146
|
```
|
|
1079
147
|
|
|
1080
|
-
|
|
1081
|
-
- `PORT=20128`
|
|
1082
|
-
- `HOSTNAME=0.0.0.0`
|
|
148
|
+
## Package
|
|
1083
149
|
|
|
1084
|
-
|
|
150
|
+
Published package:
|
|
1085
151
|
|
|
1086
|
-
```
|
|
1087
|
-
|
|
1088
|
-
docker restart 9router
|
|
1089
|
-
docker stop 9router && docker rm 9router
|
|
1090
|
-
docker pull decolua/9router:latest # update to latest
|
|
152
|
+
```text
|
|
153
|
+
@yina-npm/openrouterx
|
|
1091
154
|
```
|
|
1092
155
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
### Environment Variables
|
|
1096
|
-
|
|
1097
|
-
| Variable | Default | Description |
|
|
1098
|
-
|----------|---------|-------------|
|
|
1099
|
-
| `JWT_SECRET` | Auto-generated (`~/.9router/jwt-secret`) | JWT signing secret for dashboard auth cookie (override to share across instances) |
|
|
1100
|
-
| `INITIAL_PASSWORD` | `123456` | First login password when no saved hash exists |
|
|
1101
|
-
| `DATA_DIR` | `~/.9router` | Main app data location (SQLite at `$DATA_DIR/db/data.sqlite`) |
|
|
1102
|
-
| `PORT` | framework default | Service port (`20128` in examples) |
|
|
1103
|
-
| `HOSTNAME` | framework default | Bind host (Docker defaults to `0.0.0.0`) |
|
|
1104
|
-
| `NODE_ENV` | runtime default | Set `production` for deploy |
|
|
1105
|
-
| `BASE_URL` | `http://localhost:20128` | Server-side internal base URL used by cloud sync jobs |
|
|
1106
|
-
| `CLOUD_URL` | `https://9router.com` | Server-side cloud sync endpoint base URL |
|
|
1107
|
-
| `NEXT_PUBLIC_BASE_URL` | `http://localhost:3000` | Backward-compatible/public base URL (prefer `BASE_URL` for server runtime) |
|
|
1108
|
-
| `NEXT_PUBLIC_CLOUD_URL` | `https://9router.com` | Backward-compatible/public cloud URL (prefer `CLOUD_URL` for server runtime) |
|
|
1109
|
-
| `API_KEY_SECRET` | `endpoint-proxy-api-key-secret` | HMAC secret for generated API keys |
|
|
1110
|
-
| `MACHINE_ID_SALT` | `endpoint-proxy-salt` | Salt for stable machine ID hashing |
|
|
1111
|
-
| `ENABLE_REQUEST_LOGS` | `false` | Enables request/response logs under `logs/` |
|
|
1112
|
-
| `AUTH_COOKIE_SECURE` | `false` | Force `Secure` auth cookie (set `true` behind HTTPS reverse proxy) |
|
|
1113
|
-
| `REQUIRE_API_KEY` | `false` | Enforce Bearer API key on `/v1/*` routes (recommended for internet-exposed deploys) |
|
|
1114
|
-
| `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY` | empty | Optional outbound proxy for upstream provider calls |
|
|
1115
|
-
|
|
1116
|
-
Notes:
|
|
1117
|
-
- Lowercase proxy variables are also supported: `http_proxy`, `https_proxy`, `all_proxy`, `no_proxy`.
|
|
1118
|
-
- `.env` is not baked into Docker image (`.dockerignore`); inject runtime config with `--env-file` or `-e`.
|
|
1119
|
-
- On Windows, `APPDATA` can be used for local storage path resolution.
|
|
1120
|
-
- `INSTANCE_NAME` appears in older docs/env templates, but is currently not used at runtime.
|
|
1121
|
-
|
|
1122
|
-
### Runtime Files and Storage
|
|
1123
|
-
|
|
1124
|
-
- Main app state: `${DATA_DIR}/db/data.sqlite` (SQLite — providers, combos, aliases, keys, settings, usage history)
|
|
1125
|
-
- Auto backups: `${DATA_DIR}/db/backups/`
|
|
1126
|
-
- Optional request/translator logs: `<repo>/logs/...` when `ENABLE_REQUEST_LOGS=true`
|
|
1127
|
-
- Both `${DATA_DIR}` and `~/.9router` resolve to the same location in a Docker container — the symlink `/root/.9router -> /app/data` is created at build time.
|
|
1128
|
-
|
|
1129
|
-
</details>
|
|
1130
|
-
|
|
1131
|
-
---
|
|
1132
|
-
|
|
1133
|
-
## 📊 Available Models
|
|
1134
|
-
|
|
1135
|
-
<details>
|
|
1136
|
-
<summary><b>View all available models</b></summary>
|
|
1137
|
-
|
|
1138
|
-
**Claude Code (`cc/`)** - Pro/Max:
|
|
1139
|
-
- `cc/claude-opus-4-7`
|
|
1140
|
-
- `cc/claude-opus-4-6`
|
|
1141
|
-
- `cc/claude-sonnet-4-6`
|
|
1142
|
-
- `cc/claude-sonnet-4-5-20250929`
|
|
1143
|
-
- `cc/claude-haiku-4-5-20251001`
|
|
1144
|
-
|
|
1145
|
-
**Codex (`cx/`)** - Plus/Pro:
|
|
1146
|
-
- `cx/gpt-5.5`
|
|
1147
|
-
- `cx/gpt-5.4`
|
|
1148
|
-
- `cx/gpt-5.3-codex`
|
|
1149
|
-
- `cx/gpt-5.2-codex`
|
|
1150
|
-
- `cx/gpt-5.1-codex-max`
|
|
1151
|
-
|
|
1152
|
-
**GitHub Copilot (`gh/`)**:
|
|
1153
|
-
- `gh/gpt-5.4`
|
|
1154
|
-
- `gh/claude-opus-4.7`
|
|
1155
|
-
- `gh/claude-sonnet-4.6`
|
|
1156
|
-
- `gh/gemini-3.1-pro-preview`
|
|
1157
|
-
- `gh/grok-code-fast-1`
|
|
1158
|
-
|
|
1159
|
-
**Cursor (`cu/`)** - Subscription:
|
|
1160
|
-
- `cu/claude-4.6-opus-max`
|
|
1161
|
-
- `cu/claude-4.5-sonnet-thinking`
|
|
1162
|
-
- `cu/gpt-5.3-codex`
|
|
1163
|
-
- `cu/kimi-k2.5`
|
|
1164
|
-
|
|
1165
|
-
**GLM (`glm/`)** - $0.6/1M:
|
|
1166
|
-
- `glm/glm-5.1`
|
|
1167
|
-
- `glm/glm-5`
|
|
1168
|
-
- `glm/glm-4.7`
|
|
1169
|
-
|
|
1170
|
-
**MiniMax (`minimax/`)** - $0.2/1M:
|
|
1171
|
-
- `minimax/MiniMax-M2.7`
|
|
1172
|
-
- `minimax/MiniMax-M2.5`
|
|
1173
|
-
|
|
1174
|
-
**Kimi (`kimi/`)** - $9/mo flat:
|
|
1175
|
-
- `kimi/kimi-k2.5`
|
|
1176
|
-
- `kimi/kimi-k2.5-thinking`
|
|
1177
|
-
|
|
1178
|
-
**Kiro (`kr/`)** - FREE unlimited:
|
|
1179
|
-
- `kr/claude-sonnet-4.5`
|
|
1180
|
-
- `kr/claude-haiku-4.5`
|
|
1181
|
-
- `kr/glm-5`
|
|
1182
|
-
- `kr/MiniMax-M2.5`
|
|
1183
|
-
- `kr/qwen3-coder-next`
|
|
1184
|
-
- `kr/deepseek-3.2`
|
|
1185
|
-
|
|
1186
|
-
**OpenCode Free (`oc/`)** - FREE no-auth:
|
|
1187
|
-
- Auto-fetched from `opencode.ai/zen/v1/models`
|
|
1188
|
-
|
|
1189
|
-
**Vertex AI (`vertex/`)** - $300 free credits:
|
|
1190
|
-
- `vertex/gemini-3.1-pro-preview`
|
|
1191
|
-
- `vertex/gemini-3-flash-preview`
|
|
1192
|
-
- `vertex/gemini-2.5-flash`
|
|
1193
|
-
- `vertex-partner/glm-5-maas`
|
|
1194
|
-
- `vertex-partner/deepseek-v3.2-maas`
|
|
1195
|
-
|
|
1196
|
-
</details>
|
|
1197
|
-
|
|
1198
|
-
---
|
|
1199
|
-
|
|
1200
|
-
## 🐛 Troubleshooting
|
|
1201
|
-
|
|
1202
|
-
**"Language model did not provide messages"**
|
|
1203
|
-
- Provider quota exhausted → Check dashboard quota tracker
|
|
1204
|
-
- Solution: Use combo fallback or switch to cheaper tier
|
|
1205
|
-
|
|
1206
|
-
**Rate limiting**
|
|
1207
|
-
- Subscription quota out → Fallback to GLM/MiniMax
|
|
1208
|
-
- Add combo: `cc/claude-opus-4-7 → glm/glm-5.1 → kr/claude-sonnet-4.5`
|
|
1209
|
-
|
|
1210
|
-
**OAuth token expired**
|
|
1211
|
-
- Auto-refreshed by 9Router
|
|
1212
|
-
- If issues persist: Dashboard → Provider → Reconnect
|
|
1213
|
-
|
|
1214
|
-
**High costs**
|
|
1215
|
-
- Enable RTK in Dashboard → Endpoint settings (default ON, saves 20-40% tokens)
|
|
1216
|
-
- Check usage stats in Dashboard
|
|
1217
|
-
- Switch primary model to GLM/MiniMax
|
|
1218
|
-
- Use free tier (Kiro, OpenCode Free, Vertex) for non-critical tasks
|
|
156
|
+
Global command:
|
|
1219
157
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
**First login not working**
|
|
1224
|
-
- Check `INITIAL_PASSWORD` in `.env`
|
|
1225
|
-
- If unset, fallback password is `123456`
|
|
1226
|
-
|
|
1227
|
-
**No request logs under `logs/`**
|
|
1228
|
-
- Set `ENABLE_REQUEST_LOGS=true`
|
|
1229
|
-
|
|
1230
|
-
---
|
|
1231
|
-
|
|
1232
|
-
## 🛠️ Tech Stack
|
|
1233
|
-
|
|
1234
|
-
- **Runtime**: Node.js 20+
|
|
1235
|
-
- **Framework**: Next.js 16
|
|
1236
|
-
- **UI**: React 19 + Tailwind CSS 4
|
|
1237
|
-
- **Database**: SQLite (better-sqlite3 / node:sqlite / sql.js fallback)
|
|
1238
|
-
- **Streaming**: Server-Sent Events (SSE)
|
|
1239
|
-
- **Auth**: OAuth 2.0 (PKCE) + JWT + API Keys
|
|
1240
|
-
|
|
1241
|
-
---
|
|
1242
|
-
|
|
1243
|
-
## 📝 API Reference
|
|
1244
|
-
|
|
1245
|
-
### Chat Completions
|
|
1246
|
-
|
|
1247
|
-
```bash
|
|
1248
|
-
POST http://localhost:20128/v1/chat/completions
|
|
1249
|
-
Authorization: Bearer your-api-key
|
|
1250
|
-
Content-Type: application/json
|
|
1251
|
-
|
|
1252
|
-
{
|
|
1253
|
-
"model": "cc/claude-opus-4-6",
|
|
1254
|
-
"messages": [
|
|
1255
|
-
{"role": "user", "content": "Write a function to..."}
|
|
1256
|
-
],
|
|
1257
|
-
"stream": true
|
|
1258
|
-
}
|
|
158
|
+
```text
|
|
159
|
+
openrouterX
|
|
1259
160
|
```
|
|
1260
161
|
|
|
1261
|
-
|
|
162
|
+
Default port:
|
|
1262
163
|
|
|
1263
|
-
```
|
|
1264
|
-
|
|
1265
|
-
Authorization: Bearer your-api-key
|
|
1266
|
-
|
|
1267
|
-
→ Returns all models + combos in OpenAI format
|
|
164
|
+
```text
|
|
165
|
+
20502
|
|
1268
166
|
```
|
|
1269
|
-
|
|
1270
|
-
## 📧 Support
|
|
1271
|
-
|
|
1272
|
-
- **Website**: [9router.com](https://9router.com)
|
|
1273
|
-
- **GitHub**: [github.com/decolua/9router](https://github.com/decolua/9router)
|
|
1274
|
-
- **Issues**: [github.com/decolua/9router/issues](https://github.com/decolua/9router/issues)
|
|
1275
|
-
|
|
1276
|
-
---
|
|
1277
|
-
|
|
1278
|
-
## 👥 Contributors
|
|
1279
|
-
|
|
1280
|
-
Thanks to all contributors who helped make 9Router better!
|
|
1281
|
-
|
|
1282
|
-
[](https://github.com/decolua/9router/graphs/contributors)
|
|
1283
|
-
|
|
1284
|
-
---
|
|
1285
|
-
|
|
1286
|
-
## 📊 Star Chart
|
|
1287
|
-
|
|
1288
|
-
[](https://starchart.cc/decolua/9router)
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
## 🔀 Forks
|
|
1293
|
-
|
|
1294
|
-
**[OmniRoute](https://github.com/diegosouzapw/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.
|
|
1295
|
-
|
|
1296
|
-
---
|
|
1297
|
-
|
|
1298
|
-
## 🙏 Acknowledgments
|
|
1299
|
-
|
|
1300
|
-
Built on the shoulders of giants:
|
|
1301
|
-
|
|
1302
|
-
- **CLIProxyAPI(https://github.com/router-for-me/CLIProxyAPI)** — original Go implementation that inspired this JavaScript port.
|
|
1303
|
-
- **[RTK](https://github.com/rtk-ai/rtk)**  — Rust token-saver. 9Router ports its compression pipeline to JS → **−20-40% input tokens** on every request.
|
|
1304
|
-
- **[Caveman](https://github.com/JuliusBrussee/caveman)**  by **[@JuliusBrussee](https://github.com/JuliusBrussee)** — viral *"why use many token when few token do trick"*. 9Router adapts its prompt → **−65% output tokens**.
|
|
1305
|
-
|
|
1306
|
-
Huge thanks to these authors — without their work, 9Router's token-saving features wouldn't exist. ⭐ them on GitHub!
|
|
1307
|
-
|
|
1308
|
-
---
|
|
1309
|
-
|
|
1310
|
-
## 📄 License
|
|
1311
|
-
|
|
1312
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
1313
|
-
|
|
1314
|
-
---
|
|
1315
|
-
|
|
1316
|
-
<div align="center">
|
|
1317
|
-
<sub>Built with ❤️ for developers who code 24/7</sub>
|
|
1318
|
-
</div>
|