Vercel vs Cloudflare vs Portkey AI Gateway

Short answer: pick Cloudflare AI Gateway if you want free caching and observability at the edge, Vercel AI Gateway if your app already lives on Vercel and you want one billing surface for models, and Portkey if you need guardrails, per-team budgets and self-hosting. Below is the feature-by-feature breakdown.

Feature comparison: Vercel AI Gateway vs Cloudflare AI Gateway vs Portkey

Vercel AI Gateway, Cloudflare AI Gateway and Portkey compared across ten capabilities
CapabilityVercel AI GatewayCloudflare AI GatewayPortkey
Primary purposeWhat the product is designed to do firstUnified model access for apps built and deployed on VercelObservability, caching and rate limiting in front of model providersProduction LLMOps control plane: routing, guardrails, governance
Model coverageHow many providers/models are reachable through one APIHundreds of models through the AI SDK provider interfaceMajor providers plus Workers AI models run on Cloudflare's own network1,600+ models documented across providers with one OpenAI-compatible API
Semantic / response cachingReuse answers for equivalent requests to cut spendNot documented as a semantic cacheYes — response caching with configurable TTLYes — simple and semantic caching modes
Guardrails and content policyInline checks on prompts and responsesLeft to the application layerGuardrails available alongside gateway policiesYes — a guardrails library with pass/fail actions on request and response
PII redactionStrip sensitive data before it reaches a providerNot documentedAvailable via guardrails configurationYes — PII detection and redaction guardrails
Fallbacks and retriesBehaviour when a provider errors or rate limitsProvider fallback supported through the AI SDKYes — fallback chains and request retriesYes — conditional routing, load balancing, retries and fallbacks
ObservabilityLogs, traces and per-request cost visibilityUsage and spend inside the Vercel dashboardRequest logs, analytics and cost metrics per gatewayFull request logging, tracing, evals and cost analytics
Budgets and governancePer-team or per-key spend controlsAccount-level credit and usage limitsRate limiting per gatewayVirtual keys with budget limits and rate limits per team or workload
Deployment modelWhere the gateway runsFully managed by VercelFully managed on Cloudflare's edge networkManaged cloud, plus self-hosted / hybrid for enterprise
Pricing shapeHow you are billed for the gateway itselfModel tokens billed through your Vercel account; gateway included in planGateway is free; you pay providers directly (caching reduces provider spend)Free tier, then per-request/seat tiers; enterprise for self-hosting

Capabilities reflect each vendor's public documentation at time of writing. See our methodology for how we verify claims.

Which AI gateway should you choose?

Choose Vercel AI Gateway if…

  • Your product already ships on Vercel and uses the AI SDK.
  • You want one invoice covering hosting and model spend.
  • Provider switching matters more than inline policy enforcement.

Choose Cloudflare AI Gateway if…

  • You want caching, rate limiting and logs with zero gateway cost.
  • Repeated prompts make response caching an immediate saving.
  • Edge latency and existing Cloudflare infrastructure matter.

Choose Portkey if…

  • You need guardrails, PII redaction and audit-grade logging.
  • Per-team budgets and virtual keys are a governance requirement.
  • Compliance pushes you toward self-hosted or hybrid deployment.

Where a routing gateway stops and a security gate starts

All three products are routing-first. They standardize provider access, cache responses and report spend — but only Portkey and Cloudflare document inline content controls, and none of them position themselves primarily as a prompt-injection defense layer. If your driving risk is untrusted input reaching a model, read the AI gate explainer and the prompt-injection prevention guide, then compare security-first platforms in our rankings.

Frequently asked questions

What is the difference between Vercel AI Gateway, Cloudflare AI Gateway and Portkey?
Vercel AI Gateway is a model-access layer for teams already deploying on Vercel — it standardizes provider access and billing inside the Vercel platform. Cloudflare AI Gateway is an edge proxy focused on caching, rate limiting and observability in front of any provider, and it is free to use. Portkey is the most complete control plane of the three, adding guardrails, virtual keys with budgets, conditional routing and self-hosting for regulated teams.
Which one is cheapest?
Cloudflare AI Gateway has no gateway fee — you keep paying model providers directly, and its response caching can cut provider spend on repeated prompts. Vercel folds model spend into your Vercel account. Portkey charges for the platform above a free tier, which usually pays for itself only when you need its governance and guardrail features.
Which gateway has real security controls?
Portkey is the strongest of the three on inline security, with a guardrails library covering PII detection, content checks and custom validators applied to both requests and responses. Cloudflare offers guardrails alongside its gateway policies. Vercel leaves content and injection defense to the application layer. If prompt-injection defense is the deciding requirement, look at dedicated AI security gates rather than a routing-first gateway.
Can I self-host any of these?
Only Portkey documents a self-hosted and hybrid deployment for enterprise customers. Vercel AI Gateway and Cloudflare AI Gateway are managed services that run on their respective platforms, so your traffic transits vendor infrastructure by design.
Can I use more than one AI gateway?
Yes, and chaining is common: an edge cache in front and a governance layer behind it, or a security gate ahead of a routing gateway. Verify your latency budget and decide which single layer owns policy enforcement, otherwise debugging blocked requests becomes painful.

Related: Cloudflare AI Gateway review · Portkey review · How to reduce AI token costs · Build your own comparison

Newsletter

The AI Gateway Brief

A weekly briefing on AI security threats, gateway technology, token economics, model routing, and the infrastructure controlling enterprise AI.

No vendor sponsorship in the brief. Unsubscribe at any time.