Best LLM API Gateways for Auth, Logs, and Egress
Six LLM API gateways. The proxy in front of the model, not the MCP server behind the agent.
CVE-2026-42208 is a pre-auth SQL injection in LiteLLM’s proxy API key check. GitHub scored it 9.3. Sysdig saw targeted exploitation 36 hours after the advisory. The prize is the table that holds virtual keys and provider credentials.
An LLM API gateway sits in front of the model APIs. Apps get a virtual key. The gateway holds the real one, logs the prompt, and decides which provider the tokens leave toward. Getting that wrong is how provider credentials leave the building.
Classic HTTP gateways stay on API gateways.
How we evaluated
We read first-party docs, source, licenses, and release notes, and we treat a marketing page as a claim, not as proof two products do the same work. We cared about whether the product sits in front of the model, whether you operate it, whether virtual keys are a first-class control, whether logs can leave, and whether egress is a policy.
| Tool | Best for | What to check |
|---|---|---|
| Cloudflare AI Gateway | An edge proxy already sitting on a Cloudflare account | Commercial ยท auth token ยท logs and BYOK |
| Portkey | A managed control plane with an MIT gateway you can also host | MIT + SaaS ยท virtual keys ยท guardrails |
| LiteLLM | An open-source proxy you operate, with virtual keys and budgets | MIT + enterprise/ ยท you host it ยท Postgres keys |
| Helicone | Observability first, gateway second, OSS plus cloud | Apache-2.0 / GPLv3 gateway ยท logs ยท Mintlify |
| Kong AI Gateway | AI plugins on a Kong you already run | Apache-2.0 + Enterprise plugins ยท LLM / MCP / A2A |
| TrueFoundry | An enterprise AI gateway you can put in a VPC | Commercial ยท policy plane ยท on-prem option |
Cloudflare AI Gateway
Best for an edge proxy already sitting on a Cloudflare account

Cloudflare’s AI Gateway is the edge leader on this list. One line of code, analytics, caching, rate limits, retries, and model fallback. Core features are free on every plan. You do not host a Python proxy.
Auth is a Cloudflare API token on Authenticated Gateway. BYOK stores provider keys in Secrets Store so the app stops shipping OpenAI secrets. Persistent logs sit on the gateway. Logpush exports them encrypted. Access can put a user id on the request as cf.user_id.
Key features:
- Authenticated Gateway with a Cloudflare API token
- BYOK provider keys in Secrets Store
- Persistent logs, plus Logpush on Workers Paid
- Caching, rate limiting, retries, fallback, DLP, and Guardrails on the public docs
Why we like it:
If the estate is already Cloudflare, this is the LLM front door that does not invent a new control plane. Logs and keys stay in the same account you already open.
Limits:
Docs say an AI Gateway Run token is account-scoped. It can hit every gateway in the account, including BYOK keys. Log storage is 100,000 logs on Workers Free and 10 million per gateway on Workers Paid. You cannot self-host the data plane.
License or pricing: Commercial. Core features free on all plans. Unified Billing adds a 5% fee on purchased credits.
Portkey
Best for a managed control plane with an MIT gateway you can also host

Portkey is the managed control plane. Universal API, virtual keys, observability, guardrails, prompt management, budgets. Palo Alto now sells this as Prisma AIRS AI Gateway. The product people still search is Portkey.
The gateway core is MIT. You can run it with npx @portkey-ai/gateway. Hybrid puts the data plane in your network and leaves the control plane hosted. That is the production pattern they sell.
Key features:
- Virtual keys, RBAC, and budget limits on the public docs
- Logs, traces, and PII redaction on the request path
- Fallbacks, load balancing, retries, simple and semantic cache
- MIT gateway plus hosted and hybrid enterprise
Why we like it:
When a GenAI team has to issue keys to the rest of the company, a control plane with virtual keys and a log you can filter is the job. The OSS gateway is there if you will run it.
Limits:
Developer is 10k recorded logs a month and 3-day log retention. Production is $49/month for 100k logs. The features that look like a secrets program (SSO, VPC, custom retention) sit on Enterprise. The OSS gateway is routing. The dashboard is the product.
License or pricing: MIT gateway. SaaS Developer free, Production $49/month, Enterprise quoted.
LiteLLM
Best for an open-source proxy you operate, with virtual keys and budgets

LiteLLM is the OSS proxy most teams actually run. OpenAI-compatible. 100+ providers. Virtual keys, spend tracking, fallbacks, and a master key that mints the rest. Virtual keys need Postgres. The enterprise/ directory is a separate license.
GHSA-r75f-5x8p-qvmc, CVE-2026-42208, is the reminder. Affected versions mixed the caller-supplied key into the SQL text. Patch is 1.83.7. Rotate every credential the proxy stored. March 2026 also burned 1.82.7 and 1.82.8 on PyPI. The package is a secrets store. Treat it like one.
Key features:
- Virtual keys with model allow-lists, budgets, and spend tracking
- Fallbacks, load balancing, and an OpenAI-compatible endpoint
- You host the proxy, the database, and the log callbacks
- SSO, SCIM, and audit logs on the paid enterprise path on the public docs
Why we like it:
When you will operate the box and you want virtual keys without a SaaS in the data path, this is the default OSS name. Pin the version. Watch the advisory feed.
Limits:
You staff Postgres, the master key, and upgrades. Two 2026 incidents hit the same project. Enterprise identity is paid. A key with no user_id inherits nothing from the admin who minted it. Read their virtual-key docs before you assume RBAC.
License or pricing: MIT outside enterprise/. You run it. Enterprise quoted.
Helicone
Best for observability first, gateway second, OSS plus cloud

Helicone started as the log. Swap the base URL, add a header, see cost, latency, and the prompt. The later AI Gateway is a Rust router with caching, rate limits, fallbacks, and that same dashboard. Cloud or Docker.
The observability repo is Apache-2.0. The ai-gateway LICENSE file is GNU GPL v3, even though the README badge still says Apache. Mintlify acquired Helicone on 3 March 2026. First-party post: services stay live in maintenance mode, with security updates and new models still shipping. That is a roadmap risk you name in the buy.
Key features:
- One-line proxy logging of prompts, completions, tokens, and cost
- Cloud or self-hosted AI Gateway with routing and cache
- Sessions, users, custom properties, and HQL on the public docs
- Hobby 10k requests free; Pro from $79/month on the public list
Why we like it:
When the hole is “we cannot see the spend,” this is the fastest log. Policy can wait. The gateway is there if you want routing on the same box.
Limits:
Maintenance mode after the Mintlify deal. Self-host docs have been a community complaint. Confirm the gateway license with the LICENSE file. The README badge still says Apache. It is a log first. Hard budgets and virtual-key programs are stronger on LiteLLM and Portkey.
License or pricing: Apache-2.0 (helicone/helicone). GPLv3 (ai-gateway LICENSE). Cloud Hobby free, Pro $79/month, Team $799/month, Enterprise quoted.
Kong AI Gateway
Best for AI plugins on a Kong you already run

Kong AI Gateway is the AI plugin slice on Kong Gateway. AI Proxy translates OpenAI-shaped requests onto OpenAI, Azure, Bedrock, Anthropic, Gemini, and more. Later versions add MCP and agent-to-agent traffic on the same runtime. The sibling API gateways list is the classic TLS and JWT job. This entry is the LLM plugins.
OSS covers AI Proxy and a handful of prompt plugins. Token quotas, semantic cache, PII sanitizer, semantic prompt guard, and AI Proxy Advanced (multi-model load balancing) sit on Enterprise or a paid Konnect tier. You still pay the model provider.
Key features:
- AI Proxy on a Kong route you already know how to operate
- Token quotas, PII sanitization, and prompt guards on paid plugins
- LLM, MCP, and A2A on one control plane on the public docs
- Self-host the data plane or run Konnect
Why we like it:
If Kong already terminates the rest of the APIs, adding an AI plugin is cheaper than a second proxy. Policy language stays the one the platform team already reviews.
Limits:
The interesting AI controls are paid. A team that does not run Kong should not buy Kong to get a LiteLLM substitute. MCP and A2A are extra surface. Keep that inventory on AI Security.
License or pricing: Apache-2.0 core and basic AI plugins. Advanced AI plugins Enterprise / Konnect. Quoted.
TrueFoundry
Best for an enterprise AI gateway you can put in a VPC

TrueFoundry is the lesser-known pick because it has a live AI Gateway product page, public tiers, and a VPC / on-prem / air-gap story. OpenRouter is a model marketplace. Databricks Mosaic AI Gateway is real, and it is a Databricks-shaped door. TrueFoundry is the standalone gateway we kept.
One endpoint, virtual keys, RBAC, quotas, guardrails, request logs, routing, and fallbacks. SaaS, hybrid, or you host the gateway plane. The product is proprietary. Self-hostable is not the same as open source.
Key features:
- Unified API across 1,600+ models they claim, including self-hosted vLLM
- RBAC, SSO, per-team keys, token and dollar quotas
- Input and output guardrails, PII filtering, full request logs
- SaaS, gateway-plane-only, or control plane plus gateway in your VPC
Why we like it:
When procurement wants a named AI gateway in the VPC and will not run LiteLLM as the production secrets store, this is the commercial plane with a first-party product URL.
Limits:
No public source tree to audit. Self-host still talks to their auth and licensing for emails and request counts, on the docs we read. MCP and agent features are in the pitch. This page still scores it as the LLM proxy.
License or pricing: Commercial. Public list includes a free 50k-request starter and Pro from $499/month. Self-host is Enterprise. Infra they estimate around $600 to $1,000/month on top.
How to choose an LLM API gateway
Four questions before the quote. Names below are tools, not a scored bake-off.
| Critical question | Why it matters | What to evaluate | Red flag |
|---|---|---|---|
| Who holds the provider keys, and who can dump the logs? | The gateway is a secrets store. The log is a second copy of the prompt. | Cloudflare BYOK and Authenticated Gateway. Portkey and LiteLLM virtual keys. Helicone if the job is the log. | Provider keys still in every app env, plus an unauthenticated proxy port. |
| Do we operate the proxy? | CVE-2026-42208 and the PyPI incident are what you-host costs. | LiteLLM and Kong you run. Cloudflare you do not. Portkey and TrueFoundry offer hybrid. | An OSS proxy with no patch window and no key rotation drill. |
| Is the job a log, a policy, or both on one box? | Observability and virtual keys are different purchases that vendors bundle. | Helicone and Cloudflare for the log. LiteLLM, Portkey, Kong, TrueFoundry for keys and spend caps. | A dashboard that cannot revoke a key or stop egress. |
| Where do tokens leave? | Egress is the provider list, PII, and whether logs replicate off-box. | Cloudflare DLP and Guardrails. Portkey PII redaction. Kong PII plugin (paid). TrueFoundry VPC. | Prompt bodies in a SaaS log you cannot export or delete on a schedule you own. |
What the internet thinks about LLM API gateways
Gateway threads treat the proxy as a secrets store and then argue whether it should be a plugin on Kong or a new box. We agree the key table is the prize.
Put a virtual key on the path, log the prompt on a box you can dump, and name the providers tokens are allowed to leave toward. Then pick the plane you will actually patch.
FAQs
Is this the same page as API gateways?
No. The API gateways list is Kong Gateway, APISIX, Tyk, Traefik, Amazon API Gateway, and Emissary: TLS, keys, and routing for the APIs you wrote. This shortlist is LLM proxies in front of model providers. Kong appears on both. The job is different.
Did CVE-2026-42208 retire LiteLLM?
No. It is still the OSS proxy most teams run. Upgrade to 1.83.7 or later, rotate every credential stored in the proxy database, and treat the master key like a root secret. The March 2026 PyPI incident is a second reason to pin versions.
Helicone joined Mintlify. Is it still a gateway?
The first-party post from 3 March 2026 says services stay live in maintenance mode, with security updates and new models still shipping. The product is observability first. Confirm the buy against that roadmap, and read the ai-gateway LICENSE file (GPLv3). The README badge still says Apache.
Is this a scored bake-off?
No. Order is editorial.