9router
Unlimited FREE AI coding. Connect Claude Code, Codex, Cursor, Cline, Copilot, Antigravity to FREE Claude/GPT/Gemini via 40+ providers. Auto-fallback, RTK -40% tokens, never hit limits.
- 31.3k estrellas
- 6k forks
- 2683 issues abiertos
- Lenguaje: JavaScript
- Licencia: MIT
- actualizado
Instalación
git clone https://github.com/decolua/9router && cp 9router/*.md ~/.claude/agents/- Clone the repository and copy the agent .md definitions into ~/.claude/agents (or .claude/agents inside a project).
- Start a new Claude Code session to load the agents.
- Delegate work to them with the Task/Agent tool or by name.
Nota editorial
9Router is a locally hosted AI gateway written in JavaScript that runs at `localhost:20128` and exposes an OpenAI-compatible `/v1` endpoint, letting coding tools such as Claude Code, Cursor, Cline, Codex, and GitHub Copilot route requests through more than 40 model providers including free tiers from Kiro AI and OpenCode, cheap options like GLM and MiniMax, and paid subscriptions. The router translates between OpenAI and Claude message formats automatically, so tools that expect one API shape can reach providers that speak the other. Its RTK Token Saver feature compresses `tool_result` content, trimming 20 to 40 percent of tokens per request, which is particularly relevant when tool outputs like `git diff` or directory listings are passed back to the model. A three-tier auto-fallback chain moves traffic from subscription quotas to cheap providers and then to free providers without manual intervention, and a round-robin multi-account mode spreads load across multiple credentials for a single provider. Developers who want to reduce API spending or avoid mid-session rate limits are the primary audience, and the project ships as an npm package, a Docker image, or a self-hosted Next.js application.
9 items en este repositorio
Entry point for 9Router — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions 9Router, NINEROUTER_URL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant capability SKILL.md from the URLs below when needed.
Chat / code generation via 9Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 9Router.
Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.
Generate images via 9Router /v1/images/generations using OpenAI / Gemini Imagen / DALL-E / FLUX / MiniMax / SDWebUI / ComfyUI / Codex models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img).
Speech-to-text via 9Router /v1/audio/transcriptions using OpenAI Whisper / Groq / Gemini / Deepgram / AssemblyAI / NVIDIA / HuggingFace models. Use when the user wants to transcribe audio, convert speech to text, or get subtitles from audio files.
Text-to-speech via 9Router /v1/audio/speech using OpenAI / ElevenLabs / Deepgram / Edge TTS / Google TTS / Hyperbolic / Inworld voices. Use when the user wants to convert text to speech, generate audio, voiceover, narrate, or read text aloud.
Generate videos via 9Router /v1/videos/generations using xAI Grok Imagine (grok-imagine-video). Async job flow - submit, poll request_id until done, download MP4. Use when the user wants to create, generate, or render a video, text-to-video (txt2vid), or image-to-video.
Fetch URL → markdown / text / HTML via 9Router /v1/web/fetch using Firecrawl / Jina Reader / Tavily Extract / Exa Contents. Use when the user wants to scrape a webpage, extract URL content, read article, or convert a URL to markdown.
Web and X search via 9Router /v1/search using Tavily / Exa / Brave / Serper / SearXNG / Google PSE / Linkup / SearchAPI / You.com / Perplexity / Xquik. Use when the user wants to search the web, find articles, or search public X posts.
Resumen de Subagents
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.
🚀 Quick Start • 💡 Features • 📖 Setup • 🌐 Website
🇧🇷 Português (Brasil) • 🇻🇳 Tiếng Việt • 🇨🇳 中文 • 🇯🇵 日本語 • 🇷🇺 Русский • 🇹🇭 ไทย • 🇮🇷 فارسی • 🇮🇩 Indonesia • 🇪🇸 Español • 🇫🇷 Français
🤔 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 (~50 credits/month free: Claude 4.5 + GLM-5 + MiniMax) 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.5That'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 devProduction mode:
# Create Temporary Memory For Build
sudo fallocate -l 2G /swapfile_temp
sudo chmod 600 /swapfile_temp
sudo mkswap /swapfile_temp
sudo swapon /swapfile_temp
export MAKEFLAGS="-j1"
export DLIB_NO_GUI_SUPPORT=1
export CFLAGS="-mno-avx"
npm run build
# Clear temporary swap
sudo swapoff /swapfile_temp
sudo rm /swapfile_temp
PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run startDefault URLs:
Dashboard:
http://localhost:20128/dashboardOpenAI-compatible API:
http://localhost:20128/v1
Video Guides
🇻🇳 Tiếng Việt Tiết kiệm chi phí LLM cho OpenClaw với 9Routerby Mì AI 🇵🇰 اردو / हिन्दी 9Router + Claude Code FREE Unlimited Setupby Build AI With Hamid 🇺🇸 English 9Router + Claude Code FREE Setupby Build AI With Hamid 🇺🇸 English 9Router + Claude Code FREE Setupby Build AI With Hamid 🇺🇸 English Claude Code FREE Forever — Unlimited Modelsby Build AI With Hamid 🇺🇸 English Claude CLI Free Setup with 9Router 🚀by CodeVerse Soban 🇻🇳 Tiếng Việt Cài Đặt OpenClaw Free Từ A-Z + 9Routerby Mai Gia 🇺🇸 English FREE OpenClaw + Claude Opus 4.6by Build AI With Hamid 🇮🇩 Indonesia Koding 24 Jam Anti Rate Limit! Hemat Token AI 65% | Tutorial Quick Setup 9Router 🚀by Krisswuh 🇮🇩 Indonesia Cara Deploy 9Router di Hugging Face GRATIS Non-Stop! | Alternatif VPS RAM 16GBby Krisswuh 🇮🇷 Persian-فارسی این شکلی از هر API ای استفاده کن برای هوش مصنوعیby Matin SenPai 🇻🇳 Tiếng Việt Hướng Dẫn Setup OpenClaw + 9Router: Tạo Bot Zalo AI Tự Động Từ A-Zby tuanminhhole
Lo que la gente pregunta sobre 9router
¿Qué es decolua/9router?
decolua/9router es subagents para el ecosistema de Claude AI. Unlimited FREE AI coding. Connect Claude Code, Codex, Cursor, Cline, Copilot, Antigravity to FREE Claude/GPT/Gemini via 40+ providers. Auto-fallback, RTK -40% tokens, never hit limits. Tiene 31.3k estrellas en GitHub y su última actualización registrada es del 2026-10-23.
¿Cómo se instala 9router?
Puedes instalar 9router clonando el repositorio (https://github.com/decolua/9router) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar decolua/9router?
Nuestro agente de seguridad ha analizado decolua/9router y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene decolua/9router?
decolua/9router es mantenido por decolua. La última actividad registrada en GitHub es del 2026-10-23, con 2683 issues abiertos.
¿Hay alternativas a 9router?
Sí. En ClaudeWave puedes explorar subagents similares en /categories/agents, ordenados por popularidad o actividad reciente.
¿Mantienes este repo? Muestra su Trust Score en tu README
La insignia muestra el Trust Score y el veredicto actuales de este repositorio y enlaza a esta página. Sigue los datos del catálogo: nadie puede comprar ni editar la puntuación que enseña.
[](https://claudewave.com/en/repo/decolua-9router)<a href="https://claudewave.com/en/repo/decolua-9router"><img src="https://claudewave.com/api/badge/decolua-9router" alt="ClaudeWave Trust Score for decolua/9router" width="320" height="64"></a>