LLM Gateway Software: Route Models Without Lock-In
The best LLM gateway software puts one governed API in front of every model: LiteLLM for self-hosted control, Portkey for a managed gateway with guardrails, OpenRouter for instant model breadth, Cloudflare for edge caching, and Kong or TrueFoundry for platform teams standardizing AI traffic.
Ranked list
- LiteLLM — Self-hosted routing and spend control
- Portkey — Hosted gateway with guardrails
- OpenRouter — Instant access to many models
- Cloudflare AI Gateway — Edge caching and light governance
- Kong AI Gateway — AI governance inside an API estate
- TrueFoundry — Gateway inside your own cloud
- Helicone — Routing plus analytics for small teams
- A gateway is a routing layer, not a model. It normalizes provider APIs, keys and billing into one endpoint your apps call.
- Fallbacks are the reliability story. Automatic retries and provider failover decide whether an outage reaches your users.
- Spend controls differ sharply. Virtual keys, per-team budgets and rate limits range from basic to deeply granular.
- Free starts are real. LiteLLM is open source, Cloudflare core features are free, and Portkey has a free hosted tier.
- Observability is a separate purchase decision. Some gateways log everything; others focus on routing and leave analysis elsewhere.
What does an LLM gateway actually do?
An LLM gateway sits between your applications and model providers. It exposes one API, usually OpenAI-compatible, and translates each call to the provider behind it, so swapping models becomes a configuration change.
Around that route it adds the controls production teams need: virtual keys, budgets, rate limits, retries, fallbacks, caching and request logs. Without it, each app holds its own provider keys and its own failure modes.
The category borders LLM observability, but the jobs differ. Observability tools analyze traffic after the fact, while a gateway is in the request path and can block, reroute or cache in real time. Our blog covers both layers.
Which LLM gateways should you consider?
LiteLLM
LiteLLM is the open-source default: a Python SDK and proxy server that calls more than 100 model providers in a single OpenAI-style format. Teams self-host it and get cost tracking, budgets and virtual keys per user or team.
Because you run it, there is no per-request markup and no data leaving your network. The trade is operational: your team owns upgrades, the database behind it and the on-call pager when the proxy fails.
Best for: Platform teams that want a free, self-hosted gateway with deep spend controls.
- Unified API across 100-plus model providers
- Virtual keys with budgets and rate limits
- Cost tracking by key, team and model
- Retries, fallbacks and load balancing
- Optional enterprise license for SSO and audit features
Pricing: Free and open source to self-host. The Enterprise license, which adds SSO, granular access control and support, is sold by quote on the vendor site.
Limitation: Self-hosting is the cost. Scaling, patching and high availability are your engineering problem, and governance features sit behind the paid license.
Portkey
Portkey is a managed AI gateway with an open-source core, now sold as the Prisma AIRS AI Gateway after Palo Alto Networks acquired the company. It routes across a large model catalog and layers on guardrails, prompt management and detailed request logs.
The hosted service meters recorded logs rather than requests, which suits teams that want analytics with the gateway. Hybrid deployment keeps the data plane inside your network on enterprise plans.
Best for: Teams that want a hosted gateway with guardrails and log-based analytics included.
- Routing, fallbacks and load balancing across providers
- Guardrails for prompts and responses
- Request logs, traces and cost analytics
- Prompt management and versioning
- Open-source gateway for self-hosting
Pricing: Free open-source gateway, plus a free hosted Developer plan with 10,000 logged requests a month. Production is $49 per month for 100,000 logs on the vendor pricing page checked today.
Limitation: Ownership changed the roadmap. Paid sign-ups now route through Palo Alto Networks, so buyers should confirm plan continuity and enterprise terms before standardizing.
OpenRouter
OpenRouter is a hosted routing marketplace: one API key and one balance reach hundreds of models from many providers, billed at each provider's list price. It adds automatic failover between providers serving the same model.
There is nothing to deploy, which makes it the fastest way to test models side by side. Data policies can be set per request, and bring-your-own-key routing is supported on paid usage.
Best for: Developers who want instant access to many models through one key and one balance.
- Hundreds of models behind one API
- Automatic failover across providers
- Provider list prices with no token markup
- Per-request data retention controls
- Free models with daily request caps
Pricing: No subscription. Its pricing page states a 5.5 percent fee on credit purchases for Standard accounts and 8 percent for Business, with tokens billed at provider list prices.
Limitation: It is a marketplace, not a control plane. Budgets and key management are lighter than self-hosted gateways, and your traffic transits a third party.
Cloudflare AI Gateway
Cloudflare AI Gateway runs on Cloudflare's edge network and adds analytics, caching, rate limiting and data loss prevention scanning to calls headed for major model providers. Setup is a URL change for most providers.
Caching is the differentiator: repeated prompts can be served from cache instead of billed again. Unified Billing lets Cloudflare charge for provider usage on one invoice, for teams that want fewer vendor accounts.
Best for: Teams already on Cloudflare that want caching and light governance at the edge.
- Response caching to cut repeat token spend
- Analytics and logging across providers
- Rate limiting per gateway
- Free DLP scanning on all plans
- Optional unified billing for provider usage
Pricing: Core features are free on all Cloudflare plans, per its pricing documentation checked today. Unified Billing adds a 5 percent fee on credits purchased through Cloudflare.
Limitation: It is a lighter gateway. Deep per-team budgets, virtual key hierarchies and complex routing rules are thinner than in LiteLLM or Portkey.
Kong AI Gateway
Kong AI Gateway extends the Kong API gateway with AI-specific plugins: multi-model routing, semantic caching, prompt guardrails and AI usage analytics. It targets organizations that already govern APIs through Kong.
The appeal is consolidation. The same control plane, policies and observability that manage your REST traffic can manage model traffic, including traffic from agent frameworks.
Best for: Enterprises that already run Kong and want AI traffic under the same governance.
- AI routing and load balancing plugins
- Semantic caching and prompt templates
- Guardrails and content filtering options
- Per-consumer rate limits and quotas
- Shared analytics with the wider API estate
Pricing: The open-source Kong Gateway is free. Konnect, the hosted control plane, is priced by usage and plan on the vendor site, so treat AI Gateway costs as quoted.
Limitation: It rewards existing Kong shops most. Teams without Kong face a full API gateway adoption just to route model calls.
TrueFoundry
TrueFoundry sells an enterprise AI gateway as part of a wider platform for deploying and governing models and agents. Its gateway emphasizes centralized key management, access control by team, usage tracking and guardrails.
Deployment flexibility is a selling point, including running inside your own cloud account. That suits regulated teams that cannot send prompts through a shared multi-tenant proxy.
Best for: Regulated enterprises that need the gateway inside their own cloud boundary.
- Centralized keys, budgets and access control
- Usage and cost tracking by team
- Guardrails and audit logging
- Deployment inside your cloud account
- Part of a broader model deployment platform
Pricing: Pricing: see vendor site (quote-based). TrueFoundry sells platform agreements through sales and publishes no self-serve gateway rate card.
Limitation: The gateway is one module of a platform sale. Small teams wanting only routing will find the buying process heavier than the problem.
Helicone
Helicone began as an observability tool and added gateway features, including a unified API with automatic fallbacks and caching. One line of integration routes requests and logs them for analysis at the same time.
That dual role suits smaller teams that cannot justify separate routing and analytics tools. Its open-source core can also be self-hosted for the logging layer.
Best for: Small teams that want routing and request analytics in a single lightweight tool.
- Unified API with provider fallbacks
- Request logging and cost dashboards
- Caching to reduce repeat spend
- Prompt and session tracking
- Open-source core with hosted option
Pricing: Free tier listed on its pricing page, with paid hosted plans above it. Check the current tier limits on the vendor site before budgeting high volumes.
Limitation: Governance is lighter than enterprise gateways. Fine-grained budgets, approval flows and deployment control trail LiteLLM and TrueFoundry.
How do these gateways compare side by side?
| Tool | Best for | Starting price | Free plan/trial |
|---|---|---|---|
| LiteLLM | Self-hosted routing and spend control | Free (open source) | Free self-host |
| Portkey | Hosted gateway with guardrails | Free; Production $49/mo | Free plan |
| OpenRouter | Instant access to many models | No subscription; 5.5% credit fee | Free models |
| Cloudflare AI Gateway | Edge caching and light governance | Free core features | Free plan |
| Kong AI Gateway | AI governance inside an API estate | Free (open source) | Free self-host |
| TrueFoundry | Gateway inside your own cloud | See vendor site (quote-based) | Demo-led |
| Helicone | Routing plus analytics for small teams | Free tier listed | Free plan |
The field splits by where the gateway runs. LiteLLM and Kong live in your infrastructure, OpenRouter and Helicone in theirs, and Cloudflare at the edge. Portkey and TrueFoundry sell managed control with enterprise deployment options.
Fees hide in different units: logged requests at Portkey, credit purchases at OpenRouter, plan tiers at Cloudflare. Model the total with a spend calculator using your real request volume before committing.
How much does an LLM gateway cost?
The gateway itself can cost nothing. LiteLLM and Kong's open-source gateway are free to run, Cloudflare's core features are free, and OpenRouter charges only its credit fee on top of token costs.
Example: a team sending two million requests a month pays for logging and retention more than routing. At Portkey's listed overage, extra logs cost $9 per 100,000 requests, which quietly becomes the main gateway line item.
Count what you log, not just what you route. Retention windows and log volume, not request counts, drive most hosted gateway bills.
Self-hosting moves the cost into engineering time. Budget for upgrades, database care and incident response, or the free gateway becomes an unpaid second job for one engineer.
How did we choose these gateways?
We scored gateways on four criteria: route control, meaning fallbacks and load balancing; spend governance, meaning keys, budgets and limits; failure handling under provider outages; and the evidence trail of logs and audit records.
Only products that sit in the request path qualified. Pure observability tools were excluded unless they also route traffic, and prices were read from each vendor's own pages this week.
Which LLM gateway should you pick?
Start from your deployment constraint, then check the metering unit against your traffic shape.
- Pick LiteLLM when you can self-host and want the deepest free control set.
- Pick OpenRouter for immediate model breadth with zero operations.
- Pick Portkey when guardrails and logged analytics matter as much as routing.
- Pick Cloudflare when caching and an existing Cloudflare estate lead the decision.
Kong fits shops standardizing all API governance in one place, and TrueFoundry fits regulated teams that need the gateway inside their own cloud account.
What should you check before standardizing?
Test the failure path, not the demo path. Kill a provider key in staging and watch whether fallbacks fire, budgets hold and logs still record what happened.
Confirm how keys are governed: who can mint them, what limits they carry and how usage rolls up per team. Our license utilization calculator mindset applies to virtual keys too: unused keys are unmanaged risk.
Finally, read the data terms. Prompts may contain customer data, so retention settings, regional routing and zero-retention options belong in the evaluation, not in a later security review.
Sources
Frequently asked questions
What is the difference between an LLM gateway and LLM observability?
A gateway sits in the request path and can route, cache, block and fail over in real time. Observability tools record and analyze traffic. Some products, such as Portkey and Helicone, combine both jobs.
Is LiteLLM really free?
The core proxy is open source and free to self-host, and you pay only your infrastructure and model costs. An Enterprise license adds SSO, access control and support and is priced by quote.
Does OpenRouter mark up model prices?
No. Its pricing page says tokens are billed at provider list prices. OpenRouter earns a fee when you buy credits: 5.5 percent on Standard accounts and 8 percent on Business.
Can an LLM gateway reduce my model bill?
It can, mainly through caching repeat prompts, routing simple tasks to cheaper models and enforcing budgets per team. The gateway fee itself is usually small next to token spend.
What should I test before rolling out a gateway?
Test provider failover, budget enforcement and key revocation under load. Also check log retention against your compliance needs, because hosted plans meter and expire logs differently.