Cloudflare AI Gateway vs Portkey
Both are llm gateways tools. Here is how they actually differ on price, billing model and deployment.
Cloudflare AI Gateway
Core gateway features free on every Cloudflare plan, running at the edge rather than in one region. Its 2026 unified billing lets you pay OpenAI, Anthropic and Google through a single Cloudflare invoice.
Portkey
An open-source LLM gateway that routes to 1,600+ models with fallbacks, caching, budgets and guardrails. The gateway self-hosts free under Apache 2.0 - but real logging, traces and analytics require the managed paid tier.
| Cloudflare AI Gateway | Portkey | |
|---|---|---|
| Category | LLM Gateways | LLM Gateways |
| Our rating | 4/5 | 4/5 |
| Starting price | $0 | $49/mo |
| Billing meter | record | No usage metering |
| Free plan | Yes | Yes |
| Free self-hosting | No or paid tier only | Yes, free |
| Best for | Teams already on Cloudflare who want caching, rate limiting and cost visibility at the edge with no markup, and who have separate tooling for evaluation. | Teams that want one gateway to route, cache, budget and guardrail across many LLM providers, and are fine paying for the managed tier once they need real observability |
Our verdict on Cloudflare AI Gateway
Cloudflare AI Gateway is the best free managed gateway available, and the reason is that Cloudflare is not trying to make money from it directly. Core features - dashboard analytics, caching, rate limiting - are free on every plan, there is no percentage markup on your tokens, and the free tier includes 100,000 logs a month with the $5 Workers Paid plan lifting that to a million. Compare OpenRouter charging 5.5% of everything you spend forever, and the difference at volume is substantial. Running at the edge is a genuine architectural advantage too, putting the control plane near your users rather than in one region. The 2026 addition of unified billing, letting you pay for OpenAI, Anthropic and Google AI Studio usage through a single Cloudflare invoice, removes procurement friction that is more annoying in practice than it sounds. Two honest limits. The metering is logs, not requests, so that is the number to model. And observability stops at request metrics and cost - there is no structured evaluation, so this is one component of a stack rather than the stack.
Full Cloudflare AI Gateway review →Our verdict on Portkey
Portkey is the strongest LLM gateway in this set, and the open-source core is a genuinely good, free, self-hostable proxy for routing, fallbacks and guardrails. The catch is where the value migrates. Self-host gives you routing for free, but the logs, traces and analytics that most teams actually adopt an observability tool for live on the managed tier. Know that split before you plan a self-hosted deployment, or you'll stand up the gateway and then discover the dashboard you wanted is a paid feature.
Full Portkey review →Frequently Asked Questions
What is the main difference between Cloudflare AI Gateway and Portkey?
Cloudflare AI Gateway: Teams already on Cloudflare who want caching, rate limiting and cost visibility at the edge with no markup, and who have separate tooling for evaluation. Portkey: Teams that want one gateway to route, cache, budget and guardrail across many LLM providers, and are fine paying for the managed tier once they need real observability Both sit in LLM Gateways, so the decision usually comes down to billing model and deployment rather than raw capability.
Which is cheaper, Cloudflare AI Gateway or Portkey?
It depends entirely on your workload shape, because they meter differently - Cloudflare AI Gateway bills on record and Portkey bills on no usage metering. Published starting prices are $0 and $49/mo respectively, but those numbers are not comparable until you apply them to the same traffic. Use our cost calculator to model both against your own request volume and span count.
Can I self-host Cloudflare AI Gateway or Portkey?
Cloudflare AI Gateway: No or paid tier only. Portkey: Yes, free. Free self-hosting means no licence fee, not no cost - you still own the infrastructure, upgrades and on-call.