Comparison
LLM gateways compared: LiteLLM, Portkey, OpenRouter and Helicone
Four LLM gateways that put one API in front of many models, compared on hosting, budgets, routing and logging.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
Open-source Python SDK and self-hosted proxy that speaks the OpenAI format to 100+ providers, with keys, budgets and spend tracking.
Open-source gateway focused on routing rules, retries, fallbacks and guardrails; now owned by Palo Alto Networks.
Hosted service with one key and one bill for models from many providers, with provider routing and fallbacks.
Open-source gateway and observability layer that logs every request with cost and latency, self-hosted or as a cloud service.
| LiteLLM | Portkey AI Gateway | OpenRouter | Helicone | |
|---|---|---|---|---|
| Where it runs | Your infrastructure, or as a library inside your app | Your infrastructure (npx or container); hosted platform is paid | OpenRouter's cloud only | Your infrastructure or Helicone's cloud |
| Provider accounts | You bring a key for each provider | You bring a key for each provider | One OpenRouter account; you can also add your own provider keys | Your provider keys, or Helicone credits for 100+ models |
| Pricing basis | Free and self-hosted; paid enterprise licence for SSO past 5 users, audit logs | Free gateway; Portkey's hosted platform is paid | Provider prices, no inference markup; 5.5% fee on credit purchases | Free up to 10,000 requests a month; Pro $79 a month plus usage |
| Strongest at | Per-team virtual keys, budgets and spend tracking | Declarative fallback, retry and load-balancing configs | Trying and switching models with no extra accounts | Request logs, cost dashboards and caching |
| Licence | MIT, except an enterprise directory | MIT | Proprietary service | Apache 2.0 |
| Watch out for | You operate it: upgrades, database, uptime | Main branch has had no commits since 25 May 2026 | Every prompt passes through a third party | Fewer per-team key and budget controls than LiteLLM |
An AI gateway gives your code one API in front of many models. Pick LiteLLM for a self-hosted gateway with per-team keys and budgets, Portkey for declarative routing and fallback rules, OpenRouter for one account and one bill across providers, and Helicone when request logs and cost visibility come first.
Pick LiteLLM when
You want a gateway you run yourself and you need to hand out keys to teams. The proxy issues virtual keys, tracks spend per key, team and model, enforces budgets and rate limits, and falls back between deployments. Many other tools already use LiteLLM’s Python SDK for multi-provider calls, so it is a safe default. The cost is operations: it needs a database for keys and spend, and you upgrade and monitor it like any other service. SSO for more than five users, audit logs, tag-based budgets and some built-in guardrails need a paid enterprise licence, priced on request.
Pick Portkey’s gateway when
Your main need is routing logic: try this model, retry twice, fall back to that one, split traffic by weight, run a guardrail check on the way. Portkey expresses this as a per-request config, and the open-source gateway starts with npx @portkey-ai/gateway. Palo Alto Networks closed its acquisition of Portkey in May 2026 and is building the gateway into its Prisma AIRS security platform. A Gateway 2.0 pre-release sits on a separate branch, and the main branch has had no new commits since 25 May 2026, as of our check on 25 November. Check that activity yourself before adopting it for something long-lived.
Pick OpenRouter when
You want to try many models without signing up with each provider, or you are a small team that would rather have one bill. You call one OpenAI-compatible endpoint, choose models by name and can let OpenRouter route between providers serving the same model. It passes provider prices through with no markup on inference and charges 5.5% when you buy credits. It is a hosted service, so every prompt goes through OpenRouter as well as the model provider. Prompts are not logged by default, and providers that may train on your data are left out of routing unless you allow them; check those settings against your own rules before sending customer data.
Pick Helicone when
Visibility is the priority. Helicone logs each request with cost, latency and the prompt, adds caching, rate limits and fallbacks, and is quick to adopt: you change a base URL and add a header. It now also sells credits so one Helicone key reaches 100+ models, like OpenRouter. It is open source and can be self-hosted, and the hosted free tier covers 10,000 requests a month. If you later need heavier gateway features such as per-team budgets, pair it with or move to a dedicated gateway.
Whichever you pick
- Put the gateway in front of every model call, including scripts and evals, or your cost numbers will be incomplete.
- Treat it as production infrastructure: it sees every prompt and response, and if it goes down, every AI feature goes with it.
- Keep provider-specific features in mind. A unified API is convenient, but prompt caching, tool formats and structured output support still differ between providers.
The LLM cost levers cheat sheet lists what to do once spend is visible, and the LLM cost optimisation skill page collects the tutorials behind it. If tracing matters more than routing, compare the LLM observability platforms instead, or browse every option in the models and inference tools directory.
Check your understanding
LLM gateways quiz
What an AI gateway does, when to pick LiteLLM, Portkey, OpenRouter or Helicone, and the rules that apply whichever gateway you run.
6 questions · pass mark 70%
Review
Checked against
Related
- LLM cost optimisation
Cutting LLM costs with caching, model routing, batching and budgets.
- AI gateway
A proxy between apps and model providers that gives one API for many models and adds keys, logging, budgets, caching and fallbacks.
- Model routing
Choosing which model handles each request, often sending easy requests to a small, cheap model and hard ones to a larger model.
- LLM observability compared: Langfuse, LangSmith, Arize Phoenix and Opik
Four LLM observability platforms compared on licence, self-hosting, OpenTelemetry and evals, and which to pick.