LiteLLM vs OpenRouter
Both are alternatives to Portkey. Here's how they stack up — verified facts, no spin.
Also searched as OpenRouter vs LiteLLM — same comparison, one verdict.
LiteLLM
TOP PICKOne OpenAI-compatible API in front of 100+ providers, running on your own box.
LiteLLM is the de facto open gateway for this layer: a proxy that exposes an OpenAI-compatible endpoint in front of 100+ providers, with virtual keys, per-team budgets, rate limits, fallbacks and logging. You run it, so prompts never leave your infrastructure and there is zero markup on token spend — you pay the model providers directly. At 55k GitHub stars with commits landing daily it is the most widely adopted option here. Licensing is worth reading precisely: the core is MIT, while everything under the repository's enterprise/ directory carries a separate commercial licence.
OpenRouter
One key, hundreds of models, nothing to run — the honest hosted pick.
OpenRouter is a hosted router: a single API key and one OpenAI-compatible endpoint in front of hundreds of models across providers, with automatic fallback and a unified bill. There is nothing to deploy and no subscription — you pay per token with a small margin on top of provider rates. If what you actually wanted was to stop juggling five provider accounts, this solves it in an afternoon and is frequently the right answer even for teams who could self-host.
Side by side
| LiteLLM | OpenRouter | |
|---|---|---|
| Sovereignty Score | 90 | 32 |
| Open source | Yes | No |
| Self-hostable | Yes | No |
| Local-first | Yes | No |
| License | MIT (core); enterprise/ directory under a separate commercial licence | Proprietary (hosted service) |
| Pricing | Free and self-hosted — you pay the model providers directly with no markup, plus hosting for a small VM (roughly $20–50/month). A paid enterprise tier exists for SSO, audit logs and support. | No subscription — pay-as-you-go per token at provider rates plus a small margin. Some free models are available. |
LiteLLM is Macrostack's recommended Portkey alternative, so it's our pick here.
LiteLLM
Strengths
- +Zero markup — provider tokens are billed to you at cost
- +Prompts and completions never leave your infrastructure
- +Virtual keys, per-team budgets and rate limits built in
- +100+ providers behind one OpenAI-compatible endpoint; 55k stars, daily commits
Trade-offs
- −You run it: deployment, upgrades, monitoring and uptime are yours
- −Observability is basic out of the box — expect to pair it with a tracing tool
- −The MIT core stops at the enterprise/ directory; SSO and audit logging sit behind a commercial licence
- −A proxy you operate is another production dependency to keep healthy
OpenRouter
Strengths
- +Zero operations: one key, one endpoint, hundreds of models
- +No monthly fee — you pay only for tokens used
- +Unified billing across providers, with automatic fallback
- +The fastest way to test many models without opening accounts everywhere
Trade-offs
- −Hosted and proprietary: every prompt transits OpenRouter
- −A margin on token spend rather than provider cost
- −No self-hosting path at all
- −Score of 32 reflects a closed hosted service — a transparency lens, not a judgement on quality
Related alternative guides
Facts verified 2026-07-30. Licenses and pricing change — spotted something out of date? That's a correction we want.