Two commands bring OmniRoute up: npm install -g omniroute and omniroute. The dashboard then opens at http://localhost:20128, and an OpenAI-style API listens at http://localhost:20128/v1. From there you add providers in the dashboard, copy the gateway key and plug it into Claude Code, Codex or any other client. Only the gateway is free. Tokens are the providers' business. Read the providers' terms first: whether the gateway pays off depends on whose accounts stand behind it.
What OmniRoute is
Diego Souza leads the project together with a large group of contributors. The repository diegosouzapw/OmniRoute was created on 13 February 2026, and by 10 November it had about 86,000 GitHub stars and an MIT license. Releases come two to three weeks apart. The latest three are 6 November (v3.8.53), 19 October (v3.8.52) and 30 September (v3.8.51).
You run the gateway yourself. OmniRoute opens a single address and distributes requests across whatever you connected. The README counts 380 providers, while the README on the v3.8.54 release branch already says 387 on 10 November, so the figure drifts from release to release. It also claims 20 routing strategies, a switch to another source when a quota runs out, context compression, and MCP and A2A servers. Routing is a ladder with four steps: a subscription first, then an API key, then cheap models, and free ones last.
The project calls a chain of models a combo. If the current step runs out of quota or a provider is down, the next eligible one gets the request. The auto mode builds the chain from your connected providers without your help, and auto/coding, auto/cheap and auto/fast shift the priorities.
What the gateway does not do, the README states unambiguously: it issues no tokens and sells no access. You need your own account or key at every provider.
How to install OmniRoute
| Method | Command |
|---|---|
| npm | npm install -g omniroute, then omniroute |
| Docker | docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 -p 127.0.0.1:20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest |
| pnpm | pnpm add -g omniroute@latest --allow-build=better-sqlite3 --allow-build=@swc/core && omniroute |
| Android | Termux: pkg install nodejs && npx -y omniroute |
By the project's troubleshooting guide, Node is supported in the ranges >=22.22.2 <23 and >=24.0.0 <27. npm 11 blocks install scripts, and OmniRoute's postinstall prepares its native files, so for version 3.8.53 the README suggests this command:
npm install -g --allow-scripts=omniroute,keytar,onnxruntime-node,@parcel/watcher,@swc/core,protobufjs,esbuild omniroute
The set of packages changes from release to release, so take the current one from npm's own warning. Allowing a package lets its install scripts run.
Memory costs quietly. The default Docker image is sized for the dashboard and light chat (a 1024 MB heap). For one coding agent the README recommends OMNIROUTE_MEMORY_MB=8192 and a container of 10 GB or more, and for two overlapping long contexts a heap of 10240-12288 MB and a container of 12-16 GB. Without that the process under load dies with a FATAL ERROR. So part of the "free" gateway is paid by you.
After launch, three steps remain:
- Go to
http://localhost:20128, open Providers and add a provider whose terms and limits you accept. - The gateway key sits under Dashboard, Endpoints, so copy it from there.
- Test the key with
curl http://localhost:20128/v1/models -H "Authorization: Bearer YOUR_KEY".
The README warns that a fresh install may find no keyless providers, so installing OmniRoute alone does not guarantee you an answer.
How to connect Claude Code to OmniRoute
The shortest route needs no config files:
omniroute run claude --model provider/model
omniroute launch works too: it takes the address and key from the active context and starts claude. By hand, the same thing goes into ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "YOUR_OMNIROUTE_KEY",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
}
}
Three details from the project docs. Write the address without /v1, because Claude Code appends /v1/messages itself. The variables are read once at startup, so restart the agent after editing them. Finally, for IDs it does not recognize, Claude Code assumes a 200K window; for a model with a bigger window, set CLAUDE_CODE_AUTO_COMPACT_WINDOW below its real window, or compaction fires at the wrong moment. The /model menu shows by default only IDs that start with claude and anthropic, and the rest appear once you switch on alias mirroring (EXPOSE_CC_DISCOVERY_ALIASES, off by default).
Which models you send there is a separate question. Anthropic's documentation says any gateway with a supported API format works, yet the company does not support routing Claude Code to non-Claude models through a gateway. If you point the agent at free GLM or Kimi models, some features may behave differently, and you should not count on Anthropic's support.
Free tokens: what the README actually says
The README sets "~1.62B tokens / month" in large type. The note under the figure clarifies that this is an estimate across separate third-party free tiers, not a grant from OmniRoute. It was counted from 17 pools with a published monthly budget and five per-model Groq caps, with shared pools counted once. The project re-audits the number every two weeks and admits that it moves both ways. What you can actually use depends on the providers you connect.
The project's free-tier guide (edition of 11 October 2026) lists the catches itself:
| Provider | What the guide says | The catch |
|---|---|---|
| Groq | Pool estimated at about 15M tokens a month | Request rate limits apply |
| Cloudflare AI | Pool estimated at about 30M tokens a month | Needs an account and credentials |
| Gemini | No fixed monthly grant | Limits vary by project and model |
| Cerebras | One-time $5 credit, expires after 30 days | Needs a payment method |
| Logfare | Free key, no card | Every request is logged for research |
The same guides name the general costs: strict limits, KYC, training on your prompts, weaker privacy, no SLA, model churn and regional restrictions. The main warning is that any provider can cut a limit, swap a model, suspend access or go down, and several connections raise your reserve without guaranteeing a working route.
Other people's accounts and subscriptions: terms-of-service risk
What the project says. The README and the guides take one position: connect only your own accounts, and the terms, limits and availability stay with the provider. The README counts 12 providers marked tos: avoid (Kiro among them), and they stay out of auto-routing by default even when an account is connected. The guide allows overriding the filter only after you study the provider's terms and weigh the risk to your account. Another tip from it: do not create extra accounts to outwit a quota or an access policy.
Subscriptions. Some providers in the project go through a Claude Code subscription (an OAuth token, including one from claude setup-token) or through a claude.ai session cookie. As the project's document on the Claude Code route describes, requests are rewritten on that path: a billing header and the line "You are Claude Code, Anthropic's official CLI for Claude" are attached, tool names are swapped, paragraphs naming another agent are cut out, and words like cursor and cline get hidden behind invisible zero-width joiners. The same document explains why: without it, clients other than Claude Code hit the error "Third-party apps now draw from extra usage, not plan limits" on a subscription.
The project's stealth guide calls these features a compatibility layer between your own accounts and the OmniRoute API. By its text they are not built for evading fraud detection, sharing credentials or breaking terms, and operators are reminded of the rules they accepted at sign-up. If a provider blocks an account anyway, a detector fires: the connection gets a banned status, freezes for a year and does not return on its own.
What Anthropic says. The "Legal and compliance" page of the Claude Code docs, as it stood on 10 November 2026, distinguishes two ways of signing in. OAuth is meant for those who bought a subscription and covers ordinary work with Claude Code and Anthropic's native apps. For people building products, the company offers an API key. Third-party developers may not route requests through Free, Pro, Max or Ultra credentials on behalf of users, and they may not collect, store or pass on Claude.ai credentials and session tokens either. The company reserves the right to act without notice and describes plan limits as designed for ordinary individual use.
Whether that wording reaches your own setup on your own machine, we do not decide, and we make no legal call: read the page yourself. In practice the difference is this. If you work through an API key and pay per token, the subscription question never arises, though the API provider's own rules about countries and data still apply.
When one paid key is simpler
This section is for readers who came for "free" and ran into limits. codexkey sells access to models by key, so the comparison below is not neutral, but it is laid out point by point.
| What matters | OmniRoute on your machine | One codexkey key |
|---|---|---|
| Token price | Your own subscriptions, free tiers and paid keys from various providers | Pay per token, Premium channel on 10 November 2026: claude-sonnet-5 0.52 / 1.98, deepseek-v4.1-flash 0.06 / 0.22 dollars per 1M (input / output) |
| Limits | Each provider sets its own and changes them itself | The rules of one gateway instead of the rules of every provider, plus per-key spend statistics in the dashboard. The key API has no RPM/TPM per key, and a channel or provider-account policy can still return HTTP 429, so the client retries with a delay |
| Budget per key | Yes, USD spend quotas for each key | Not set through the key API |
| Upkeep | Node, updates every 2-3 weeks, RAM and ports are your job | No server, nothing to update |
| Privacy | The gateway and keys are yours, but the request goes to the chosen provider, and some free ones log it | The request goes through the codexkey gateway to the upstream |
| Model choice | 380 providers, 20 routing strategies | The codexkey catalog: Claude, GPT, DeepSeek and others |
| Payment from Russia | Each provider has its own, and many reject a Russian card | SBP (the Russian Faster Payments System), Russian cards, crypto, top-ups from $1 |
Who wins this comparison depends on the job. OmniRoute is good when you want your own routing strategies, dozens of providers, local models and control over where every request goes, and you have time to run it. One paid key is better where predictability counts: one payment, one address, no server and no separate provider accounts. Subscriptions to Claude or ChatGPT are not sold here, and access runs on a sk_cdx_ key paid per token. Provider terms about countries and data are not something codexkey can waive. For how this gateway looks next to LiteLLM and OpenRouter, see codexkey vs self-hosted LiteLLM and codexkey vs OpenRouter, and for the broader picture of routers, what a router for the Claude API is.
The two also combine. OmniRoute's docs describe provider nodes with an OpenAI-compatible API: a node's models appear in /v1/models under its prefix. codexkey offers https://api.codexkey.online/v1, a sk_cdx_... key and a catalog at GET /v1/models, so by description it fits the role of such a node. That setup has not been run and the dashboard steps were not verified, so do not read it as instructions. Alternatives on price and payment are listed in OpenRouter alternatives for Russia. The catalog's free models are covered in Claude Code free: what works in 2026, and a ready Claude Code config for a codexkey key is in the guide.
FAQ
What is OmniRoute?
A local gateway under the MIT license: one OpenAI-compatible address, localhost:20128/v1, with the providers you connect behind it. When a quota runs out, the gateway moves to another provider on its own. It does not trade in tokens, and you need your own accounts and keys.
How do I install OmniRoute?
npm install -g omniroute and omniroute are enough, with the Docker image diegosouzapw/omniroute as a fallback. After launch the dashboard waits at http://localhost:20128. When npm 11 blocks scripts, add the --allow-scripts flag (the command is above).
How do I connect Claude Code to OmniRoute?
Either omniroute run claude --model provider/model, or the variables ANTHROPIC_BASE_URL=http://localhost:20128 (without /v1) and ANTHROPIC_AUTH_TOKEN set to the gateway key. The variables are read at startup, so restart Claude Code.
Is OmniRoute free?
The gateway itself is. For tokens you either pay or spend providers' quotas: 1.62 billion free tokens a month is an estimate across third-party tiers, not a promise from the project. Each provider has its own terms, and some will ask for a card or KYC.
OmniRoute is not working: what should I check?
Go through the questions from the project's guide: is the process running (omniroute or docker restart omniroute), is the key right, is a provider quota exhausted (model: "auto" and a second provider help), and on Windows is the folder from npm config get prefix on PATH. omniroute doctor finds the rest: it checks providers, ports and native dependencies.
Can I send a Claude subscription through OmniRoute?
Anthropic separates subscriptions from API keys, and it does not allow third-party developers to route requests through subscription credentials on behalf of users. Whether your case falls under the ban is for Anthropic to say, not codexkey. A setup on an API key paid per token does not raise the question.