OmniRoute – diegosouzapw
OmniRoute 永不停止编码。免费 MIT AI 网关:一个端点,290+ 提供商(90+ 免费),500+ 模型 — Kimi、Claude、GPT、OpenAI、Gemini、GLM、DeepSeek、MiniMax。兼容 Claude Code、Codex、Cursor、OpenCode、Cline & Copilot。配额感知自动故障转移,RTK+Caveman 压缩节省 15-95% Token,支持 MCP/A2A、桌面/PWA。由 500+ 贡献者构建
关键指标一览
主题标签
README 详细介绍

🚀 OmniRoute — The Free AI Gateway
💰 ~1.53B Free Tokens / Month
> Stacking free tiers by hand is painful — dozens of SDKs, dozens of rate limits, and no idea how much you actually have. OmniRoute aggregates the documented free tiers of 43 provider pools / 516 models into one honest number and shows it live on the dashboard (/dashboard/free-tiers).
> Animated summary of the live /dashboard/free-tiers page. Full methodology (pool dedupe, credit tiers, provider terms): docs/reference/FREE_TIERS.md.
>
> These figures are re-audited every two weeks against the live catalog and move both ways — a provider ends a free tier and the number drops; a new one lands and it climbs. We publish what the catalog actually computes, never a rounded-up best case.
⭐ Star the repo if OMNIROUTE helped you save money and make your work easier.


💬 Join the community
👋 Follow the maintainer — get new providers, releases & tips first:







Questions, provider tips, roadmap & support → Discord · Telegram · WhatsApp 🌍 Global / 🇧🇷 Brasil
🧩 Available

!NPM Monthly


!Docker Pulls
!Electron Downloads
| 🚀 Quick Start | 🎯 Combos | 🌐 Providers |
| 🔌 CLI & MCP | 🗜️ Compression | 🌍 Website |
| 💥 The Promise | 🤔 Why | 🏆 What Sets Apart |
| 🤖 Compatible CLIs | 🖥️ Where It Runs | 🔒 Private |
| 🎬 In Action | 📸 Screenshots | 📧 Support |
🆓 Works the second you install it — no keys, no config
# Fresh install, zero credentials — `auto` already works:
curl http://localhost:20128/v1/chat/completions
-H "Content-Type: application/json"
-d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'
Prefer a specific free backend? Call it directly, e.g. oc/… (OpenCode Free) or felo/… (Felo). Then graduate to auto and let OmniRoute pick.
💥 The Promise
🤔 Why OmniRoute?
🤝 Supported by our Open Source Friends
> Want to join as an Open Source Friend? These are the companies that back open source and help keep OmniRoute moving — and we say publicly where every token they give us goes. Reach out: diegosouza.pw@outlook.com
Kimi Moonshot AI | Thanks to Kimi (Moonshot AI), our founding Open Source Friend, for backing this project! Kimi is the AI lab behind the open-weight K2 and K3 model families — Kimi K3 delivers a 1M-token context window, native vision and frontier-level coding at a fraction of closed-model prices, and works out of the box with Claude Code, Codex and every coding tool OmniRoute serves. What Kimi's support powers: Kimi's API credits power OmniRoute's AI-validated release pipeline — the merge validation powered by Kimi K3 stage that reviews every pull request before it ships — plus day-to-day feature development. First-class Kimi support ships on both rails: the direct Kimi API ( kimi-k3) and the Kimi Code coding plan (OAuth and API key). OmniRoute is also the first Brazilian open-source project in Kimi's support program. Get a Kimi API key → |
Links tagged aff=omniroute are partner links. They fund the project at no extra cost to you.
🎯 Combos — The Flagship
> A combo is a chain of models OmniRoute routes across automatically. Quota runs out, a provider fails, or costs spike — the combo silently slides to the next model. This is what makes OmniRoute unbreakable. 🛡️
⚡ Zero-config — just use auto
No combo to create. Set your model to auto (or a variant) and OmniRoute builds a virtual combo from your connected providers, scored live:
| Model ID | What it optimizes for |
|---|---|
auto | 🎯 Balanced default (LKGP — sticks to your last good provider) |
auto/coding | 🧑💻 Quality-first weights for code generation |
auto/fast | ⚡ Lowest latency first |
auto/cheap | 💰 Cheapest per token first |
auto/offline | 🔋 Most quota / rate-limit headroom first |
auto/smart | 🔭 Quality-first + 10% exploration to discover better models |
##
🔀 Or build your own — 19 routing strategies
All 19 strategies — mix & match per combo step:
| # | Strategy | What it does |
|---|---|---|
| 1 | priority | First-target ordered list — drain each before the next 🥇 |
| 2 | fill-first | Fill each target's quota fully before moving on |
| 3 | weighted | Weighted random by per-target weight |
| 4 | round-robin | Cycle through targets in order |
| 5 | p2c | Power-of-two-choices random load balancing |
| 6 | least-used | Pick the target with the lowest current load |
| 7 | random | Uniform random pick (deduplicated) |
| 8 | strict-random | Random without de-duplicating repeats 🎲 |
| 9 | cost-optimized | Minimize $ per request from live catalog pricing 💸 |
| 10 | headroom | Pick the target with the most remaining quota |
| 11 | reset-window | Prefer the target whose quota window resets soonest |
| 12 | reset-aware | Rank by quota reset time — short windows first 📊 |
| 13 | context-relay | Hand off context across targets for long conversations 🧠 |
| 14 | context-optimized | Pick the best fit for the current context size |
| 15 | cache-optimized | Pin each reusable prompt prefix to the same account — maximize prompt-cache hits 🎯 |
| 16 | lkgp | Last-Known-Good Path — sticky to the last successful target |
| 17 | auto | 12-factor live scoring across every connection 🤖 |
| 18 | fusion | Fan out to a panel of models + a judge synthesizes one answer 🧬 |
| 19 | pipeline | Chain steps — each target's output feeds the next one 🔗 |
The Auto-Combo engine scores every candidate on 12 factors (health, quota, cost, latency, success rate, freshness…) — see <code class="ra0-md-code">docs/routing/AUTO-COMBO.md</code>.
##
🧱 Resilience is built in (3 independent layers)
📖 Auto-Combo Engine · Resilience Guide
🏆 What Sets OmniRoute Apart
📊 Full methodology & per-feature detail vs 9router, OpenRouter, CLIProxyAPI & LiteLLM → <code class="ra0-md-code">docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md</code>
❤️ Support
OmniRoute is free and open source, built and maintained in the open. If it saves you time or money, consider supporting development:
- ⭐ Star the repo — it genuinely helps visibility
- 💖 GitHub Sponsors — fund ongoing maintenance and new providers
- 🐛 Report bugs and share feedback in Discussions
✨ What's New
> Recent highlights from v3.8.20 → v3.8.49. Full history in <code class="ra0-md-code">CHANGELOG.md</code>.
- 🗜️ Compression hardening — default-on inflation guard, Caveman packs for DE / FR / JA + Chinese (wényán), RTK filters for Gradle & .NET. → Compression
- 💸 Honest flat-rate cost — subscription / coding-plan providers read $0 in cost analytics; budget, quota & routing keep estimating. → API Reference
- ⚖️ Quota-Share routing — split a shared account's quota fairly across pooled keys, work-conserving so idle slices are lent out. → Resilience Guide
- 🤖 One-command CLI/agent setup —
setup-*configures 12+ coding tools;omniroute launch/launch-codexare zero-config. → CLI Integrations - 🛰️ Remote mode — drive a remote OmniRoute with scoped tokens (
connect/contexts/tokens) + anantigravityOAuth helper for VPS installs. → Remote Mode - 🧭 Smarter auto-routing —
auto/:combos, Fusion (model panel + judge), task-aware routing, per-request model / mode / USD-budget overrides. → Auto-Combo - 🗜️ Pluggable compression — 12 composable engines + Compression Studios: LLMLingua-2, two-tier Ultra, omniglyph, per-step fidelity gate, GCF v3.2, drag-reorder editor. → Compression
- 🕵️ Transparent MITM decrypt (TPROXY) — capture CLIs that ignore proxy env vars, with a per-SNI CA + trust-store installer. → MITM/TPROXY
- 💸 Cost telemetry everywhere —
X-OmniRoute-*cost/usage headers on every endpoint, cache-HIT savings header, per-key USD spend quotas. → API Reference - 🧠 Memory you control — off by default, opt-in int8 vector quantization + typed decay, per-request
x-omniroute-no-memory. → Memory - 🛡️ Security — prompt-injection guard on every LLM route (red-team suite) + free DuckDuckGo last-resort web search. → Guardrails
- 🖼️ New endpoints —
/v1/ocr(Mistral OCR) and/v1/audio/translations(Whisper-style) round out the media surface. → API Reference - 🎨 Image / video / audio generation — one API for media: xAI Grok Imagine & Novita AI video, ComfyUI, Freepik, Adobe Firefly, Microsoft Designer, Google Imagen, Segmind, EdgeTTS. → API Reference
- 🌍 Deployment & ops — reverse-proxy
basePath, browser-language auto-detect, per-key device tracking, root-less MITM trust, zh-TW localization. → Environment - 🤝 More providers & agents — Cursor Cloud Agent, Grok Build (xAI), Ollama first-class card, Claude Sonnet 5, Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed 290-provider catalog. → Providers
- ⚡ Local performance & infra — one-click local Redis, Cloudflare Workers / Deno Deploy relay deployers, Bifrost & Mux as supervised embedded services. → Embedded Services
🤖 Compatible CLIs & Coding Agents
> One config — http://localhost:20128/v1 — and every AI IDE or CLI runs on free & low-cost models.
Claude Code | Codex CLI | Cline | Kilo Code | Roo Code | Continue |
Aider | ForgeCode | jcode | DeepSeek TUI | CodeWhale | OpenCode |
Factory Droid | Copilot CLI | Cursor CLI | Smelt | Pi | Grok Build |
Hermes Agent | OpenClaw | Goose | Open Interpreter | Warp AI | Agent Deck |
+ also works with · Kiro · Command Code · Antigravity · Windsurf · AMP · any OpenAI-compatible tool
📖 Per-tool setup for all 33 tools (25 CLI Code's + 8 CLI Agents) → <code class="ra0-md-code">docs/reference/CLI-TOOLS.md</code> · 🧩 OpenCode plugin → <code class="ra0-md-code">@omniroute/opencode-provider</code>
🌐 290 AI Providers — 90+ Free
> The most complete catalog of any open-source router: 290 providers, 90+ with a free tier, 40+ free forever.
🏢 Every major lab — through one endpoint
OpenAI | Anthropic | Gemini | xAI Grok | DeepSeek | Mistral |
Qwen | Meta Llama | Groq | NVIDIA | MiniMax | Cohere |
Perplexity | HuggingFace | Together | Fireworks | Cloudflare | Baidu |
…and 220+ more — every icon resolves live from the dashboard's provider catalog. 📖 Provider Reference
🆓 Free Forever — $0, no card
OpenCode Zen DeepSeek V4, Nemotron 3 No token cap | Kilo Code Auto-router, Tencent Hy3 Free forever | Requesty GPT-OSS 120B, Nemotron Free forever | SiliconFlow DeepSeek V3.2 / R1 Free tier | Z.AI GLM GLM-4.7 / 4.5-Flash Free forever | Baidu ERNIE ERNIE 4.0 Free forever |
Qoder AI Qwen3-Max, Kimi-K2 Unlimited FREE | Pollinations GPT, Llama, Claude No key needed | Cloudflare AI 50+ models 10K neurons/day | NVIDIA NIM GLM, MiniMax ~40 RPM free | Cerebras GLM 4.7, GPT-OSS 1M tokens/day | OpenRouter :free models +$10 → higher RPM |
📖 Full machine-readable catalog → <code class="ra0-md-code">docs/reference/PROVIDER_REFERENCE.md</code>
🖥️ Where OmniRoute Runs — Anywhere
> Same app, your machine, your rules. From a global npm install to your phone via Termux.
| Platform | Install | Highlights |
|---|---|---|
| 📦 npm (global) | npm install -g omniroute | One command, any OS |
| 🐳 Docker | docker run … diegosouzapw/omniroute | Multi-arch AMD64 + ARM64 |
| 🖥️ Desktop (Electron) | npm run electron:build | Native window + system tray — Windows / macOS / Linux |
| 💪 ARM | native arm64 | Raspberry Pi, ARM servers, Apple Silicon |
| 📱 Android (Termux) | pkg install nodejs && npx -y omniroute | Runs on your phone, 24/7, no root |
| 📲 PWA | "Add to Home Screen" | Fullscreen, offline, installable from browser |
| 🧩 OpenCode plugin | @omniroute/opencode-provider | Native OpenCode integration |
| 🛠️ From source | npm install && npm run dev | Hack on it, contribute |
📖 Docker Guide · Desktop · Termux · PWA · OpenCode
🔒 Private & Local-First
📖 Authorization · Guardrails · Compliance
🔌 Full CLI + A2A & MCP
> Beyond the server, OmniRoute is a full command-line cockpit with 80+ commands, plus open agent protocols so an AI agent can drive it on its own.
⌨️ A real CLI (not just start)
omniroute # serve gateway + dashboard (port 20128)
omniroute chat # interactive TUI chat client (slash: /model /combo /skill /memory)
omniroute setup # guided first-run wizard
omniroute doctor # diagnose providers, ports, native deps
🛰️ Remote mode — run the CLI here, OmniRoute on a VPS
OmniRoute on a server? Drive it from your laptop with the same CLI. Log in once
with a scoped access token; every command then targets the remote.
omniroute connect 192.168.0.15 # password → scoped token, saved as a context
omniroute models list # ← runs against the REMOTE server
omniroute configure codex # ← picks a remote model, writes a local Codex profile
omniroute tokens create --name ci --scope read # mint narrower tokens for other machines
omniroute contexts use default # ← switch back to the local server
Tokens are scoped read / write / admin; process-spawning routes stay loopback-only.
📖 Remote Mode
🤝 Connect an agent — and it controls OmniRoute itself
Expose OmniRoute over MCP, A2A, a REST API, webhooks or a remote CLI — any capable agent (or your own code) gets the keys to the whole gateway: routing, providers, combos, cache, compression, memory — autonomously. HTTP endpoints below are served under http://localhost:20128.
| Interface | Endpoint / command | <
|---|
