An LLM proxy sits between your application and one or more model providers. It normalises request formats, holds provider keys, applies rate limits and retries, and emits logs. Teams add one when a second provider, a second team or a compliance review makes direct SDK calls unmanageable.
The market splits into three shapes: open-source proxies you host (LiteLLM), commercial gateways with observability (Portkey, Kong), and hosted routers (OpenRouter, Cloudflare). This guide compares six options on the controls that matter in production, then explains when a direct API is the better choice.
| Option | Best for | Pricing model | Deployment | Notable limit |
|---|---|---|---|---|
| LiteLLM | Open-source proxy with broad provider support | Open source; enterprise support quote | Self-hosted | You operate upgrades, capacity and the database |
| Portkey / Prisma AIRS AI Gateway | Gateway plus observability in one control plane | Pricing not published; quote required | Hosted or self-hosted | Sales-led buying; confirm current packaging |
| Kong AI Gateway | Teams already running Kong | From $25/mo plus usage; dedicated and hybrid tiers | Self-hosted, cloud, hybrid | Best fit only if Kong is already the API layer |
| Cloudflare AI Gateway | Edge caching, rate limits and simple logging | Core features free; 5% fee on Unified Billing credits | Hosted at the edge | Limited deep agent identity and self-hosting |
| OpenRouter | One integration across many providers | Provider price plus 5.5% Standard or 8% Business fee | Hosted | Upstream retention and limits vary by provider |
| Plugsky | Flat-rate API with a private deployment path | $20 / $60 / $120 monthly; enterprise quote | Public API, private VPC, on-premises, air-gapped | 39 models; an API, not a standalone proxy product |
What an LLM proxy actually does
At minimum, a proxy accepts an OpenAI-shaped request, selects a provider, forwards the call and returns the response. Most also add retries, fallback, request logging and a usage dashboard. The useful differences appear under failure: what happens when a provider times out, when a key is revoked, and when one tenant sends a burst that starves another.
A proxy is also a credential store. If it holds long-lived keys for every provider, it becomes the highest-value target in your stack. Ask how keys are encrypted, who can read them, whether they can be scoped per tenant and how quickly one can be revoked without breaking the others.
Self-hosted or hosted
Self-hosting keeps prompts and provider keys inside your network. It also makes you responsible for upgrades, database backups, HA and the p99 latency of the proxy itself. LiteLLM and Kong are the common choices; both can be run in an air-gapped environment with enough operational maturity.
Hosted proxies reduce operations and add a subprocessor. If prompts contain customer data, the hosted proxy's retention and support-access terms become part of your data-processing review. A hosted proxy with a strong UI but a vague retention policy is a procurement problem, not a shortcut.
The failure modes to test
Run these before you commit. First, revoke a provider key in staging and confirm the proxy fails over or returns a clear error instead of retrying forever. Second, send a burst from one tenant and check that another tenant's latency is unaffected. Third, compare the proxy's token count with the provider's invoice; a proxy that miscounts makes cost allocation unreliable.
Fourth, export the audit log and confirm it contains the tenant, model, token count, status and latency. A log that only shows aggregate spend cannot answer an incident review. Fifth, check what the proxy stores: request bodies, response bodies or only metadata. The safest default is metadata plus hashes, with body logging opt-in and time-limited.
When a competitor wins
LiteLLM wins when you want an open-source proxy you can fork, audit and run inside your own network, and you have the engineering time to own it. Kong wins if Kong is already your API gateway; adding AI policy to the same control plane is simpler than operating a second one.
Portkey wins when you want gateway and observability in one vendor and can accept a sales-led contract. Cloudflare wins for edge caching and simple rate limits on public workloads. OpenRouter wins when model breadth and fast onboarding matter more than deep tenant controls.
Plugsky wins when the requirement is a predictable monthly bill and a deployment boundary that can move from shared API to private VPC or air-gapped without rewriting the application. It is not a proxy you install in front of other providers; it is a provider with an OpenAI-compatible surface.
Procurement checklist
Ask for the subprocessor list, the key-encryption design, the audit-log schema, the retention period for request bodies, the failover policy and the exit plan. Ask whether the proxy can enforce a per-tenant spend cap and a per-model allowlist. Ask how a regional outage is handled and whether traffic can be pinned to a region.
Price the whole path: proxy fee, provider tokens, egress, observability storage and staff time. A free proxy with a paid observability add-on is rarely cheaper than a bundled gateway at scale. A per-request fee that looks small can dominate a high-volume agent workload.
Verdict
Choose LiteLLM for a self-hosted open-source proxy, Kong if you already run Kong, Portkey for a bundled gateway and observability contract, Cloudflare for edge controls, and OpenRouter for breadth. Choose Plugsky when you want a flat-rate provider with a private deployment path rather than a proxy in front of many providers.
Whatever you pick, test revocation, tenant isolation and audit export first. Those three decide whether the proxy reduces risk or concentrates it.
Frequently asked questions
What is an LLM proxy?
A layer that accepts model requests, holds provider credentials, routes to a provider and returns the response. It usually adds retries, logging and rate limits.
Is an LLM proxy the same as an AI gateway?
Largely, yes. Gateway is the broader term for a proxy with policy, observability and multi-provider routing. Some vendors use proxy for the lightweight version.
Should I self-host the proxy?
Self-host if prompts or provider keys cannot leave your network and you can operate upgrades, backups and HA. Use a hosted proxy if speed matters more and the retention terms clear review.
How do I test a proxy before buying?
Revoke a key mid-run, burst one tenant, compare token counts with the provider invoice, and export the audit log. Those four tests expose most production gaps.
Does a proxy reduce lock-in?
It reduces application-level lock-in because the request format stays stable. It can add a new dependency at the proxy layer, so keep an exit path and avoid proprietary request extensions.
Related
Sources
- LiteLLM documentation · 23 Nov 2026
- LiteLLM enterprise · 23 Nov 2026
- Portkey AI gateway documentation · 23 Nov 2026
- Kong pricing · 23 Nov 2026
- Cloudflare AI Gateway pricing · 23 Nov 2026
- OpenRouter pricing · 23 Nov 2026