Favicon of OmniRoute

OmniRoute

Self-hosted AI gateway exposing an OpenAI-compatible endpoint that routes Claude Code, Cursor and Cline across 231+ providers with free-tier fallback.

Open Source Alternative to:
OmniRoute website screenshot
OmniRoute GitHub repository preview

OmniRoute is a self-hosted AI gateway that gives every AI coding tool one place to talk to hundreds of model providers. It sits between tools like Claude Code, Cursor, Cline, Copilot and Codex and the backends that actually run the models, exposing an OpenAI-compatible endpoint at http://localhost:20128/v1. It's aimed at developers who want to stop juggling separate API keys, rate limits and dashboards for every provider they rely on.

Key features

  • One endpoint: exposes /v1 in OpenAI, Claude, Gemini and Responses API shapes, so any compatible tool can point at it without custom integration work.
  • Provider aggregation: connects to 231+ AI providers, including 50+ with free tiers, and tracks documented free-tier token budgets on a live dashboard.
  • Auto-fallback routing: cascades requests across four tiers (subscription, API key, cheap paid, free) when quota or rate limits run out, using 19 routing strategies.
  • Token compression: RTK and Caveman compression cut token usage by 15-95% (about 89% average on tool-heavy sessions) before requests reach the provider.
  • Local-first architecture: runs on your own machine or server, stores API keys with AES-256-GCM encryption, and doesn't route prompts through a third-party cloud.
  • Resilience layer: circuit breakers, key cooldowns and model lockouts handle dead keys and outages without manual intervention.
  • MCP and A2A support: exposes MCP tools and agent-to-agent protocol support for multi-agent workflows.
  • Team key pools: lets a team share subscriptions with fair-share quotas instead of everyone holding separate keys.
  • Usage analytics: dashboard shows live usage, remaining quota, compression savings and p95 latency per provider.

Ideal use cases

  • A solo developer using Claude Code, Cursor or Cline who wants access to free-tier models automatically when a paid subscription runs out of quota mid-session.
  • A team sharing a handful of AI subscriptions that wants fair-share access instead of one person burning the whole quota.
  • Anyone building on top of multiple LLM providers who wants one OpenAI-compatible API instead of maintaining separate SDK integrations per provider.
  • Projects sensitive to token cost, where the compression layer can meaningfully cut spend on tool-heavy agent sessions.
  • Not a great fit if you need a single vendor's SLA and support contract, or if your compliance rules forbid routing traffic through third-party free-tier providers, since some aggregated providers are flagged for ambiguous terms of service in the project's own docs.
  • Not ideal if you already use one provider directly and don't need fallback, compression, or multi-tool routing, since the gateway adds a component you don't need.

Installation

Install as a global npm package and OmniRoute starts a local server:

npm i -g omniroute

The server boots on http://localhost:20128. Point any OpenAI-compatible tool at http://localhost:20128/v1 and it works immediately, with keyless free providers pre-wired into the auto model:

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

OmniRoute is also distributed as a Docker image (diegosouzapw/omniroute on Docker Hub) and as an Electron desktop app, for setups where a global npm install isn't preferred. To call a specific free backend instead of the auto-selected one, use its prefix directly, for example oc/... for OpenCode Free or felo/... for Felo, then switch to model: "auto" once you're ready to let OmniRoute pick for you.

Frequently asked questions

Share:

Stars
32.2K
Forks
4.2K
Last commit
21 hours ago
Repository age
6 months
License
MIT
Self-hosted
No
Activity score
85/100
View Repository
Ad
Favicon

 

  
 

Similar to OmniRoute

Favicon

 

  
 
Favicon

 

  
 
Favicon