# LiteLLM vs OpenRouter: One API for Every Model (2026)

> LiteLLM vs OpenRouter compared — self-hosted gateway library vs hosted model marketplace. Keys, billing, control, and which unified LLM layer fits.

Same promise — call 100+ models through one OpenAI-format API — opposite architectures. LiteLLM is software you run: an open-source SDK/proxy using your own provider keys, with routing, budgets, and full control inside your infra. OpenRouter is a service you call: one key, one bill, instant access to the whole catalog, marketplace conveniences for a small markup.

LiteLLM and OpenRouter solve the same modern annoyance — every provider has its own API shape, keys, and billing — from opposite ends: **run a gateway** or **rent one**.

## The short answer

- **Platform team, compliance perimeter, provider contracts, internal budgets** → **LiteLLM** (self-hosted proxy).
- **Ship today, explore the whole model catalog, one bill** → **OpenRouter**.
- **Both** is a legitimate architecture: LiteLLM as your control plane, OpenRouter as one routable upstream.

## What each is

**LiteLLM** is open-source software with two faces: a Python SDK that translates 100+ providers into the OpenAI format in-process, and — the heavyweight use — a **proxy server** you deploy as your org's LLM gateway: virtual keys per team, budgets and rate limits, routing and fallbacks across providers, spend tracking, callbacks into your observability. Your keys, your perimeter, your rules. [Tool profile →](/tools/litellm)

**OpenRouter** is a hosted marketplace-gateway: one account, one key, one OpenAI-compatible endpoint in front of essentially every notable model — frontier APIs and open-weight hosts alike — with unified billing, model discovery/rankings, and provider routing (including fallbacks) handled service-side for a small fee on top of provider prices. Zero infrastructure, instant breadth. [Tool profile →](/tools/openrouter)

## Dimension by dimension

| | LiteLLM | OpenRouter |
| --- | --- | --- |
| Form | OSS SDK + self-hosted proxy | Hosted service |
| Keys & billing | Your provider keys, direct bills | One key, one consolidated bill |
| Data path | Your infra → providers | Through OpenRouter |
| Governance | Virtual keys, budgets, teams | Account-level controls |
| Catalog breadth | What you wire up | The whole menu, instantly |
| Cost | Free software; provider prices | Provider prices + platform fee |
| Ops | Yours | None |

## How to actually choose

Ask who the gateway is *for*. If it's for **your organization** — many teams, cost attribution, compliance reviews, negotiated provider contracts — LiteLLM is the pattern that scales: requests never leave your perimeter for a third party, and the proxy becomes the place budgets, fallbacks ([the wrapper pattern](/skills/api/provider-fallback-wrapper)), and logging live. If it's for **you or a small product** that mainly wants *access* — try models, switch freely, skip five provider accounts — OpenRouter's one-key marketplace is unbeatable, and the markup is cheap against engineer-hours.

The hybrid deserves its reputation: many stacks run LiteLLM internally with OpenRouter configured as an upstream — internal control plane, external catalog. Where these two sit against the *capability* gateways (Portkey and Helicone's caching/observability angle) is covered in [Calling Any Model](/guides/concepts/calling-any-model-gateways) and [LLM Gateways Compared](/guides/advanced/llm-gateways-compared).

---

_Source: https://agentscamp.com/guides/comparisons/litellm-vs-openrouter — Guide on AgentsCamp._
