Head to head

Vercel AI Gateway vs Cloudflare AI Gateway: which hosted gateway?

Both are hosted AI gateways with no markup on tokens. Vercel leads on budgets and API formats; Cloudflare on edge caching and free core features. Compared.

Both are hosted gateways that put many model providers behind one endpoint, and neither adds a markup to provider token prices. Vercel AI Gateway is stronger on budgets per key or person, request logs and API formats. Cloudflare AI Gateway is stronger on edge caching and has free core features on every plan. If you already deploy on one of them, that's usually the deciding factor.

Facts checked on 3 December 2026 against Vercel's docs and Cloudflare's docs.

At a glance

Vercel AI GatewayCloudflare AI Gateway
HostingVercel, at ai-gateway.vercel.shCloudflare's network
Token pricingProvider list prices, no markup, including BYOKProvider prices passed through, no markup
FeesAdd-on surcharges (e.g. regional hosting); $0.20 per 1,000 BYOK requests if fallback is offCore features free; 5% on credits bought through Unified Billing
API formatsOpenAI Chat Completions, OpenAI Responses, Anthropic Messages, AI SDKCheck Cloudflare's provider docs for each provider
CachingAutomatic prompt caching; full-response caching left to your appResponse caching at the edge
Spend controlBudgets per team, project, API key or team memberRate limiting per gateway; analytics on tokens and cost
LogsRequest logs with provider attempts, latency, tokens, costLogs; storage rules depend on account age
GuardrailsSafety controls in its security settingsLlama Guard on Workers AI (billed as inference), free DLP scanning
FallbacksProvider ordering and model fallbacksModel aliases, dynamic routes, retries and fallbacks

Cost

On tokens, both pass provider prices through. The differences are at the edges:

  • Vercel charges surcharges for add-ons like regional hosting, region pinning and team-wide allowlists, and those apply to BYOK too. If you turn off fallback to Vercel's keys, BYOK requests cost $0.20 per 1,000. Custom Reporting by user, tag or provider is priced separately (pricing).
  • Cloudflare gives analytics, caching and rate limiting free on all plans. Buying model credits through Unified Billing adds 5%. Log storage for accounts created on or after 24 September 2026 follows Workers Logs pricing (pricing).

At typical volumes neither bill is large, so pick on features.

Spend control

This is the clearest difference. Vercel lets you set budgets for a team, project, API key or team member, and rejects requests with HTTP 402 once a budget is exceeded. Budgets are soft caps and cover spend billed through Vercel's keys (Vercel docs).

Cloudflare's rate limiting controls how many requests reach a gateway, and its analytics show tokens and cost. If you need each person or key on its own budget, Vercel is closer out of the box. For a deeper look at the problem, see LLM cost tracking per user.

Caching

Cloudflare can serve repeated requests straight from its cache at the edge, which saves both cost and latency for identical prompts. Vercel's automatic caching uses providers' prompt caching (you pay the reduced cached-input rate) and leaves full-response caching to your application.

Which one should you pick?

  • Pick Vercel AI Gateway if you need budgets per key or team member, want OpenAI Responses or Anthropic Messages formats, or build with the AI SDK.
  • Pick Cloudflare AI Gateway if you're on Cloudflare, want free core features, or repeated prompts make edge caching valuable.
  • Pick neither if requests must stay inside your network or you want your own GPUs in the routing. See Vercel AI Gateway alternatives and Cloudflare AI Gateway alternatives.

When you need your own GPUs in the mix

Both route to hosted providers. AI Gateway by LayerX runs on your servers, or LayerX hosts it, and sends requests to your own vLLM or Ollama servers first, moving to vendors when needed. Each person gets their own keys, token budgets and allowed models, and prompts are never stored. It supports OpenAI-compatible providers only and has no caching. Compare with each: AI Gateway vs Vercel AI Gateway, AI Gateway vs Cloudflare AI Gateway.

Questions

Is Vercel AI Gateway or Cloudflare AI Gateway cheaper?

Neither adds a markup to tokens. Cloudflare's core features are free; Vercel charges for some add-ons. Cloudflare adds 5% if you buy credits through it; Vercel adds nothing on credits.

Do I need to host my app on Vercel or Cloudflare to use their gateways?

Vercel's gateway can be called from any cloud with a Vercel account and API key. Cloudflare's gateway needs a Cloudflare account and works with apps hosted anywhere.

Which one caches responses?

Cloudflare caches full responses at the edge. Vercel uses provider prompt caching and leaves response caching to your app.

Can I self-host either one?

No. Both are hosted services. For self-hosting, look at LiteLLM, Bifrost or AI Gateway by LayerX.

More posts

Keep reading.

See how AI Gateway fits your setup.

Tell us what you run today and how many people need access. We'll get back to you to learn more about your setup.

See how AI Gateway fits your setup.

What do you run today?