# OpenRouter vs LiteLLM (November 2026): hosted router or own gateway

> OpenRouter charges 5.5% on credits and runs everything for you; LiteLLM is free, MIT-licensed software you host yourself with your own provider keys.

URL: https://claudegpt.si/news/openrouter-vs-litellm  
Published: 2026-11-21T22:56:39.312Z  
Author: ClaudeGPT Si Newsroom  
Section: Reviews  
Topics: OpenRouter, LiteLLM, Comparison, API pricing, Developer tools, Open source  
Publisher: ClaudeGPT Si

## Key takeaways

- OpenRouter is a hosted router that bills inference at provider list price and charges 5.5% on credit purchases on its Standard plan.
- LiteLLM is an MIT-licensed Python SDK and self-hosted proxy that costs nothing to run beyond your own infrastructure; Enterprise pricing is quoted by sales.
- OpenRouter offers zero data retention routing on every plan, while LiteLLM keeps traffic inside your own servers but had two PyPI supply chain attacks in 2026.

OpenRouter vs LiteLLM comes down to who runs the gateway. [OpenRouter](https://openrouter.ai/pricing) is a hosted service: one API key, one bill, hundreds of models, and a 5.5% fee when you buy credits. [LiteLLM](https://github.com/BerriAI/litellm) is open-source software you run yourself, free under the MIT license, that sends your requests to providers using your own API keys.

Both give you one OpenAI-style API in front of many models. The difference is what you give up. With OpenRouter you hand a middleman your traffic and a small cut of your spend, and you get nothing to operate. With LiteLLM you keep the traffic and the money inside your own infrastructure, and you take on the servers, the upgrades and the security of the package.

This comparison is based on the products' docs, pricing pages and GitHub repository as of November 21, 2026. It is not a hands-on test.

## OpenRouter vs LiteLLM at a glance

| | OpenRouter | LiteLLM |
| --- | --- | --- |
| What it is | Hosted API router | Open-source Python SDK and self-hosted proxy (AI gateway) |
| Who runs it | OpenRouter | You, on your own servers or cloud |
| License | Proprietary service | MIT, except the `enterprise/` folder, which has its own commercial license |
| Price of the software | None, you pay per use | $0 for open source; Enterprise is quoted by sales |
| Fees on model usage | 5.5% on credit purchases (Standard), 8% (Business), $0.80 minimum; inference at provider list price | None; you pay each provider directly |
| Bring your own keys | Yes, free up to $25,000 a month of list-price usage, then 5% | Always, it only works with your keys |
| Models | 600+ from 80+ providers, per its pricing page | 100+ providers per the docs; 140+ providers and 1,800+ models per its site |
| Free models | Yes, 20 requests a minute and 50 a day, 1,000 a day after buying $10 of credits | No, it has no models of its own |
| Data path | Through OpenRouter, then the provider | Through your proxy, then the provider |
| Zero data retention | Routing option on every plan, account-wide or per request | Depends on your providers; you control the logs |
| Provider routing and fallbacks | Automatic by price, speed and uptime; `order`, `only`, `ignore`, `sort`, `max_price` | Router with retries, fallbacks and load balancing across deployments you define |
| Budgets and spend tracking | Credits, workspaces, guardrails | Virtual keys with per-key, team and user budgets, RPM/TPM limits |
| SSO | Enterprise plan | Free for up to 5 users, then Enterprise |

## How much OpenRouter costs

OpenRouter has no subscription. You buy credits and spend them on requests. According to its [pricing page](https://openrouter.ai/pricing), inference is billed at each provider's list price with no markup, and the fee is charged when you buy credits: 5.5% on the Standard pay-as-you-go plan, with a $0.80 minimum, and 5% for crypto, per the [FAQ](https://openrouter.ai/docs/faq).

The Business plan charges 8% on credit purchases. In return it adds EU and US in-region routing, workload identity federation, advanced notifications, 1,000 workspaces instead of 5, and a signed data processing agreement on request. SSO, invoicing and contractual SLAs are only on Enterprise, which has discounted fees set by contract.

So on $10,000 of model usage bought as credits, the Standard fee is $550. That is the cost of not running anything yourself.

Unused credits may expire after one year, the FAQ says.

### Bring your own key on OpenRouter

[BYOK](https://openrouter.ai/docs/guides/overview/auth/byok) lets you route OpenRouter requests through your own provider accounts. Your provider bills you directly. OpenRouter charges nothing for the first $25,000 a month of usage, measured at list price, and 5% of the equivalent OpenRouter cost after that, taken from your credits.

You can set your keys to run before OpenRouter's shared capacity or only as a fallback. By default, if your key hits a rate limit, the request falls back to OpenRouter's shared endpoints and spends credits. A per-key setting turns that off.

### Is OpenRouter free

Partly. Its pricing page lists free models, limited to 20 requests a minute and 50 a day. The daily cap rises to 1,000 once the account has bought at least $10 of credits, and failed attempts count toward it. Paid models have no plan-based rate limit; the limits come from the providers.

## How much LiteLLM costs

The open-source version costs nothing. [LiteLLM's site](https://www.litellm.ai/) lists it at $0, "Free forever", with provider integrations, logging integrations such as Langfuse and LangSmith, virtual keys, budgets, teams, load balancing, RPM/TPM limits and guardrails.

What it costs you is the infrastructure and the people to run it: a server or container cluster, a Postgres database for [virtual keys](https://docs.litellm.ai/docs/proxy/virtual_keys), upgrades and on-call. LiteLLM takes no cut of your model spend because the requests go straight from your proxy to the provider on your keys.

### LiteLLM Enterprise pricing

LiteLLM doesn't publish Enterprise prices. Its [enterprise docs](https://docs.litellm.ai/docs/enterprise) say pricing "is based on usage" and depends on deployment size, and quotes come from sales. You can buy through AWS Marketplace, Azure Marketplace or by invoice, and there is a free 30-day trial with a full license.

Enterprise is the same gateway image with a license key. It adds SSO beyond 5 users with SCIM, audit logs, org and team admin roles, secret managers, IP allowlists, JWT auth, tag-based budgets, per-team logging controls and some guardrails, such as secret masking. Every license includes a shared Slack channel with the engineers. The [enterprise page](https://www.litellm.ai/enterprise) lists response targets of 1 hour for a full production outage and 6 hours for a partial one.

## How each one routes your requests

OpenRouter makes the routing decisions for you. Its [provider routing docs](https://openrouter.ai/docs/guides/routing/provider-selection) say that by default it picks a provider for each request based on "measured price, throughput, latency, and reliability", retries failed requests on other providers, and keeps a conversation on one provider while its prompt cache is warm.

You can override that per request with a `provider` object: `order` to set the sequence, `only` and `ignore` to allow or block providers, `sort` by price, throughput or latency, `max_price` to cap what you pay, and `quantizations` to filter by precision. Appending `:nitro` to a model name sorts by speed; `:floor` sorts by price.

LiteLLM routes only to the deployments you configure. Its [docs](https://docs.litellm.ai/docs/) describe a Router with retry and fallback logic and load balancing across deployments: two Azure regions and a direct OpenAI key behind one model name, for example. You get more control and less automation. If a provider you haven't set up is cheaper today, LiteLLM won't find it.

## Zero data retention and privacy

With OpenRouter, every prompt passes through a third party. OpenRouter's FAQ says it logs request metadata such as timestamps, model and token counts by default, but not prompts or completions, and that it doesn't train on customer data.

[Zero data retention](https://openrouter.ai/docs/guides/features/zdr) routing is available on every plan. Turn it on account-wide, or add `"zdr": true` to a request, and OpenRouter sends traffic only to endpoints that don't store prompts or responses after processing. It doesn't cover tools such as web search, and the page says that starting October 27, 2026 all inference, ZDR traffic included, is screened for CSAM in flight.

A ZDR label is a policy, and a test published on November 19 shows its limits. Security firm Dragos found prompts marked for zero data retention being read further down the route, and OpenRouter has since removed the ZDR label from its MiniMax-model endpoints, Ars Technica reported. [The full findings are here](https://claudegpt.si/news/ai-router-canary-credentials-leak).

With LiteLLM, the middleman is your own server. What gets logged depends on how you configure the proxy, and what gets retained depends on the agreements you have with each provider. For teams that can't send data through another company, that settles it.

## Security: LiteLLM's supply chain attacks in 2026

Running your own gateway means trusting the package you install. LiteLLM had two supply chain attacks this year.

On March 24, 2026, compromised versions 1.82.7 and 1.82.8 were published to PyPI, according to LiteLLM's [security update](https://docs.litellm.ai/blog/security-update-march-2026). The official Docker image was not affected. On October 21, 2026, LiteLLM says in its [incident write-up](https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain) that its release pipeline published a compromised version 1.107.0 to PyPI and to its Docker Hub and GHCR images. The artifacts were live for about two hours before they were pulled.

A gateway holds every provider key you own, so this matters more than it would for most libraries. If you run LiteLLM, pin versions, verify images, and check the incident posts against the versions you deployed. OpenRouter is a hosted service, so this particular risk is OpenRouter's to manage, not yours, but you are trusting its security instead.

## Which one to choose

Pick OpenRouter if you want to try many models with one key and no servers, if you need free models for testing, or if you're a small team whose spend makes a 5.5% fee cheaper than an engineer's time. It is also the easier way to reach providers you have no account with.

Pick LiteLLM if your company already has contracts and keys with OpenAI, Anthropic, Azure, Bedrock or Vertex AI, if data can't leave your infrastructure, or if a platform team needs per-team budgets and keys across many apps. At high spend, a 5.5% fee becomes a real line item, and the open-source proxy removes it.

The two aren't exclusive. LiteLLM [supports OpenRouter](https://docs.litellm.ai/docs/providers/openrouter) as a provider, so a team can run its own gateway for budgets and logging and still use OpenRouter behind it for models it has no direct contract for. For the per-token prices of the models themselves, see the [AI API pricing](https://claudegpt.si/news/ai-api-pricing) page.

## Frequently asked questions

### Is OpenRouter free?

OpenRouter has free models limited to 20 requests a minute and 50 a day, rising to 1,000 a day after buying $10 of credits. Paid models are billed at provider list price, plus a 5.5% fee on credit purchases on the Standard plan.

### Is LiteLLM free?

Yes. The open-source SDK and proxy are free under the MIT license, apart from the enterprise folder. You pay your model providers directly and run the servers yourself.

### What is the LiteLLM proxy?

It is a self-hosted, OpenAI-compatible gateway that sits in front of your providers. It adds virtual keys, per-key, team and user budgets, rate limits, logging, guardrails, caching and an admin UI.

### Can LiteLLM use OpenRouter?

Yes. LiteLLM supports OpenRouter as a provider with the openrouter/ model prefix and an OPENROUTER_API_KEY, so a team can run LiteLLM for budgets and logging and reach OpenRouter's models through it.

## Sources

- [OpenRouter pricing](https://openrouter.ai/pricing), OpenRouter
- [OpenRouter FAQ](https://openrouter.ai/docs/faq), OpenRouter
- [BYOK](https://openrouter.ai/docs/guides/overview/auth/byok), OpenRouter
- [Provider routing](https://openrouter.ai/docs/guides/routing/provider-selection), OpenRouter
- [Zero Data Retention](https://openrouter.ai/docs/guides/features/zdr), OpenRouter
- [BerriAI/litellm repository](https://github.com/BerriAI/litellm), GitHub
- [LiteLLM docs](https://docs.litellm.ai/docs/), LiteLLM
- [LiteLLM](https://www.litellm.ai/), LiteLLM
- [LiteLLM Enterprise](https://docs.litellm.ai/docs/enterprise), LiteLLM
- [LiteLLM Enterprise support](https://www.litellm.ai/enterprise), LiteLLM
- [Virtual keys](https://docs.litellm.ai/docs/proxy/virtual_keys), LiteLLM
- [OpenRouter provider](https://docs.litellm.ai/docs/providers/openrouter), LiteLLM
- [Security update: suspected supply chain incident](https://docs.litellm.ai/blog/security-update-march-2026), LiteLLM
- [The attack chain behind the v1.107.0 LiteLLM release](https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain), LiteLLM
- [Three breaches, endless leaks: Your AI supply chain needs canaries](https://www.dragos.com/blog/ai-supply-chain-security-canary-tokens), Dragos
