joshuadablo.comAll posts

September 29, 2026 · 6 min read

Stop Overpaying for AI Tokens: A Practical Look at OmniRoute

OmniRoute is a free, open-source gateway that routes your AI coding agent across providers like Claude and ChatGPT, so a usage limit no longer stops your work or pushes you onto expensive API rates.

Video not loading? Watch the reel on Facebook.

If you code with an AI agent, you know the moment. You are halfway through a task, and the agent stops: usage limit reached. You can wait for the reset, or switch to pay-per-token API pricing and watch the bill climb.

Most of us already pay for more than one AI service: a Claude plan, a ChatGPT plan, maybe an API key or two. The problem is that they don't talk to each other. When one runs out, moving to the next is manual work, and it is easy to end up paying premium rates for requests a cheaper model could have handled.

OmniRoute is built to fix that.

What OmniRoute is

OmniRoute is an open-source (MIT-licensed), self-hosted AI gateway. It runs on your own machine and gives you a single OpenAI-compatible endpoint:

http://localhost:20128/v1

You connect your provider accounts to OmniRoute once. Then you point your tools (Claude Code, Codex, Cursor, Cline, Aider and many others) at that one endpoint instead of at each provider directly. For every request, OmniRoute decides which provider and model should handle it.

At the time of writing, the project lists support for 394 providers. You only need the ones you already have accounts for.

How it saves you money

1. It falls back instead of stopping. OmniRoute's main feature is the "combo": a chain of models it routes across automatically. If your quota runs out or a provider fails, the request moves to the next healthy option. The project describes a four-tier order: subscription first, then API, then cheap models, then free tiers.

2. It uses what you already pay for first. Two routing modes are aimed at people with subscriptions, and there are a few others:

Model IDWhat it does
auto/subscriptionUses only the subscription quota you already pay for. If that runs out, the request fails instead of silently billing you.
auto/thriftyUses your plan quota first, then steps up one level at a time to the cheapest paid options, and returns to the plan when it resets.
auto/cheapPicks the cheapest model per token.
auto/fastPicks the lowest-latency option.
autoA balanced default that sticks with the last provider that worked.

3. It compresses what you send. OmniRoute can shrink prompts and tool output before they reach the provider. The project claims savings of 15% to 95% on eligible workloads. Treat that as a best case and measure it on your own work.

4. It shows you where the money goes. Responses carry cost and usage headers, the dashboard tracks spending, and you can set a spending cap in US dollars per API key. That last one matters if an agent runs unattended.

Setting it up

You need Node.js installed. Then:

1. Install and run it

npm install -g omniroute
omniroute

The dashboard opens at http://localhost:20128. If you are on npm 11 or later, npm may block the install scripts OmniRoute needs; the README lists the exact --allow-scripts command to use.

2. Connect a provider. In the dashboard, go to Providers, choose one, and add its API key or complete its sign-in flow. This uses your own account.

3. Point your coding tool at OmniRoute

Base URL: http://localhost:20128/v1
API Key:  (copy from Dashboard → Endpoints)
Model:    auto

4. Check that it works

curl http://localhost:20128/v1/models -H "Authorization: Bearer YOUR_KEY"

You should see your connected models listed.

There is also a shortcut for supported command-line tools, which launches the tool through OmniRoute without editing any config files:

omniroute run claude --model openai/gpt-5.4

If something misbehaves, omniroute doctor checks your providers, ports and dependencies.

What to know before you rely on it

OmniRoute is useful, but it sits between you and every AI provider you use, so go in with open eyes.

Is it worth it?

OmniRoute is a good fit if you:

You can skip it if one plan covers everything you do.

For me, the appeal is simple: I already pay for these tools, and I want to use all of what I pay for before I spend anything more.

Try it: OmniRoute on GitHub

If this was useful, watch the reel and follow my Facebook page for more AI tools that save time and money.