OmniRoute
AI gateway that gives coding tools one endpoint for many model providers and switches between them.
- Stars
- 90,178 stars
- Forks
- 14k forks
- Last push
- today
- Activity
- Active
# Install globally$ npm install -g omniroute# Start the server$ omniroute serveCommands from the project's README. Run them after installing (see below).
Overview
Understand OmniRoute in 60 seconds
- What it does
- OmniRoute is a self-hosted AI gateway that routes requests to many model providers through one OpenAI-compatible endpoint. You connect your own provider accounts, including free tiers, and it picks a route and fails over when one runs out.
- The problem it solves
- Using several AI providers means juggling SDKs, keys and rate limits, and free tiers run out at different times. OmniRoute puts them behind one local endpoint with quota-aware routing and fallback.
- Why choose it
- Choose it if you want to combine your own provider accounts behind one endpoint with automatic fallback. You still need eligible accounts; the README is clear its token figures are estimates of third-party free tiers, not a grant from OmniRoute.
- Who should use it
- Developers who want one endpoint for many AI providers
- People using Claude Code, Cursor or Cline with cheaper models
- Hobbyists making the most of provider free tiers
- Teams that want local control over AI routing
- Setup difficulty
You'll need:
- Node.js and npm (or Docker)
- Accounts or API keys for the providers you connect
How OmniRoute works
OmniRoute runs on your machine or server and exposes an OpenAI-compatible API at http://localhost:20128/v1. You connect providers in its dashboard with your own accounts or keys, then point any app, IDE or coding agent at that one endpoint.
Combos and quota-aware scheduling route each request to an eligible provider and fall back when one hits a limit. The README catalogs hundreds of providers, many marked free, and re-audits its free-tier estimates every two weeks. Providers whose terms OmniRoute flags as ones to avoid are excluded from automatic routing.
It runs from npm, Docker, from source, or even on a phone through Termux. A headless mode runs only the proxy. It can also be exposed over MCP, A2A, a REST API, webhooks or a remote CLI.
Features
Key features
One endpoint
OpenAI-compatible API for many providers.
Combos and fallback
Route by availability and fail over automatically.
Quota tracking
Live quota telemetry and quota-aware scheduling.
Free-tier catalog
Estimates of available free tiers, re-audited regularly.
Works with coding agents
Point Claude Code, Cursor, Cline and others at it.
MCP and A2A
Expose the gateway to agents.
Strengths
- Self-hosted and local-first
- Huge provider catalog
- Automatic failover
- MIT licensed
Limitations
- You must sign up for and follow each provider's terms
- A fresh install may have no eligible keyless routes
- Free tiers change and can disappear
Practical use cases
Cheaper coding agents
Point your IDE or CLI at OmniRoute to use low-cost models.
Resilient app backend
Fail over between providers when one is down.
Compare models
Route the same request to different providers.
Installation
Install OmniRoute
Commands come from OmniRoute's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Node.js and npm
Supported systems
- Windows
- macOS
- Linux
- 1
Install
Shellnpm install -g omniroute - 2
Start the server
Shellomniroute serve - 3
Connect a provider in the dashboard
Use your own account or API key, then copy your OmniRoute key from Dashboard → Endpoints.
- 1
Run the image
Use the cheaperinference/omniroute image; see the README for the full docker run options.
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Send a test request
Shellcurl http://localhost:20128/v1/chat/completions \ -H "Authorization: Bearer YOUR_OMNIROUTE_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'
OmniRoute's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Route your first request through OmniRoute
Install OmniRoute, connect a provider and send a chat request.
Before you start
- Node.js and npm
- An account or key for at least one provider
- 1
Install and start
Shellnpm install -g omnirouteomniroute serve - 2
Connect a provider in the dashboard
- 3
Copy your OmniRoute key from Dashboard → Endpoints
- 4
Send a request
Shellcurl http://localhost:20128/v1/chat/completions \ -H "Authorization: Bearer YOUR_OMNIROUTE_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'
What to expect
A chat completion response routed to one of your connected providers.
Next steps
- Point your coding agent at http://localhost:20128/v1
- Set up a combo with fallbacks
- Try the quickstart scripts in examples/quickstart
Costs and requirements
What it costs to run
- License
- MIT. Free to use, modify and use commercially.Free
- Software
- Free and self-hosted.Free
- Providers
- Free tiers have limits; paid usage is billed by each provider.Depends
Troubleshooting
Common setup issues
model auto returns no route
auto needs an eligible route. Connect a provider first; a fresh install may have no keyless targets.
A keyless provider rejects requests
Some providers reject third-party clients. Connect your own account or key.
Want only the API, no dashboard
Run omniroute serve --headless.
Alternatives
Similar AI repositories
orca
stablyai
App for running and managing several AI coding agents like Claude Code and Codex on desktop, mobile or a remote machine.
claude-mem
thedotmack
Memory add-on for AI coding agents that saves what happened in past sessions and brings the useful parts back later.
paperclip
paperclipai
Open-source app for organizing and managing teams of AI agents that do work for your business.
Understand-Anything
Egonex-AI
Tool that turns any codebase into an interactive knowledge graph you can explore, search and ask questions about.