---
title: "Portkey vs Cloudflare AI Gateway (2026): Compared - API7.ai"
description: "Portkey vs Cloudflare AI Gateway compared: architecture, routing, caching, guardrails, observability, governance, self-hosting, and pricing."
url: "https://api7.ai/portkey-vs-cloudflare-ai-gateway"
---

# 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](#at-a-glance)
- [What is Portkey?](#what-is-portkey)
- [What is Cloudflare AI Gateway?](#what-is-cloudflare)
- [Feature comparison](#feature-comparison)
- [Pricing](#pricing)
- [When to use each](#choose)
- [Bottom line](#bottom-line)
- [FAQ](#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.

| 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        |

## 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.

| 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              |

## 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](https://api7.ai/ai-gateway-comparison) or [AISIX vs LiteLLM](https://api7.ai/aisix-vs-litellm).

## Frequently asked questions

### Is Portkey or Cloudflare AI Gateway better?

It depends on your priorities. Portkey pairs an open-source TypeScript gateway with a hosted control plane and advertises the widest catalog — 1,600+ models across 45+ providers — plus native guardrails, semantic caching, and an MCP gateway, though advanced governance is tiered. Cloudflare AI Gateway is a fully managed, zero-ops service on Cloudflare’s edge with built-in guardrails, analytics, spend limits, and exact-match caching across 20+ providers, but you cannot self-host it.

### Is Portkey open source?

Partly. Portkey's AI Gateway is open source under the MIT license and is written in TypeScript (Node.js). The hosted platform that adds observability, prompt management, RBAC, SSO/SCIM, and VPC/hybrid deployment is commercial and tiered.

### Is Cloudflare AI Gateway open source or self-hostable?

No. Cloudflare AI Gateway is a proprietary, fully managed service that runs on Cloudflare’s global edge. There is no self-hosted or in-VPC option — traffic proxies through Cloudflare’s edge. It offers a free tier and is designed to be zero-ops.

### Do Portkey or Cloudflare AI Gateway support semantic caching?

Portkey supports both simple and semantic caching (semantic caching is an Enterprise-tier feature). Cloudflare AI Gateway supports exact-match response caching today; semantic caching is not yet available and is noted as planned.

### Do Portkey and Cloudflare AI Gateway have guardrails?

Yes, both do. Portkey ships 20+ deterministic native guardrails plus LLM-based and partner checks (tiered). Cloudflare Guardrails evaluate both prompts and responses and can flag or block content by category, with DLP available as well.

### What are some alternatives to Portkey and Cloudflare AI Gateway?

The AI gateway space also includes LiteLLM, Kong AI Gateway, OpenRouter, and AISIX, among others. AISIX, for example, is a Rust-native gateway whose entire data plane is Apache-2.0, with semantic routing and ensemble built in and self-hosting in your own VPC. Which one fits depends on whether you want a hosted platform, a managed edge service, or a fully open self-hosted data plane.

## Related comparisons

[Portkey vs LiteLLM](https://api7.ai/portkey-vs-litellm) · [AISIX vs LiteLLM](https://api7.ai/aisix-vs-litellm) · [All AI gateway comparisons](https://api7.ai/ai-gateway-comparison)

## Ready to get started?

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

[Contact Us](https://api7.ai/contact)
