🔌

OmniRoute

AI Gateway•⭐ 35,700

Free AI gateway with 290+ providers, 500+ models, auto-fallback and token compression.

ClaudeOpenAIGeminiDeepSeekKimiCopilotCursor

Overview

Free AI gateway with 290+ providers, 500+ models, auto-fallback and token compression.

Setup

Run with npx:

npm install -g omniroute

Configuration

Add provider keys via omniroute CLI; runs at localhost:20128/v1

Documentation

OmniRoute

Overview

OmniRoute is a free, open-source AI gateway providing one endpoint, 290+ AI providers (90+ with free tiers), and 500+ models. It works seamlessly with Claude Code, Codex, Cursor, Cline, Copilot, and any other OpenAI-compatible tool. At 35,700 GitHub stars with 500+ contributors, OmniRoute is the most comprehensive self-hosted LLM gateway in the open-source ecosystem.

OmniRoute's killer feature is quota-aware auto-fallback across 19 routing strategies: when one provider fails or quota runs out, it silently slides to the next model — no configuration needed. Combined with RTK+Caveman token compression that saves 15–95% of tokens (89% average), OmniRoute dramatically reduces both cost and provider dependency.

The gateway runs 100% on your hardware with zero cloud hops, and encrypts all credentials with AES-256-GCM.

Features

  • 290+ providers: 90+ with free tiers, 40+ free forever (Kimi, Claude, GPT, Gemini, DeepSeek, etc.)
  • 500+ models: One endpoint to access the entire LLM ecosystem
  • Quota-aware auto-fallback: 19 routing strategies that silently fail over
  • Token compression: RTK+Caveman compression saves ~89% tokens on average
  • Zero-config: Works immediately with auto model — no API keys required
  • Full MCP server: 104 tools, A2A agent protocol, 80+ CLI commands
  • Privacy-first: Runs 100% locally, AES-256-GCM encrypted credentials
  • ~1.53B free tokens/month: Aggregated from 43 provider pools
  • OpenAI-compatible: Drop-in replacement for any openai SDK call

Installation

npm (recommended):

npm install -g omniroute
omniroute

Starts at http://localhost:20128 with API at /v1.

Docker:

docker run -d \
  --name omniroute \
  -p 20128:20128 \
  diegosouzapw/omniroute:latest

Electron desktop app and Termux (Android) also available, plus a PWA web interface.

Quick Start

Basic usage (uses auto-selected free model):

curl -X POST http://localhost:20128/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello"}]}'

Configuring providers:

omniroute providers add anthropic --key sk-ant-...
omniroute providers add openai --key sk-...
omniroute providers add deepseek --key sk-...

Using as an OpenAI-compatible proxy:

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:20128/v1",
    api_key="your-omniroute-key"
)

response = client.chat.completions.create(
    model="auto",  # OmniRoute picks best available provider
    messages=[{"role": "user", "content": "Explain agents"}]
)

Advanced Features

Routing strategies:

# Always use the cheapest available provider
omniroute route --strategy cost

# Prefer specific model family
omniroute route --strategy family --family claude

# Round-robin across providers
omniroute route --strategy round-robin

MCP server mode:

omniroute mcp
# Exposes 104 tools as MCP-compatible endpoints

CLI commands:

omniroute chat "Summarize the latest AI news"
omniroute models list
omniroute quota check
omniroute compress --file notes.md

Provider Categories

CategoryExamplesFree Tier
FrontierClaude, GPT, GeminiLimited
ChineseKimi, DeepSeek, QwenGenerous
Open-weightLlama, Hermes, MistralHost yourself
SpecializedGroq (fast), Together, PerplexityVaries

Pros

  • ✅ 290+ providers, 500+ models through one endpoint
  • ✅ Auto-fallback protects against outages and quota exhaustion
  • ✅ Token compression saves 15–95% on every call
  • ✅ 100% local — no cloud hops, AES-256-GCM encrypted
  • ✅ OpenAI-compatible — drop-in for any tool
  • ✅ 80+ CLI commands + 104 MCP tools
  • ✅ ~1.53B free tokens/month
  • ✅ MIT license

Cons

  • ❌ Requires managing multiple provider API keys for full coverage
  • ❌ Free-tier quotas rotate and can change without notice
  • ❌ Larger memory footprint than single-provider setups
  • ❌ Newer project — some providers may have routing bugs

When to Use

  • Multi-model experimentation without changing code
  • Cost-sensitive workloads needing the cheapest available model
  • Reliability-critical applications that can't tolerate single-provider outages
  • Self-hosted deployments requiring local-only inference
  • AI agent frameworks needing a unified model endpoint

Resources