OpenRouter vs LiteLLM: Hosted Marketplace or Self-Hosted Gateway in 2026
Short answer: OpenRouter and LiteLLM are not the same kind of product, which is why the comparison keeps going wrong. OpenRouter is a hosted marketplace: you buy credits, it holds the provider accounts, and it takes a cut at the credit or BYOK boundary. LiteLLM is an open-source proxy you deploy on your own infrastructure: you keep the provider accounts, you pay the providers directly, and you pay in engineering time instead of fees. Pick OpenRouter if you want one bill and a large catalog today. Pick LiteLLM if the gateway has to live inside your network and someone can own upgrades, Postgres and Redis.
Written 1 Dec 2026 by the SentioGate team. We build a hosted BYOK router, so read the recommendation section with that in mind; every competitor claim below links to its own docs or pricing page.
The fee structures are not comparable line items
Most "OpenRouter vs LiteLLM" threads compare a percentage with a dollar figure and stop. That comparison is wrong in both directions.
OpenRouter's costs:
- Credits carry a purchase fee. OpenRouter's pricing page and FAQ describe a fee on credit purchases (commonly quoted around 5%, and 5.5% with payment processing); check the current rate on their pricing page before you model it.
- BYOK is free up to a list-price threshold. Their FAQ states BYOK is fee-free up to $25,000/month at list price, then a 5% fee applies to usage above that, deducted from OpenRouter credits. That is a real change from the older "flat 5%" story many blog posts still repeat.
- Free model variants (
:free) exist but are rate-limited and capped daily; they are for evaluation, not production.
LiteLLM's costs:
- The open-source proxy and SDK carry no usage fee, no log limits and no request quota. Virtual keys, budgets, fallbacks, logging and Prometheus metrics are in the open-source package.
- You pay for infrastructure: a host, Postgres, and Redis for the proxy. A small always-on deployment is typically a low double-digit dollar figure per month on a VPS, more if you need HA.
- You pay for people: upgrades, dependency pinning, database maintenance and on-call. This is the line item teams forget, and it is the one that decides the comparison at low volume.
So the honest framing is: OpenRouter is a fee that scales with spend, LiteLLM is a fixed cost plus a variable engineering cost that does not scale with tokens.
Cost at 5M and 50M tokens a month
The crossover depends almost entirely on your monthly token bill. Worked example, assuming a blended $5 per million tokens (input and output mixed, which is roughly mid-tier frontier pricing in late 2026):
| Monthly token bill | OpenRouter fee at 5% on credits | OpenRouter BYOK (under $25k list) | LiteLLM | Winner |
|---|---|---|---|---|
| $25 (5M tokens) | ~$1.25 | $0 | ~$20 infra + engineering | OpenRouter |
| $250 (50M tokens) | ~$12.50 | $0 | ~$20 infra + engineering | OpenRouter |
| $2,500 | ~$125 | $0 | ~$20–60 infra + engineering | Depends on who owns it |
| $25,000+ | ~$1,250 | 5% above threshold | ~$60–200 infra + engineering | LiteLLM if you have the team |
Two things fall out of that table. First, if you are already buying provider keys directly, OpenRouter's BYOK mode is free below $25k/month of list-price usage, so the "OpenRouter takes 5% of everything" claim is outdated for most teams. Second, at $250/month of tokens, no fee structure justifies running your own proxy for cost reasons — the infrastructure and the person-hours dominate.
Self-hosting LiteLLM becomes a cost win when the token bill is large enough that a percentage is real money, or when the alternative is not a fee at all but an impossibility (the traffic cannot leave your network).
Where each one actually differs
| OpenRouter | LiteLLM | |
|---|---|---|
| Who holds provider accounts | OpenRouter (or your BYOK keys) | You |
| Deployment | Hosted, nothing to run | Self-hosted proxy (pip or Docker) |
| Pricing model | Credit purchase fee / BYOK fee above threshold | No usage fee; infra + engineering |
| Catalog | Very large, one endpoint, router-managed models | 100+ providers through the SDK/proxy |
| Fallback | Router-level fallbacks | Router with fallbacks, retries, load balancing |
| Virtual keys and budgets | Org/team limits on the platform | Virtual keys, budgets, rate limits in OSS |
| MCP gateway | No | Yes |
| Data residency | Traffic passes through OpenRouter | Stays in your infrastructure |
| Claude Code support | Via OpenRouter models | Documented Claude Code tutorial |
| Operational burden | None | Upgrades, Postgres, Redis, scaling, supply chain |
The last two rows decide most real decisions. OpenRouter wins on time-to-first-request. LiteLLM wins on control and on keeping prompts inside your perimeter.
The supply-chain lesson that applies to both
In March 2026, two litellm releases on PyPI (1.82.7 and 1.82.8) shipped with a credential-stealing payload, traced to a compromised scanner in the release pipeline. LiteLLM's own write-up says proxy Docker users were not affected because that image pins dependencies, and the project rebuilt its release pipeline afterwards. The takeaway is not "avoid LiteLLM" — it is that self-hosting means you own the dependency graph, and that pinning plus artifact verification is part of the price you pay for control. A hosted marketplace removes that risk class and replaces it with "trust the operator".
When OpenRouter is the better choice
- You want to try many models this week and do not want provider accounts with each lab.
- Your monthly token bill is under a few hundred dollars; fees and infra costs are rounding errors next to your time.
- You are happy for requests to pass through a third party.
- You want a single prepaid balance rather than a dozen billing relationships.
When LiteLLM is the better choice
- Prompts, responses or keys must stay inside your VPC or cluster (regulated data, internal policy, customer contracts).
- You need virtual keys, budgets and an MCP gateway behind one endpoint.
- Your token bill is large enough that a percentage is a line item someone reviews monthly.
- You already run Kubernetes and have someone who owns platform dependencies.
The third option: hosted, but on your own keys
There is a middle position that neither product occupies. SentioGate is a hosted router that works like LiteLLM in one respect — it uses your provider keys and charges 0% token markup — and like OpenRouter in another: there is no proxy to deploy, patch or scale. You point an OpenAI-compatible client at https://api.sentiogate.dev/v1, send model: "auto" or a model you have a key for, and requests route across your enabled models with key failover, then model failover, honoring Retry-After on 429s. It is free during the 90-day beta, with Pro at $9 and Team at $18 a month planned but not yet purchasable.
It is the wrong choice if you need the gateway inside your own network or need an MCP gateway — it has neither. Those requirements point to LiteLLM or Bifrost, and we say so in the LiteLLM alternatives comparison.
FAQ
Is OpenRouter cheaper than LiteLLM?
Not in a single number. OpenRouter charges a fee on credit purchases (BYOK is free below $25k/month of list-price usage), while LiteLLM has no usage fee but costs infrastructure and engineering time. Below a few hundred dollars of monthly tokens, OpenRouter is usually cheaper in practice.
Does OpenRouter charge a fee for BYOK?
OpenRouter's FAQ says BYOK is fee-free up to $25,000 per month at list price, then 5% of what the same model would cost on OpenRouter is deducted from your credits. Confirm the current terms on their pricing page.
Is LiteLLM free?
The open-source proxy and SDK are free and carry no request quota. You pay for the servers, database and Redis they run on, and for the time spent operating them.
Can I run LiteLLM without a database?
For a single-user smoke test, yes. For virtual keys, budgets and spend tracking — the reasons people deploy the proxy — you need Postgres, and Redis for caching and rate limits.
Which one supports Claude Code?
Both. LiteLLM documents a Claude Code tutorial; OpenRouter exposes Anthropic models you can point Claude Code at. SentioGate exposes /v1/messages natively, with Claude models requiring your own Anthropic or OpenRouter key.
Which one should I pick for a regulated workload?
LiteLLM, or another self-hosted gateway, if traffic cannot leave your infrastructure. A hosted marketplace or router means requests pass through a third party, which is usually a procurement question before it is a technical one.
Sources
Accessed 1 Dec 2026 unless noted.
- OpenRouter pricing and OpenRouter FAQ (BYOK fee threshold)
- LiteLLM proxy (AI Gateway), routing, security update, March 2026
- SentioGate docs and pricing
- Related: LiteLLM vs Bifrost vs Helicone vs SentioGate, OpenRouter alternative, OpenRouter vs direct API