New

Announcing AISIX: The AI-Native AI Gateway for LLMs and AI AgentsLearn More

Learn More

Portkey vs Cloudflare AI Gateway: Which in 2026?

By API7.ai Team

Last updated: June 2026

Portkey and Cloudflare AI Gateway both put one API in front of many LLM providers, but from opposite directions: Portkey is an open-source gateway with a hosted platform, while Cloudflare AI Gateway is a fully managed edge service. This guide compares them on architecture, routing, caching, guardrails, observability, governance, self-hosting, and pricing so you can choose the right fit.

TL;DR

Portkey pairs an MIT TypeScript gateway with a hosted control plane — the widest catalog (1,600+ models), native guardrails, semantic caching, and an MCP gateway, with advanced governance tiered. Cloudflare AI Gateway is a fully managed edge service with built-in guardrails, analytics, spend limits, and exact-match caching across 20+ providers, but no self-host. The core axis is an OSS gateway plus hosted platform versus a managed edge SaaS.

  • Teams wanting an OSS gateway + hosted platform: Portkey
  • Teams wanting a zero-ops managed edge service: Cloudflare AI Gateway
  • At a glance
  • What is Portkey?
  • What is Cloudflare AI Gateway?
  • Feature comparison
  • Pricing
  • When to use each
  • Bottom line
  • FAQ

Portkey vs Cloudflare AI Gateway at a glance

Portkey leads on provider breadth, a self-hostable OSS gateway, and a hosted governance UI; Cloudflare AI Gateway leads on zero-ops managed edge delivery. Both ship guardrails and spend controls.

DimensionPortkeyCloudflare
Best forOSS gateway + hosted platformFully managed edge, zero-ops
Core & runtimeTypeScript gateway + hosted control planeProprietary managed edge service
Open-source licenseMIT gateway; platform commercialProprietary; no OSS
Provider coverage1,600+ models / 45+ providers20+ providers (Universal API)
Caching✓ Simple + semantic✓ Exact-match (semantic future)
Guardrails✓ 20+ native + LLM/partner✓ Prompt + response + DLP
MCP gateway✓ Documented— Outside the AI gateway
Self-host / VPCOSS self-host; VPC = Enterprise— Managed-only, no self-host
SSO / SCIMSSO/SCIM EnterpriseSSO free; SCIM Enterprise

What is Portkey?

Portkey is an AI gateway pairing an open-source TypeScript gateway with a hosted control plane for observability, prompt management, and governance.

Portkey is an AI gateway that pairs an open-source TypeScript gateway (MIT) with a hosted control plane for observability, prompt management, and governance. It advertises 1,600+ models across 45+ providers.

Language

TypeScript (Node.js)

License

MIT gateway + commercial platform

Form factor

OSS gateway + hosted SaaS

Best for

OSS gateway with a hosted platform

Pros

  • 1,600+ models across 45+ providers
  • Simple and semantic caching (semantic is Enterprise)
  • 20+ native guardrails plus LLM-based and partner checks
  • Documented MCP gateway; self-hostable OSS gateway

Cons

  • RBAC (Production tier), SSO/SCIM, VPC deploy, granular budgets are paid
  • Conditional routing is rule/parameter-based, not semantic
  • No documented ensemble; log/metric retention is tiered by plan

What is Cloudflare AI Gateway?

Cloudflare AI Gateway is a proprietary, fully managed service on Cloudflare's edge that proxies 20+ providers through one Universal, OpenAI-compatible endpoint with caching, guardrails, analytics, and spend limits.

Cloudflare AI Gateway is a proprietary, fully managed service on Cloudflare’s global edge. It proxies traffic to 20+ providers through a Universal, OpenAI-compatible endpoint and adds caching, guardrails, analytics, and spend limits with zero ops.

Runtime

Cloudflare edge (managed)

License

Proprietary (no OSS)

Form factor

Fully managed SaaS

Best for

Zero-ops managed edge gateway

Pros

  • Fully managed and zero-ops on Cloudflare’s edge
  • Built-in Guardrails moderate prompts and responses; DLP
  • Analytics, Rate Limiting, Spend Limits, and Custom Costs
  • Free tier; 20+ providers via one Universal endpoint

Cons

  • Managed-only — no self-host or in-VPC deployment
  • Semantic caching not yet available (exact-match only today)
  • MCP is outside the AI gateway; SCIM is Enterprise-only

Portkey vs Cloudflare AI Gateway: feature comparison

The two converge on routing basics, caching, guardrails, and spend controls, then diverge on form factor (OSS gateway plus hosted platform vs managed edge SaaS) and whether you can self-host.

FeaturePortkeyCloudflare
Core & runtimeOpen-source TypeScript gateway (Node.js) + a separate hosted control planeProprietary, fully managed service on Cloudflare’s global edge
Provider coverage1,600+ models across 45+ providers20+ providers via a Universal, OpenAI-compatible endpoint
RoutingLoad balancing, fallbacks, retries, conditional routing (metadata/params/path), circuit breakerRetries (max 5), fallbacks, and Dynamic Routing on the Universal endpoint
Semantic routing— Rule/parameter-based only— Not documented
Ensemble / fusion— Not documented— Not documented
CachingSimple + semantic cachingExact-match response caching; semantic caching not yet available (planned)
Guardrails20+ deterministic native + LLM-based + partner checks (tiered)Cloudflare Guardrails evaluate prompts and responses (flag/block by category); DLP
ObservabilityLogging, tracing, 21+ metric dashboard, OpenTelemetry; retention tieredBuilt-in Analytics on the Cloudflare dashboard
Budgets & governanceModel Catalog: cost/token budgets, rate limits, workspaces — granular budgets EnterpriseRate Limiting, Spend Limits (cost budgets), Custom Costs, Analytics
MCP gateway✓ Documented (auth + access control for remote MCP)— Not in AI Gateway (separate Cloudflare Agents / Cloudflare One portals)
Self-host / VPCOSS self-hosts; managed VPC/hybrid is Enterprise— Managed-only; no self-host or in-VPC deployment
Enterprise identityRBAC from Production tier; SSO/SAML/OIDC & SCIM EnterpriseAccount-level SSO free with custom domain + IdP; SCIM Enterprise-only

Pricing comparison

Both offer a free entry point and paywall advanced governance — but along different lines.

Portkey's gateway is free (MIT); the hosted platform is tiered — a free Developer tier, a paid Production tier (from about $49/month) that unlocks RBAC, and an Enterprise tier for SSO/SCIM, VPC/hybrid deployment, semantic caching, and granular budgets. Cloudflare AI Gateway offers a free tier and is designed to be zero-ops, with usage on Cloudflare's platform; account-level SSO is free with a custom domain and your IdP, while SCIM is Enterprise-only. In short, Portkey gates platform breadth and self-host/VPC by tier, while Cloudflare gates account-level identity (SCIM) at the enterprise level.

When to use Portkey vs Cloudflare AI Gateway

Choose Portkey for provider breadth, a self-hostable OSS gateway, and a hosted governance UI; choose Cloudflare AI Gateway for a zero-ops managed edge service.

Choose Portkey if you…

  • Want the widest provider catalog behind one API
  • Want a self-hostable OSS gateway plus a hosted governance UI
  • Want native guardrails, semantic caching, and an MCP gateway

Choose Cloudflare AI Gateway if you…

  • Want a fully managed, zero-ops edge service with a free tier
  • Want built-in prompt/response guardrails, analytics, and spend limits
  • Are fine proxying through Cloudflare’s edge with no self-host

Bottom line

Choose Portkey for the widest catalog, native guardrails, and a self-hostable OSS gateway; choose Cloudflare AI Gateway for a fully managed, zero-ops edge service with built-in guardrails and analytics.

For the broadest provider catalog, a self-hostable OSS gateway, and a hosted observability-and-governance UI, Portkey is the stronger pick; for a fully managed, zero-ops edge service with built-in guardrails, analytics, and spend limits, Cloudflare AI Gateway fits better. If you want a fully open, self-hosted data plane instead, AISIX is another option worth a look: a Rust, Apache-2.0 gateway with semantic routing and ensemble built in that you can run in your own VPC. See all AI gateway comparisons or AISIX vs LiteLLM.

Frequently asked questions

Related comparisons

Portkey vs LiteLLM · AISIX vs LiteLLM · All AI gateway comparisons

Ready to get started?

For more information about full API lifecycle management, please contact us to Meet with our API Experts.

Contact Us