The best LLM gateway is the one that puts your prompts where you can defend them. OpenRouter suits teams that want hundreds of models on one bill. LiteLLM suits teams that must self-host. Cloudflare AI Gateway suits teams that already pay providers directly and want free caching and logs. Portkey suits enterprises buying security governance.
IN SHORT: A gateway sits between your app and the model providers and decides which model runs, what it costs and where your prompt goes. After OpenRouter pulled 125 endpoints from zero data retention in November 2026, check one thing before price: can you pin a request to a provider you trust, and stop it falling back to one you don't?
This review is based on vendor documentation and public pricing as of November 2026. We have not run these gateways under production load; the "How we'd test it" section says how we would.
Key facts
| OpenRouter platform fee | 5.5% (Standard), 8% (Business), negotiated (Enterprise) |
| OpenRouter BYOK | No platform fee on the first $25,000 of list-price inference a month, then 5% |
| OpenRouter ZDR incident | Nov 22, 2026: 3 providers off-boarded, 125 endpoints removed from ZDR eligibility |
| Portkey ownership | Acquired by Palo Alto Networks; completion dated May 29, 2026 in the press release |
| LiteLLM license | MIT, 100+ providers behind one OpenAI-compatible endpoint |
| Cloudflare AI Gateway | Core features free; 5% fee on Unified Billing credit purchases |
| Cloudflare cache TTL | 60 seconds minimum, one month maximum, exact-match only |
| Last checked | November 28, 2026 |
What does an LLM gateway actually control?
A gateway controls three things: routing (which model and which provider serves a request), cost (caching, budgets, rate limits) and data flow (which companies see the prompt). If you're new to the idea, our explainer on what an LLM gateway is covers the basics.
The part most teams miss is the difference between a model and a provider. One open-weight model can be served by a dozen inference companies, each with its own data policy. A gateway that load-balances across them is choosing, request by request, who reads your prompt. That's fine for public text. It's not fine for customer records, contracts or code with secrets in it.
If you already know this: the fallback default is the risk. OpenRouter's
allow_fallbacksdefaults to true, and its default routing weights providers by price, throughput, latency and reliability. Pinning changes that, and it's one line of JSON.
How do the four gateways compare?
| OpenRouter | Portkey | LiteLLM | Cloudflare AI Gateway | |
|---|---|---|---|---|
| Hosting | Hosted marketplace and router | Hosted (now Prisma AIRS AI Gateway); MIT open-source gateway | Self-hosted; MIT open source; Enterprise runs in your infrastructure, including air-gapped | Hosted on Cloudflare's network |
| Routing | Load balancing across providers; order, only, ignore, sort by price, throughput or latency; max_price |
Fallbacks on configurable errors, up to 5 retries with backoff, weighted load balancing | Load balancing, fallbacks and retries across deployments | Model aliases, fallbacks, dynamic routes; Auto Router in beta |
| ZDR controls | Per-request zdr: true; account-wide toggles per model group; data_collection: "deny"; public ZDR endpoint list |
No provider ZDR list; self-hosting keeps prompts off a third-party gateway | No provider ZDR list; self-hosting keeps prompts off a third-party gateway; PII masking guardrails | No provider ZDR list in the docs we read; DLP scanning in beta, free on all plans |
| Caching | Provider prompt caching (not on Free plan) | Simple cache in open source; semantic cache in hosted and enterprise only | In-memory, Redis, S3, GCS, disk; semantic via Redis, Valkey or Qdrant | Exact-match only, TTL 60 seconds to one month |
| Budgets and keys | Budgets on paid plans; workspaces | Governance, spend rules, access controls (Prisma AIRS) | Virtual keys per user, team or project with models, budgets and rate limits | Rate limiting; spend limits in beta |
| Pricing | 5.5% or 8% platform fee; BYOK free to $25,000 a month then 5%; Free plan 50 requests a day | Hosted: no public price, demo only. Open source: free | Open source: free. Enterprise: custom, 30-day trial key | Core free; 5% on Unified Billing credits; log storage limited by plan (new gateways since Sep 24, 2026 use Workers Logs pricing) |
| Self-host | No | Yes (npx, Docker, Node, Workers; enterprise on AWS, Azure, GCP, Kubernetes) | Yes | No |
| lowob score | 4/5 | 3/5 | 4/5 | 4/5 |
How we score (5 points): one point each for (1) data-flow control you can enforce per request, (2) routing and fallback control, (3) cost controls (caching, budgets), (4) a public, predictable price, and (5) a credible exit, meaning self-hosting or an OpenAI-compatible API you can repoint in an afternoon. OpenRouter loses the exit point because there's no self-host. Portkey loses the price point and, for now, the data-flow point, because its hosted product's terms are in flux after the acquisition. LiteLLM loses the price point on Enterprise. Cloudflare loses the data-flow point because it doesn't publish provider-level retention controls.
What did the OpenRouter incident change?
It made provider pinning the first setting to check. On November 22, 2026, OpenRouter said security researchers at Dragos, using canary tokens (decoy links and credentials planted in prompts), found that some inference providers had been compromised or weren't upholding their data policies. OpenRouter off-boarded three providers it didn't name and removed 125 endpoints from zero data retention eligibility, some as a precaution. It said there was no breach of OpenRouter itself.
Press reporting filled in detail. TechRepublic reports Dragos sent nearly 2 million test prompts between July and November 2026, and that tracking links were opened after requests marked for zero data retention. BleepingComputer names Together AI, Phala and Novita as the removed providers, and says Atlas Cloud withdrew its models voluntarily; OpenRouter itself hasn't named the three. OpenRouter's own post lists eight providers with public security notices, including Together (prompt leakage for June and July 2026 requests) and Prime Intellect (a model substitution from November 8 to 10, 2026).
The lesson is mechanical, not moral. A ZDR label is a policy a provider promises. A router that spreads traffic across many providers multiplies the number of promises you depend on. Fewer providers, chosen on purpose, is the safer default. For the underlying term, see what zero data retention means.
How do you pin a provider on OpenRouter?
Set the provider order and turn off fallbacks. OpenRouter's docs give this pattern:
{
"model": "meta-llama/llama-3.3-70b-instruct",
"provider": {
"order": ["deepinfra/turbo"],
"allow_fallbacks": false,
"zdr": true
}
}
What each line does:
orderlists providers to try first. Use the exact endpoint slug from the model page; a base slug likedeepinframatches all of that provider's endpoints.allow_fallbacks: falsemeans the request fails rather than going elsewhere. You'd rather see an error than a silent reroute.zdr: truelimits routing to ZDR endpoints. It can only add enforcement, never remove an account-level setting.onlyis the stricter alternative toorder: an allow-list.- Account-wide: set ZDR in your privacy settings per model group (Anthropic, OpenAI, Google and others). Enabling it for Anthropic or OpenAI removes first-party endpoints and leaves Bedrock, Vertex and Azure.
Two catches in the fine print. ZDR applies to provider routing only, not to plugins or tools like web search. And OpenRouter checks eligible endpoints against a public list at /api/v1/endpoints/zdr that updates when a provider's policy changes, so a request that worked yesterday can fail today. That's the system working.
What are the common failure modes?
| Failure | What it looks like | Fix |
|---|---|---|
| Silent fallback | Requests served by a provider you never reviewed | Pin with order or only; set fallbacks off for sensitive traffic |
| Policy drift | A provider loses ZDR eligibility and your pinned requests start failing | Alert on routing errors; keep a reviewed second provider |
| Cache leak | A shared cache key returns one user's answer to another | Include tenant or user ID in the key; Cloudflare's cf-aig-cache-key is shared by every request using it |
| Semantic cache misfire | Close-but-wrong answers on agent traffic | LiteLLM's docs warn semantic caches perform poorly on agentic traffic; use exact-match |
| Fee creep | Platform fee on every credit top-up | Use BYOK where volume justifies it; compare against direct provider billing |
| Vendor change | Product, pricing or terms move after an acquisition | Keep an OpenAI-compatible interface so you can repoint |
| Self-host supply chain | A compromised package or image in your gateway | Pin versions, verify images, keep gateway secrets in a secret manager |
Worked example: what the fee costs (illustrative)
Illustrative numbers. A team spends $20,000 a month on inference.
| Setup | Fee math | Monthly fee |
|---|---|---|
| OpenRouter credits, Standard plan | 5.5% of $20,000 | $1,100 |
| OpenRouter BYOK, Standard plan | Under the $25,000 free allowance | $0 |
| Cloudflare Unified Billing credits | 5% of $20,000 | $1,000 |
| Cloudflare with your own provider keys | Core features free | $0 |
| LiteLLM self-hosted | No license fee; you pay for servers and the people running them | Your infrastructure cost |
The fee is rarely the deciding number. If a 20% cache hit rate saves $4,000 a month, the gateway that caches well wins even with a fee. Work out your inference cost first.
Who does each gateway suit?
- OpenRouter: product teams testing many models, startups that want one bill, anyone who needs open-weight models without contracting a dozen providers. Not for regulated data unless you pin providers and enforce ZDR account-wide.
- Portkey: enterprises that want a gateway bundled with AI security from Palo Alto Networks. The open-source gateway is a solid self-host option for fallbacks and guardrails. Not for teams that need a public price this quarter.
- LiteLLM: platform teams that must keep prompts in their own cloud and want virtual keys and spend by team. Not for teams with nobody to run and patch it.
- Cloudflare AI Gateway: teams already billing providers directly that want free analytics, caching and rate limits in front. Not the tool if you need provider-level retention controls across many open-weight hosts.
How we'd test it
- Send the same 200 prompts through each gateway, half repeated, and record latency overhead and cache hit rate.
- Plant a canary token (a unique URL) in 20 prompts per provider and watch for hits, the same method Dragos used.
- Force a provider failure and confirm pinned requests error instead of rerouting.
- Reconcile one week of gateway cost logs against provider invoices.
What we'd do
- List every model call your product makes and tag each as public, internal or sensitive.
- For sensitive calls on OpenRouter, add
orderoronly, setallow_fallbacksto false andzdrto true this week. - Turn on account-wide ZDR for the model groups you use, then fix whatever breaks.
- Check whether your traffic went through any of the providers OpenRouter's November 22 post lists, and rotate any secrets that may have appeared in prompts.
- Put a cache in front of your top three repeated prompts, exact-match only, with a short TTL.
- Decide your exit: if the gateway disappeared tomorrow, which config line would you change?
Common questions
What is the best LLM gateway?
It depends on who should hold your prompts. OpenRouter is best for trying many models on one bill, LiteLLM for running the gateway inside your own cloud, Cloudflare AI Gateway for cheap caching and logs in front of providers you already pay, and Portkey for enterprise governance now that it sits inside Palo Alto Networks.
What happened with OpenRouter and zero data retention?
On November 22, 2026 OpenRouter said it had off-boarded three inference providers and removed 125 endpoints from zero data retention eligibility after Dragos canary research showed some providers weren't keeping their data policies. OpenRouter said its own systems weren't breached.
How do I pin an OpenRouter request to one provider?
Set provider.order to the exact provider slug and provider.allow_fallbacks to false. Add provider.zdr set to true if the request must only go to zero data retention endpoints.
Is LiteLLM free?
The open-source gateway is MIT licensed and free to run; you pay for your own servers and model usage. LiteLLM Enterprise adds SSO, audit logs and support at a custom price, with a 30-day trial key.
Does Cloudflare AI Gateway charge a markup?
Core features such as analytics, caching and rate limiting are free. If you buy credits through its Unified Billing, Cloudflare charges a 5% fee on the purchase and passes provider inference rates through without markup.
Portkey vs LiteLLM: which should I self-host?
Both have MIT-licensed gateways. LiteLLM has the broader built-in admin layer for keys, budgets and spend by team. Portkey's open-source gateway is strong on fallbacks, retries and guardrails, but its hosted product is now part of Palo Alto Networks' Prisma AIRS and has no public price.
Does a gateway cache make zero data retention impossible?
Not by definition. OpenRouter says implicit in-memory prompt caching at a provider doesn't count as retention under its ZDR routing. A cache you run yourself is your own retention decision, so set its TTL deliberately.
Is OpenRouter still safe to use after the November 2026 incident?
For public or low-sensitivity text, the defaults are fine. For sensitive data, pin providers, turn fallbacks off and enforce ZDR account-wide, then check OpenRouter's live list of provider security notices before you send anything.
Sources
- OpenRouter: Data processing incidents on inference providers (Nov 22, 2026)
- OpenRouter docs: Zero Data Retention
- OpenRouter docs: Provider selection
- OpenRouter pricing
- BleepingComputer: OpenRouter drops AI providers over leaked prompts and secrets
- TechRepublic: OpenRouter pulls zero data retention from 125 AI endpoints
- Palo Alto Networks: completes acquisition of Portkey
- Palo Alto Networks: Prisma AIRS AI Gateway
- Portkey AI Gateway (open source) on GitHub
- LiteLLM docs: AI Gateway (proxy)
- LiteLLM docs: Caching
- LiteLLM Enterprise
- Cloudflare AI Gateway docs
- Cloudflare AI Gateway: Pricing
- Cloudflare AI Gateway: Caching
Last checked November 28, 2026. Written by Chris Wells, lowob.
How to cite this
Free to quote and link with credit. Please link to this page when you use a figure, chart or framework from it.
Cite as: Wells, C. (2026). Best LLM Gateways 2026: OpenRouter, Portkey, LiteLLM and Cloudflare AI Gateway Compared. lowob RESEARCH. Published 29 November 2026, updated 28 November 2026. https://lowob.com/research/best-llm-gateways/
BibTeX
@online{lowob2026bestllmgateways,
author = {Wells, Chris},
title = {Best LLM Gateways 2026: OpenRouter, Portkey, LiteLLM and Cloudflare AI Gateway Compared},
organization = {lowob},
date = {2026-11-29},
urldate = {2026-11-28},
url = {https://lowob.com/research/best-llm-gateways/}
}
Using a chart? Each chart has its own link. Charts and data tables are licensed CC BY 4.0: reuse them with the credit line "Source: lowob RESEARCH" and a link to this page.
Changelog
- 29 Nov 2026: First published.