LiteLLM vs Portkey vs OpenRouter: 2026 LLM Gateway Comparison

Three gateways, three philosophies. LiteLLM is open-source and self-hosted with zero markup; Portkey is an enterprise SaaS for governance and observability; OpenRouter is managed-only with a per-request markup for instant multi-provider access. Here is how they compare across the dimensions that decide production deployments.

By the LLM Academy team · Reviewed June 2026 · Based on 2026 docs and vendor comparisons (TrueFoundry, PkgPulse, DevelopersDigest)

TL;DR — Which gateway should you pick?

Pick LiteLLM if you want full control, zero per-request markup, and the ability to self-host — it is the default for cost-conscious engineering teams. Pick Portkey if you need enterprise governance, RBAC, audit trails, and observability without running infrastructure. Pick OpenRouter if you want the fastest possible start (one API key, every model) and are willing to pay a small markup to skip deployment entirely.

Decision rule

Cost-sensitive + self-host → LiteLLM. Enterprise governance + SaaS → Portkey. Fastest start + managed → OpenRouter.

The three gateways at a glance

All three solve the same core problem — a unified OpenAI-compatible API across many providers — but they differ sharply in deployment model, pricing structure, and target buyer. Understanding each gateway's origin tells you who it is built for.

GatewayDeploymentPricing modelBest for
LiteLLMOpen-source, self-hosted (or managed tier)Free (MIT); you pay providers directlyEngineering teams, cost control
PortkeyManaged SaaS (self-host option)SaaS subscription + usageEnterprise governance, observability
OpenRouterManaged onlyPer-request markup on provider priceFast start, multi-provider access

[IMAGE: Architecture diagram — your app → gateway → multiple providers (OpenAI, Anthropic, Gemini, Bedrock, self-hosted vLLM)]

Routing and fallbacks

All three support multi-provider routing and fallback chains, but with different sophistication. LiteLLM supports cost-based routing (send to cheapest model), latency-based routing, and weighted load balancing across replicas — all configurable in YAML. Portkey adds conditional routing with intelligent model selection based on request content, and its fallback chains are enterprise-grade with fine-grained control. OpenRouter handles routing server-side with provider fallbacks automatically, but offers less granular control than the other two since you do not operate the infrastructure.

The practical test: if a provider goes down, all three failover to your next choice. The difference is how much you can tune which model handles which request. LiteLLM gives you the most knobs; OpenRouter gives you the fewest (by design — it abstracts them away).

Cost control

This is where the three diverge most sharply. LiteLLM adds zero markup — you pay the provider's price directly, and LiteLLM tracks per-team, per-user, per-model spend in a PostgreSQL database so you can enforce budgets. Portkey provides similar budget governance and cost tracking as part of its SaaS, bundled with the subscription. OpenRouter charges a per-request markup on top of provider pricing — the cost of not running infrastructure.

At scale, the markup matters. A team spending $10,000/month on tokens through OpenRouter pays a premium over the same volume routed through a self-hosted LiteLLM proxy. The tradeoff is operational: OpenRouter requires zero maintenance, while LiteLLM means you own uptime, upgrades, and observability. For a step-by-step LiteLLM setup that includes budget controls, see our self-host LiteLLM guide.

Observability and governance

According to the 2026 TrueFoundry comparison, Portkey is purpose-built for enterprise observability — request tracing, prompt management, RBAC, audit trails, and governance controls are first-class features. LiteLLM offers logging, spend tracking, and basic tracing, and integrates with external observability platforms (Langfuse, LangSmith) for deeper analysis. OpenRouter provides dashboard-level usage analytics but is the thinnest on deep observability since you do not control the proxy.

For teams that must satisfy compliance reviews (SOC 2, HIPAA, internal audit), Portkey's governance story is the strongest out of the box. LiteLLM can meet the same bar with configuration and external tooling, but you build more of it yourself.

Self-hosting and data residency

LiteLLM is the only one you can fully self-host — the proxy runs in your VPC, requests never leave your network unless they go to the provider, and you own every byte of log data. This matters for regulated industries and EU data residency requirements. Portkey offers a self-host option but its full feature set shines in the managed SaaS. OpenRouter is managed-only — every request transits OpenRouter's infrastructure, which is unacceptable for some data-sensitive workloads.

For teams already running self-hosted inference (vLLM), LiteLLM is the natural upstream gateway — it routes to your vLLM replicas for cheap self-hosted traffic and falls back to OpenAI/Anthropic for capabilities your self-hosted models lack.

Feature comparison matrix

FeatureLiteLLMPortkeyOpenRouter
Open-source✓ MITPartial
Self-hostable✓ Full✓ Limited
Provider count100+1600+ models300+ models
Per-request markup$0SaaS subYes
Cost-based routingLimited
Fallback chains
Semantic caching✓ (Redis)Limited
Per-team budgets✓ (Postgres)Basic
RBAC / governanceBasic✓ StrongBasic
Request tracing✓ (external)✓ NativeDashboard
OpenAI-compatible API

When to pick LiteLLM

Pick LiteLLM when cost control and self-hosting are the priority. It is the right choice for engineering teams that already run infrastructure, want to combine self-hosted models (vLLM) with API providers, and refuse to pay a per-request markup. The 100+ provider support and YAML-driven configuration make it flexible enough for most production setups. The trade-off is operational ownership — you maintain uptime, upgrades, and observability.

For the full deployment walkthrough with budget controls and team keys, see our self-host LiteLLM tutorial.

When to pick Portkey

Pick Portkey when enterprise governance and observability outweigh marginal cost savings. If your organization needs RBAC, audit trails, prompt management, and compliance-ready logging without building it yourself, Portkey's SaaS is purpose-built for it. The managed model means your team spends zero cycles on gateway operations. The cost is the subscription plus whatever usage fees apply — acceptable when the alternative is hiring platform engineers to build equivalent controls.

When to pick OpenRouter

Pick OpenRouter when speed-to-market and simplicity are paramount. One API key gives access to hundreds of models across every provider, with automatic fallbacks and zero infrastructure. This is ideal for prototypes, internal tools, and early-stage products where the per-request markup is trivial compared to engineering time saved. As volume grows and the markup compounds, many teams migrate from OpenRouter to a self-hosted LiteLLM proxy.

FAQ

Is LiteLLM free to use?

LiteLLM is open-source under the MIT license and free to self-host — you pay only the underlying provider API costs with zero per-request markup. A paid managed tier exists for teams that want hosted infrastructure without operating it.

Does OpenRouter add a markup?

Yes. OpenRouter charges a per-request markup on top of provider pricing in exchange for a single API key, managed routing, and zero infrastructure. The tradeoff is convenience versus marginal cost per call — at high volume, teams often migrate to self-hosted LiteLLM.

Which gateway is best for enterprise?

Portkey is engineered for enterprise needs — RBAC, governance, audit trails, and native observability. LiteLLM also supports enterprise features via its self-hosted proxy with PostgreSQL, but Portkey's managed SaaS reduces the operational burden.

Can I use these with self-hosted models?

Yes. LiteLLM and Portkey both route to self-hosted endpoints like vLLM. This lets you blend cheap self-hosted inference with API providers for capabilities your local models lack.

Related deep dives

Sources

Feature sets and pricing change frequently in the gateway space. Verify against each vendor's current docs before committing to a production deployment.