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.
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.
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.
| Dimension | Portkey | Cloudflare |
|---|---|---|
| Best for | OSS gateway + hosted platform | Fully managed edge, zero-ops |
| Core & runtime | TypeScript gateway + hosted control plane | Proprietary managed edge service |
| Open-source license | MIT gateway; platform commercial | Proprietary; no OSS |
| Provider coverage | 1,600+ models / 45+ providers | 20+ 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 / VPC | OSS self-host; VPC = Enterprise | — Managed-only, no self-host |
| SSO / SCIM | SSO/SCIM Enterprise | SSO free; SCIM Enterprise |
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
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
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.
| Feature | Portkey | Cloudflare |
|---|---|---|
| Core & runtime | Open-source TypeScript gateway (Node.js) + a separate hosted control plane | Proprietary, fully managed service on Cloudflare’s global edge |
| Provider coverage | 1,600+ models across 45+ providers | 20+ providers via a Universal, OpenAI-compatible endpoint |
| Routing | Load balancing, fallbacks, retries, conditional routing (metadata/params/path), circuit breaker | Retries (max 5), fallbacks, and Dynamic Routing on the Universal endpoint |
| Semantic routing | — Rule/parameter-based only | — Not documented |
| Ensemble / fusion | — Not documented | — Not documented |
| Caching | Simple + semantic caching | Exact-match response caching; semantic caching not yet available (planned) |
| Guardrails | 20+ deterministic native + LLM-based + partner checks (tiered) | Cloudflare Guardrails evaluate prompts and responses (flag/block by category); DLP |
| Observability | Logging, tracing, 21+ metric dashboard, OpenTelemetry; retention tiered | Built-in Analytics on the Cloudflare dashboard |
| Budgets & governance | Model Catalog: cost/token budgets, rate limits, workspaces — granular budgets Enterprise | Rate 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 / VPC | OSS self-hosts; managed VPC/hybrid is Enterprise | — Managed-only; no self-host or in-VPC deployment |
| Enterprise identity | RBAC from Production tier; SSO/SAML/OIDC & SCIM Enterprise | Account-level SSO free with custom domain + IdP; SCIM Enterprise-only |
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.
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 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.
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.

