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 Gateway | Cloudflare AI Gateway | |
|---|---|---|
| Hosting | Vercel, at ai-gateway.vercel.sh | Cloudflare's network |
| Token pricing | Provider list prices, no markup, including BYOK | Provider prices passed through, no markup |
| Fees | Add-on surcharges (e.g. regional hosting); $0.20 per 1,000 BYOK requests if fallback is off | Core features free; 5% on credits bought through Unified Billing |
| API formats | OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, AI SDK | Check Cloudflare's provider docs for each provider |
| Caching | Automatic prompt caching; full-response caching left to your app | Response caching at the edge |
| Spend control | Budgets per team, project, API key or team member | Rate limiting per gateway; analytics on tokens and cost |
| Logs | Request logs with provider attempts, latency, tokens, cost | Logs; storage rules depend on account age |
| Guardrails | Safety controls in its security settings | Llama Guard on Workers AI (billed as inference), free DLP scanning |
| Fallbacks | Provider ordering and model fallbacks | Model 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.