OpenRouter vs LiteLLM: hosted gateway or open source? (2026)

By Felix Wunderlich -

Updated August 18, 2026. We revisit this comparison as the market moves.

If you are weighing OpenRouter against LiteLLM, the short answer is that you are choosing between two different kinds of product, not two versions of the same one. OpenRouter is a hosted model marketplace, one account and one bill with nothing to deploy, while LiteLLM is an open-source proxy you run in your own infrastructure with your own provider keys, so the real decision is hosted convenience versus operational control. This comparison walks through what each does well, what each actually costs and where your data goes, with every claim linked to the vendors' own pages.

One disclosure up front: Opper is our product and appears later as a third option, so read that section knowing where we stand. Everything else comes from OpenRouter's and LiteLLM's own documentation.

How do OpenRouter and LiteLLM compare at a glance?

What mattersOpenRouterLiteLLMOpper
What it isHosted model marketplace and router, one account plus creditsMIT-licensed SDK plus a self-hosted proxy you operate yourselfHosted European gateway and control plane, one account
DeploymentFully hosted, nothing to runYou deploy, scale and patch it; Postgres required for virtual keysFully hosted, nothing to run
Model access400+ models from 70+ providers via one key, vendor-stated140+ providers and 1,800+ models, vendor-stated, with your own provider keys700+ models, verifiable live, one key
Keys and billingOne key, one bill; no markup on inference, fees on credit purchasesFree software; you hold direct provider accounts and pay each provider at list priceOne key, one bill; no markup on inference, fee on credit purchases
Failover and routingAutomatic provider routing and fallbacks inside its marketplaceFallbacks, cooldowns, retries and multiple load-balancing strategies, configured by youAliases with automatic cross-provider fallback, zero config
ObservabilityUsage dashboard; prompts not logged by defaultCallbacks to Langfuse, OpenTelemetry, Datadog, S3 and more, assembled by youPer-call cost, latency and tokens built in, tracing on the Control Plane
Privacy and residencyPer-provider retention policies, EU processing on enterprise onlyYour infrastructure; air-gapped deployment possible on enterprisePlatform in AWS Stockholm, EU routes end to end, metadata only by default
EnterpriseEnterprise plan with EU processing and a higher BYOK allowanceSSO, RBAC, audit logs and SLA support, pricing unpublishedZDR where providers lack it, exportable audit logs

What do you get with OpenRouter?

OpenRouter is the reference point among hosted model routers, and getting started is genuinely a two-minute job: you point your existing OpenAI SDK at https://openrouter.ai/api/v1, buy credits, and every model on the platform is available through one key. The homepage claims 400+ models, 70+ providers, 200T+ monthly tokens and 10M+ users, vendor-stated numbers, but they match its standing as the largest developer community in the category. Routing and provider fallbacks happen inside the marketplace without configuration, uptime is tracked on a public status page, and the free on-ramp is real: 50 free-model requests a day without credits, 1,000 a day once you have purchased $10 of credits.

What you give up is any say over the infrastructure, there is no self-hosted version, and the privacy story depends on which upstream provider ends up serving your request, which we cover below.

What do you get with LiteLLM?

LiteLLM comes in two shapes: a Python SDK that calls provider APIs in the OpenAI format, and a proxy server that adds authentication, virtual keys, budgets, cost tracking, guardrails and an admin dashboard for teams. The core is MIT-licensed, with an explicit carve-out that places everything under the enterprise/ directory on a commercial license, and the project is one of the healthiest in open-source AI, sitting at 56k+ GitHub stars with a very active commit history. Its homepage claims 140+ providers and 1,800+ models, vendor-stated, all reached through provider accounts and keys that you hold directly.

The router deserves genuine credit, it is more configurable than anything OpenRouter exposes: load-balancing strategies from simple shuffle to latency-, usage- and cost-based routing, plus cooldowns, retries with backoff and provider failover, all under your control. The trade is that you operate the whole stack yourself: virtual keys require a Postgres database, observability beyond the admin dashboard is assembled from callbacks to Langfuse, OpenTelemetry, Datadog, S3 and others, and the enterprise tier with SSO, SCIM, RBAC, audit logs and 24/7 SLA support has no published price, you can self-serve a 30-day trial key but the price itself is a sales conversation.

What does each one actually cost?

OpenRouter passes through provider pricing with no markup on inference and earns its fee when you buy credits instead, 5.5% with a $0.80 minimum on card payments or 5% via crypto. Bringing your own provider keys is free up to a $25,000 monthly usage allowance on pay-as-you-go accounts, $200,000 on enterprise, and above the allowance BYOK requests carry 5% of what the same model and provider would normally cost on the platform.

LiteLLM's software is free, so its cost is denominated in engineering time rather than fees: you pay each provider directly at list prices, and you budget for deploying the proxy, running its Postgres dependency, scaling it, patching it and carrying it on-call. For a platform team that already operates services this can be a rounding error, for a two-person startup it is often the whole decision. The enterprise license is custom-priced, with a free 30-day trial.

Where does your data go with each?

OpenRouter's own logging default is strong: its FAQ states that prompts and completions are not logged by default, and opting in to logging earns a 1% usage discount. The nuance sits one layer down, because each provider on the marketplace has its own data handling policy, which OpenRouter surfaces in a per-provider table where entries range from zero retention to a stated number of days to unknown, alongside a training opt-out in account settings that stops routing to providers that train on inputs. Processing pinned inside the European Union is an enterprise-only feature with its own base URL at eu.openrouter.ai.

With LiteLLM the proxy's residency is simply your infrastructure, and enterprise deployments can run air-gapped. One caution applies to both products: gateway residency is not inference residency. A proxy self-hosted in Frankfurt still sends prompts to whichever provider endpoints you configure, so keeping inference in Europe is a question of which upstream routes you choose, not of where the gateway itself runs.

Which one should you pick?

The honest heuristic is unglamorous. If you have no infrastructure team and want breadth today, pick OpenRouter, one key and one bill is exactly what a small product team needs. If you have a platform team, a compliance mandate that traffic terminates only at endpoints you approve, or a hard requirement to run inside your own VPC, pick LiteLLM, that is precisely what it is built for and why it is the open-source default. The choice is not even exclusive: LiteLLM supports OpenRouter as an upstream provider, so a common pattern is LiteLLM at the edge of your infrastructure with OpenRouter as one provider behind it. If your shortlist is wider than these two, we maintain a sourced ranking of the best LLM gateways.

Is there a third option?

There is a gap between these two that many teams fall into: they want the hosted experience of OpenRouter, no proxy to run and one API for everything, but with the residency and observability posture that usually pushes people toward self-hosting. That gap is what Opper is built for. The platform runs in AWS Stockholm, routes to 700+ models, and speaks the OpenAI, Anthropic and Gemini SDK formats on one base URL, https://api.opper.ai/v3/compat, so migrating is a config change rather than a rewrite. The gateway stores no prompts or responses by default, only metadata, tracing and cost accounting are built in rather than assembled from callbacks, uptime is published on a public status page, and pricing is pay-as-you-go. We keep detailed head-to-heads against both products at Opper vs OpenRouter and Opper vs LiteLLM, and the compliance details, including the sub-processor list, live in our AI compliance overview.


OpenRouter vs LiteLLM FAQ

What is the difference between OpenRouter and LiteLLM?+

OpenRouter is a hosted model marketplace: you buy credits, get one API key and reach hundreds of models with nothing to deploy. LiteLLM is an open-source SDK and proxy you host yourself, using your own provider keys and paying each provider directly. The practical choice is hosted convenience versus operational control, not two versions of the same product.

Does OpenRouter add a markup on tokens?+

No. Its FAQ states there is no markup on inference pricing, with fees applied when you purchase credits instead: 5.5% with a $0.80 minimum on card payments, or 5% via crypto. BYOK usage is free up to a $25,000 monthly allowance on pay-as-you-go accounts, then carries 5% above it.

Is LiteLLM really free?+

The core is genuinely free under the MIT license, with everything under the enterprise/ directory carved out onto a commercial license. Features like SSO, RBAC and audit logs sit behind enterprise pricing that is not published, and the real cost of the free tier is operational: you run the proxy, its Postgres database and its upgrades yourself.

Can I use LiteLLM and OpenRouter together?+

Yes. LiteLLM supports OpenRouter as a provider, you prefix the model name with openrouter/ and set an OPENROUTER_API_KEY, and its docs state that all OpenRouter models are supported. A common pattern is LiteLLM as the proxy inside your infrastructure with OpenRouter as one upstream alongside your direct provider keys.

Can I self-host OpenRouter?+

No, OpenRouter is a hosted service only. If self-hosting is a hard requirement you are on the LiteLLM side of this comparison, and if what you actually need is control over where data lives rather than running infrastructure yourself, a hosted gateway with the right residency posture can be the simpler path, the trade-offs are covered in our LLM gateway guide.

Does OpenRouter store or train on my prompts?+

Not by default: its FAQ states prompts and completions are not logged unless you opt in, which earns a 1% discount on usage. Retention at the upstream provider is a separate question, each provider has its own policy shown in OpenRouter's per-provider table, and a training opt-out in account settings stops routing to providers that train on inputs.

Which option keeps data in Europe?+

OpenRouter offers EU processing as an enterprise-only feature through eu.openrouter.ai. LiteLLM inherits whatever infrastructure you run it on, though prompts still travel to the provider endpoints you configure. For a hosted European route, Opper runs its platform in Stockholm and stores no prompts or responses by default, the details are in our AI compliance overview.

Which should a small team pick?+

With no one to run infrastructure, go hosted: OpenRouter if catalog breadth is the priority, Opper if you want European hosting with observability built in. Pick LiteLLM when you have a platform team and a mandate to keep the gateway inside your own infrastructure. Our head-to-head pages on Opper vs LiteLLM and Opper vs OpenRouter go deeper on both.

Try the hosted European option

If your evaluation ends at catalog breadth the answer is OpenRouter, and if it ends at running everything yourself it is LiteLLM, both are good products that have earned their positions. If it ends at hosted, European and observable in one place, create a free Opper account and make your first call in minutes, or browse the 700+ models it routes to first.