</>macrostackBrowse all
Migration guide · LLM Gateways & Routing

The 4 best Portkey alternatives

Portkey is a hosted AI gateway and LLMOps control plane. It sits between your application and the model providers, giving you one API across 250+ models plus routing, automatic failover, semantic caching, guardrails, prompt management and per-team spend limits — the operational layer most teams end up building themselves once more than one model is in production.

90
Bottom line

A well-built hosted control plane. The question is whether you are buying a product or renting a proxy — if the requirement is routing and budget caps, LiteLLM does that for the price of a small VM.

Jump to the full comparison →

The cost

There is a free developer tier; paid plans start around $99/month for the pro feature set, with enterprise pricing on request. The gateway itself is separately available as open source under the MIT licence, so the subscription buys the hosted control plane, dashboards, guardrails and support rather than the routing engine. Verified against Portkey's published pricing on 2026-07-30; AI pricing moves quickly, so confirm before committing.

Why people consider an alternative

Three reasons come up. Cost at the wrong shape: a per-seat or per-plan control plane is hard to justify when the thing you actually needed was routing and a spend cap. Data path: a hosted gateway means every prompt and completion transits a third party, which is the exact thing a regulated or client-confidential workload cannot accept. And redundancy: putting a proxy in front of every model call adds a dependency whose outage takes your product down even when the model providers are healthy.

When Portkey is still the right call

If you want routing, caching, guardrails and observability working this afternoon with nothing to operate, Portkey is a reasonable purchase and the self-hosted options genuinely cost more in engineering time than the subscription. It also makes sense for teams without anyone who wants to own a piece of production infrastructure, and for organisations that need the compliance paperwork a vendor can supply and a self-hosted binary cannot.

AlternativeLicenseSelf-hostPricingSovereignty
LiteLLMMIT (core); enterprise/ directory under a separate commercial licenceYesFree and self-hosted — you pay the model providers directly with no markup, plus hosting for a small VM (roughly $20–50/month). A paid enterprise tier exists for SSO, audit logs and support.90
HeliconeApache-2.0YesFree and self-hostable under Apache-2.0. The hosted service has a free tier of roughly 10,000 requests per month, with paid plans starting around $79/month.88
Portkey Gateway (self-hosted)MITYesFree — the gateway is MIT-licensed. You pay only your model providers and your own hosting.86
OpenRouterProprietary (hosted service)NoNo subscription — pay-as-you-go per token at provider rates plus a small margin. Some free models are available.32
90
Macrostack's top pick

LiteLLM

One OpenAI-compatible API in front of 100+ providers, running on your own box.

Which one fits your situation?

There is no single best answer — it depends on what you are actually trying to do.

Just tell me the best Portkey alternative

LiteLLM90

Our top pick — the highest Sovereignty Score at 90, and the one we would choose ourselves.

LiteLLM vs Helicone

I have no budget — is there a genuinely free one?

Portkey Gateway (self-hosted)86

Open source under MIT. Free — the gateway is MIT-licensed. You pay only your model providers and your own hosting.

Portkey Gateway (self-hosted) vs LiteLLM

I want to self-host it and own the data

Helicone88

Self-hostable, so your data stays on your own server. Free and self-hostable under Apache-2.0. The hosted service has a free tier of roughly 10,000 requests per month, with paid plans starting around $79/month.

Helicone vs LiteLLM

Every alternative, compared

#1★ TOP PICK

LiteLLM

One OpenAI-compatible API in front of 100+ providers, running on your own box.

90
OPEN SOURCEMIT (core); enterprise/ directory under a separate commercial licenceSELF-HOSTLOCAL-FIRST

LiteLLM is the de facto open gateway for this layer: a proxy that exposes an OpenAI-compatible endpoint in front of 100+ providers, with virtual keys, per-team budgets, rate limits, fallbacks and logging. You run it, so prompts never leave your infrastructure and there is zero markup on token spend — you pay the model providers directly. At 55k GitHub stars with commits landing daily it is the most widely adopted option here. Licensing is worth reading precisely: the core is MIT, while everything under the repository's enterprise/ directory carries a separate commercial licence.

Strengths

  • +Zero markup — provider tokens are billed to you at cost
  • +Prompts and completions never leave your infrastructure
  • +Virtual keys, per-team budgets and rate limits built in
  • +100+ providers behind one OpenAI-compatible endpoint; 55k stars, daily commits

Trade-offs

  • You run it: deployment, upgrades, monitoring and uptime are yours
  • Observability is basic out of the box — expect to pair it with a tracing tool
  • The MIT core stops at the enterprise/ directory; SSO and audit logging sit behind a commercial licence
  • A proxy you operate is another production dependency to keep healthy
Free and self-hosted — you pay the model providers directly with no markup, plus hosting for a small VM (roughly $20–50/month). A paid enterprise tier exists for SSO, audit logs and support.
#2

Helicone

Apache-2.0 gateway in Rust, with observability built in rather than bolted on.

88
OPEN SOURCEApache-2.0SELF-HOSTLOCAL-FIRST

Helicone is an open-source AI gateway written in Rust, with logging, caching and cost tracking built into the routing layer rather than added alongside it — which is the practical difference from LiteLLM, where observability is thin and usually paired with something else. It is Apache-2.0 throughout, self-hostable, and also offered as a hosted service with a free tier. For teams who want one component instead of two, it is the tidier answer.

Strengths

  • +Apache-2.0 with no enterprise-directory carve-out
  • +Routing and observability in one component — less to assemble
  • +Written in Rust; low latency overhead for a proxy
  • +Hosted option with a real free tier if you would rather not run it

Trade-offs

  • Smaller project and community than LiteLLM (about 6k stars)
  • Fewer providers supported than LiteLLM's 100+
  • The hosted tier means prompts transit a third party — the thing self-hosting avoided
  • Less mature budget and virtual-key tooling than LiteLLM
Free and self-hostable under Apache-2.0. The hosted service has a free tier of roughly 10,000 requests per month, with paid plans starting around $79/month.
#3

Portkey Gateway (self-hosted)

Portkey's own routing engine, MIT-licensed and running on your hardware.

86
OPEN SOURCEMITSELF-HOSTLOCAL-FIRST

Worth knowing before you buy the platform: Portkey publishes its gateway as open source under the MIT licence, so the routing engine — 250+ models, failover, load balancing, caching — can be self-hosted at no cost. What the subscription adds is the hosted control plane: dashboards, prompt management, guardrails, analytics and support. If your requirement is the routing and not the console, this is the same engine without the bill or the third-party data path.

Strengths

  • +MIT licence on the full routing engine
  • +Same 250+ model coverage as the hosted product
  • +The lowest-friction exit from Portkey's paid tier — same engine, same config shape
  • +No third party in the request path when self-hosted

Trade-offs

  • You lose the dashboards, prompt management and guardrails that justify the subscription
  • Development cadence is slower than LiteLLM's
  • Smaller self-hosting community, so fewer worked examples when something breaks
  • You are self-hosting a vendor's open core — feature direction still follows their commercial product
Free — the gateway is MIT-licensed. You pay only your model providers and your own hosting.
#4

OpenRouter

One key, hundreds of models, nothing to run — the honest hosted pick.

32
SOURCE-AVAILABLEProprietary (hosted service)

OpenRouter is a hosted router: a single API key and one OpenAI-compatible endpoint in front of hundreds of models across providers, with automatic fallback and a unified bill. There is nothing to deploy and no subscription — you pay per token with a small margin on top of provider rates. If what you actually wanted was to stop juggling five provider accounts, this solves it in an afternoon and is frequently the right answer even for teams who could self-host.

Strengths

  • +Zero operations: one key, one endpoint, hundreds of models
  • +No monthly fee — you pay only for tokens used
  • +Unified billing across providers, with automatic fallback
  • +The fastest way to test many models without opening accounts everywhere

Trade-offs

  • Hosted and proprietary: every prompt transits OpenRouter
  • A margin on token spend rather than provider cost
  • No self-hosting path at all
  • Score of 32 reflects a closed hosted service — a transparency lens, not a judgement on quality
No subscription — pay-as-you-go per token at provider rates plus a small margin. Some free models are available.

Questions people ask

What is the best open-source alternative to Portkey?

LiteLLM for most teams — MIT at the core, 100+ providers behind one OpenAI-compatible endpoint, virtual keys and per-team budgets, and zero markup because you pay the providers directly. If you want observability in the same component rather than bolted on, Helicone (Apache-2.0) is the tidier build. And if you like Portkey's engine specifically, its gateway is MIT-licensed and self-hostable on its own.

Is LiteLLM really MIT licensed?

Mostly, and the exception matters. The core is MIT, but everything under the repository's enterprise/ directory carries a separate commercial licence — that is where features like SSO and audit logging live. For the overwhelming majority of uses the MIT core is the whole product; if you need enterprise auth or compliance features, read that licence before you build on them. GitHub reports the repository as NOASSERTION for exactly this reason, so a one-word licence label would be misleading.

Do I actually need a gateway at all?

Not if you call one provider and spend little. A gateway earns its place at the point where you have more than one model in production, need failover when a provider degrades, want per-team spend caps, or need one place to see what everything is costing. Before that it is a dependency you are maintaining for its own sake — and an outage in your own proxy takes you down even when every model provider is healthy.

Self-host or hosted — how do I actually decide?

Ask where the prompts are allowed to go. If your data cannot transit a third party, self-hosting LiteLLM or Helicone is the only option that satisfies the requirement, and the engineering cost is the price of that guarantee. If prompts can leave your network, the decision is ordinary economics: a hosted plan around $79–99/month against a small VM plus the hours to operate it. Plenty of teams find the subscription cheaper once the on-call is priced honestly.

Which of these adds the least latency?

Every gateway adds a hop, so the honest answer is that the fastest gateway is no gateway. Helicone's router is written in Rust and is built for low overhead; LiteLLM is Python and generally fine but heavier under load. Whichever you pick, measure it against a direct provider call on your own traffic before committing — proxy overhead that looks trivial in a benchmark can matter on a streaming endpoint.

Compare them head-to-head

Related comparisons

Entry last verified 2026-07-30. Licenses and pricing change — spotted something out of date? That's a correction we want.

The Macrostack brief

New swaps, worth your inbox.

A short, occasional email when we add a high-intent alternative or ship a new head-to-head. No spam, no selling your address — unsubscribe in one click.