Skip to main content

Cost vs Portkey: an honest comparison

TL;DR

  • Portkey is best if you want a production AI gateway: routing, fallbacks, load balancing, caching, guardrails, and budgets across a huge range of models, sitting in your request path.
  • Cost is best if you want spend attributed per route and proof a cheaper model is safe, without putting a new hop between your app and the model provider.
  • Portkey is a control plane in the request path. Cost is an out-of-band SDK that never touches latency.
  • If you already run Portkey, Cost still adds the verification and finance-facing attribution it does not focus on.

At a glance: features, pricing, and deployment

How Cost and Portkey line up across the dimensions that decide a purchase. Sourced figures link out; anything we could not verify cleanly is flagged.

Feature-by-feature comparison of Cost and Portkey
CostPortkey
Primary jobAttribute every euro of LLM spend to a route or feature, then recommend the fix
An AI gateway and governance control plane for LLMs and agentsportkey.ai
ArchitectureAn SDK that wraps your existing client, out-of-band
An inline gateway that every request passes throughportkey.ai
In the request critical pathNo
Yes; the gateway sits in front of every model callportkey.ai
Where prompt data flowsCost metadata only by default; prompt bodies stay in your network unless you opt in per route
Through Portkey's gateway; self-hosted or VPC deployment keeps it in your environmentportkey.ai
Verify a model swap before shippingYes: shadow-runs the cheaper model on real traffic and judges output before enabling the swap
Routing, fallbacks, and budgets, but no eval-gated downgrade workflow
Free tier100,000 events per month, no card
Developer: 10,000 logs/month, 3-day retention; or self-host the OSS gatewayportkey.ai
Paid entry priceUsage-based; billing in private beta
Production $49/mo (100k logs), then $9 per additional 100kportkey.ai
Self-host / on-premThe SDK runs in your infrastructure; the dashboard is hosted
Self-host, hybrid, VPC, and on-prem optionsportkey.ai
Open sourceThe TypeScript and Python SDKs are open source
MIT-licensed gateway, roughly 12k GitHub starsgithub.com
Supported providersAnthropic, OpenAI, Gemini
1,600+ models across 45+ providersgithub.com
OwnershipIndependent (Botzone)
Acquired by Palo Alto Networks, completed May 2026prnewswire.com
Best fitEngineering leaders and CFOs defending a line item
Teams that want a production gateway and governanceportkey.ai
Most recent shipped featureEval-gated model-downgrade verification
MCP Gateway reached general availability (Jan 2026)portkey.ai

Where Portkey is stronger

Portkey is a serious production gateway, and it is stronger than Cost everywhere that role matters. One API reaches roughly 1,600 models across 45-plus providers, with conditional routing, automatic fallbacks, key-level load balancing, retries with a circuit breaker, canary rollouts, and both simple and semantic caching. If you want a resilient control plane in front of your models, Cost does not compete with that, and is not trying to.

It is also credibly open source. The gateway is MIT-licensed with around 12k GitHub stars, and Portkey moved formerly paid governance, observability, and cost-control features into the open repo. You can self-host the full stack for free, and enterprises can run it in a VPC or fully on-prem, which addresses the data-residency objection that a pure-SaaS tool cannot.

The governance surface is broad: RBAC, SSO, activity logging, PII redaction, and a large library of deterministic and LLM-based guardrails, plus a recently shipped MCP Gateway for governing agent tool access. For a platform team standardizing how an organization talks to models, that breadth is genuinely useful.

And the acquisition by Palo Alto Networks in 2026 is a real signal. It validates enterprise trust and adds durability and security weight behind the product. If you are buying for a large enterprise that already works with Palo Alto, that is a point in Portkey's favor, not against it.

Where Cost is stronger

Cost verifies before it recommends, which Portkey does not do. Portkey gives you routing, fallbacks, and budgets, but if you want to move a route to a cheaper model, the decision is still yours to make blind. Cost replays your recent real traffic through the cheaper model, judges every response across five dimensions, and only marks the swap safe if 95% pass. You get the saving with proof attached.

Cost is out-of-band, and for many teams that is the whole point. Portkey is an inline gateway, so every request passes through it and it sits in your latency-critical path. Cost is an SDK that wraps your client where it already runs. There is no extra hop, no new point of failure between your app and the provider, and nothing to keep highly available.

Cost is privacy-first by default without operational overhead. It sends only cost metadata, model, tokens, route, and latency, and keeps prompt and response bodies in your network unless you opt in per route. Portkey can meet a strict data-residency bar too, but you usually get there by self-hosting the gateway or running a VPC deployment, which is more to operate.

And Cost is cost-shaped. The unit is the euro, attributed to a route or feature, and the deliverable is a ranked list of what to fix with expected savings. Portkey's cost features are budgets, rate limits, and per-use-case attribution inside a gateway. Cost is built for the person who has to justify and reduce the bill, and the verification step is the part they can take to a meeting.

Portkey vs Cost: which should you choose?

If you are a platform or infrastructure engineer who needs one resilient entry point to many models, with routing, fallbacks, caching, and guardrails, Portkey is the right tool and Cost is not an alternative to it. You are buying a gateway, and Cost does not provide one. Choose Portkey and run it inline.

If you are a CTO, a head of engineering, or a CFO whose problem is a line item that keeps climbing, Cost is built for your question. You do not want to insert a gateway into the request path just to understand spend. You want to know which routes cost the most, whether they can run cheaper safely, and proof before anyone changes a model. Cost attributes the spend and runs the verification without touching your hot path.

Latency and risk tolerance often decide it. An inline gateway is a powerful pattern, but it is also a dependency on every request, and some teams will not accept a third party between their app and the provider. Cost's out-of-band design sidesteps that entirely, which makes it an easier security and reliability conversation.

The acquisition is worth weighing honestly on both sides. For an enterprise already standardized on Palo Alto, Portkey under Prisma AIRS may be a strategic fit. For a team that wants a focused, independent cost tool and is wary of a product being folded into a larger security suite, Cost's independence and narrow scope may be the safer bet. Either way, the two are not mutually exclusive.

Try it on your own bill

Stop guessing. Attribute your own spend.

Cost wraps your Anthropic, OpenAI, and Gemini clients in one line and attributes every euro to a route. Free tier covers 100,000 events per month. No card needed.

Can you use Cost and Portkey together?

Yes, and they slot together cleanly. Portkey can be your gateway on the request path, handling routing, fallbacks, caching, and guardrails. Cost can sit out-of-band as the SDK that attributes spend per route and runs verified downgrade recommendations. Neither needs the other to be removed.

Running both lowers the cost of adopting Cost. Your platform team keeps the gateway they standardized on, and your leadership gets per-route attribution and a safety gate on model changes. Portkey decides how requests are routed; Cost decides which model each route should be on, and proves it before you switch.

What's changed with Portkey recently

A dated log of notable Portkey changes. We refresh this as their public pages move.

  • Palo Alto Networks completed its acquisition of Portkey, folding it into the Prisma AIRS line for governing AI agents. source

  • Palo Alto Networks announced its intent to acquire Portkey. source

  • Published an anonymized benchmark dataset covering roughly $93M of LLM spend from the prior year. source

  • MCP Gateway reached general availability, adding auth, a central registry, and RBAC for Model Context Protocol tools. sourceunverified

Frequently asked questions

Is Cost a Portkey alternative?

Not as a gateway. Portkey is an inline AI gateway with routing, fallbacks, caching, and guardrails, and Cost provides none of that. Cost is an alternative only for the cost-attribution and model-decision job: it attributes spend per route and verifies a cheaper model before you switch. If you need a gateway, you need Portkey or something like it; Cost sits beside it, not in its place.

Does Cost add latency the way an inline gateway can?

No. Cost is an SDK that wraps your client and runs out-of-band, so it is never in the request path and adds no hop or latency to a model call. Portkey, by design, is an inline gateway that every request passes through. That inline position is what enables its routing and caching, but it also makes it a dependency on every call, which Cost is not.

What does the Palo Alto Networks acquisition mean for choosing Portkey?

Palo Alto Networks completed its acquisition of Portkey in May 2026 and is folding it into its Prisma AIRS security line. For an enterprise already invested in Palo Alto, that can be a strategic fit and a sign of durability. For a team that wants a focused, independent cost tool, it is a reason to weigh direction and roadmap. It is a genuine consideration on both sides, not a knock.

Can I run Cost and Portkey together?

Yes. A common setup is Portkey as the inline gateway handling routing, fallbacks, and caching, with Cost out-of-band attributing spend per route and running verified downgrade recommendations. Portkey decides how requests are routed; Cost decides which model each route should run on and proves the change is safe first.

Last updated: . Spotted something out of date? Tell us.