Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

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.

By Checked
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page
  • LiteLLM

    Open-source Python SDK and self-hosted proxy that speaks the OpenAI format to 100+ providers, with keys, budgets and spend tracking.

  • Portkey AI Gateway

    Open-source gateway focused on routing rules, retries, fallbacks and guardrails; now owned by Palo Alto Networks.

  • OpenRouter

    Hosted service with one key and one bill for models from many providers, with provider routing and fallbacks.

  • Helicone

    Open-source gateway and observability layer that logs every request with cost and latency, self-hosted or as a cloud service.

LLM gateways compared: LiteLLM, Portkey, OpenRouter and Helicone: summary
LiteLLMPortkey AI GatewayOpenRouterHelicone
Where it runsYour infrastructure, or as a library inside your appYour infrastructure (npx or container); hosted platform is paidOpenRouter's cloud onlyYour infrastructure or Helicone's cloud
Provider accountsYou bring a key for each providerYou bring a key for each providerOne OpenRouter account; you can also add your own provider keysYour provider keys, or Helicone credits for 100+ models
Pricing basisFree and self-hosted; paid enterprise licence for SSO past 5 users, audit logsFree gateway; Portkey's hosted platform is paidProvider prices, no inference markup; 5.5% fee on credit purchasesFree up to 10,000 requests a month; Pro $79 a month plus usage
Strongest atPer-team virtual keys, budgets and spend trackingDeclarative fallback, retry and load-balancing configsTrying and switching models with no extra accountsRequest logs, cost dashboards and caching
LicenceMIT, except an enterprise directoryMITProprietary serviceApache 2.0
Watch out forYou operate it: upgrades, database, uptimeMain branch has had no commits since 25 May 2026Every prompt passes through a third partyFewer 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%

Question 1 of 60 answered
  1. Your platform team must hand out keys to ten product teams, with spend tracked and capped per team, on your own infrastructure. Which gateway fits?

Checked against

  • LLM cost optimisation

    Cutting LLM costs with caching, model routing, batching and budgets.

    SkillIntermediate

  • AI gateway

    A proxy between apps and model providers that gives one API for many models and adds keys, logging, budgets, caching and fallbacks.

    Glossary

  • Model routing

    Choosing which model handles each request, often sending easy requests to a small, cheap model and hard ones to a larger model.

    Glossary

  • 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.

    Comparison

Back to top