
Cloud · Comparison
AI Gateways Compared: Vercel vs Cloudflare vs OpenRouter
Vercel AI Gateway, Cloudflare AI Gateway, and OpenRouter all pass tokens through at list price. Here is how their fees, BYOK, caching, routing, and limits actually differ.
Wajid Ali · Oct 24, 2026 · 11 min read
On this page
Pick Vercel AI Gateway if you want provider list prices with zero markup and you already live in the AI SDK; pick Cloudflare AI Gateway if you want a free proxy for caching, rate limiting, and logs in front of keys you already own; pick OpenRouter if you want the widest model catalog and smart price-or-latency routing behind one OpenAI-compatible key. All three pass inference through at provider list price; where they differ is how they charge for the convenience and what the gateway actually does for you.
This guide compares the three on pricing, bring-your-own-key (BYOK), caching, rate limits, routing and fallbacks, observability, and data controls, using only each vendor's official docs and pricing pages. Prices as of October 24, 2026.

Image: Vercel, "AI Gateway - Vercel" product page social image, accessed October 24, 2026. Source: https://vercel.com/ai-gateway
What an AI gateway actually does
An AI gateway is a proxy between your application and model providers such as OpenAI, Anthropic, Google, xAI, or Mistral. Instead of wiring every provider SDK, billing account, and retry loop into your app, you send requests to one endpoint and the gateway handles authentication, routing, fallbacks, usage logging, and spend limits. Swapping models becomes a string change rather than a refactor.
The three products here overlap but come from different directions. Vercel AI Gateway is a unified model API built by Vercel alongside its AI SDK. Cloudflare AI Gateway started as an observability and control proxy on Cloudflare's network and has since added billing and routing. OpenRouter is a model marketplace and router from OpenRouter that resells access to hundreds of models through one account.
Pricing: who takes a cut, and where
None of the three marks up per-token inference prices. The money is made elsewhere, so compare the fee structure, not the token price. Prices as of October 24, 2026.
Vercel AI Gateway. Per Vercel's pricing docs, AI Gateway is available on all plans, tokens are billed at the provider's list price with zero markup and no platform fee, and you pay through prepaid AI Gateway Credits with optional auto top-up. A free tier includes a monthly credit, a subset of models, and lower per-model rate limits; buying credits moves you to the paid tier. Paid add-ons are priced separately: Custom Reporting at $0.075 per 1,000 writes and $5 per 1,000 queries, a team-wide provider allowlist at $0.10 per 1,000 successful requests, team-wide zero data retention at $0.10 per 1,000 requests, and Trace Drains at $0.05 per 1,000 traces plus $0.50 per GB of egress. Volume discounts and invoicing are available for Enterprise.
Cloudflare AI Gateway. Cloudflare's pricing page says AI Gateway is available on all plans and its core features, including analytics, caching, and rate limiting, are free. If you use your own provider keys, you pay the provider directly and Cloudflare charges nothing for the proxy itself. Optional Unified Billing lets you pay for third-party models through Cloudflare credits: provider inference passes through without markup, but a 5% fee applies to credit purchases, so $100 of credits costs $105. Log storage for accounts whose first gateway was created on or after September 24, 2026 follows Workers Logs pricing; older accounts keep the legacy allowance of 100,000 logs total on Workers Free and 10 million per gateway on Workers Paid. Guardrails are billed as Workers AI inference, and Logpush follows Logpush pricing.
OpenRouter. OpenRouter's pricing page lists inference at provider list price on every plan, with a fee charged when you buy credits rather than per request. The Free plan gives 25+ free models from four providers and 50 requests per day. Standard (pay-as-you-go) carries a 5.5% fee on credit purchases. Business carries an 8% fee and adds EU and US in-region routing, up to 1,000 workspaces, and workload identity federation. Enterprise offers fee discounts, SSO/SAML, and SLAs. Free models are capped at 20 requests per minute and 50 per day, rising to 1,000 per day once you have bought at least $10 of credits. OpenRouter also says failed or fallback attempts are not billed, and its openrouter/auto router adds no extra fee.
The practical read: if you are routing heavy traffic with your own keys, Cloudflare's proxy is free and Vercel and OpenRouter are close to free (see BYOK below). If you want one bill for many providers, Vercel's zero-markup credits are the cheapest on paper, Cloudflare's Unified Billing costs 5% on top, and OpenRouter costs 5.5% on Standard or 8% on Business.
Bring your own key (BYOK)
Vercel supports BYOK with no markup, but only on the paid tier, meaning you must have purchased credits. If a BYOK request fails, Vercel falls back to its own system credentials and bills that request to your credits. BYOK spend does not count toward AI Gateway budgets.
Cloudflare stores provider keys in Secrets Store. Its docs describe a credential order: a key sent on the request wins, then the stored BYOK default, then Unified Billing. A "require provider credentials" setting turns off the fallback to Unified Billing, so you never get billed by Cloudflare by surprise.
OpenRouter gives BYOK users the first $25,000 of list-price inference per month with no fee, then charges 5% of what the same usage would have cost on OpenRouter. For most startups that means BYOK is effectively free; at large scale, the 5% starts to matter.
Caching: response cache vs prompt cache
This is where the three differ most, and the word "caching" means different things in each set of docs.
Cloudflare offers a true response cache. It is exact-match: the cache key is a SHA-256 hash of the provider, endpoint, model, auth header, and full request body, so any change in the prompt is a miss. Caching is off by default. You control it per request with headers such as cf-aig-cache-ttl (minimum 60 seconds), cf-aig-skip-cache, and cf-aig-cache-key, and the cf-aig-cache-status response header reports HIT or MISS. Per Cloudflare's limits page, the maximum TTL is one month and cacheable requests can be up to 25 MB. It currently covers text and image responses; Cloudflare says semantic caching is planned.
OpenRouter also has response caching, enabled with an X-OpenRouter-Cache header or through presets. TTL ranges from 1 to 86,400 seconds with a default of 300, it works with streaming, and OpenRouter's docs say cache hits are not billed. Separately, provider prompt caching is available on Standard and above.
Vercel focuses on prompt caching rather than response caching. Setting caching to 'auto' makes the gateway insert cache_control markers for providers that need them explicitly, such as Anthropic, MiniMax, and Alibaba, so you get the provider's discounted cached-input pricing without hand-placing breakpoints. Vercel's docs do not describe a gateway-level response cache, so if you want repeated identical prompts served without hitting a model at all, you would build that yourself.
Rate limits and spend controls
Vercel applies lower per-model rate limits on the free tier. On the paid tier, the gateway itself imposes no rate limits, though provider limits still apply, and custom limits are available on request. Budgets can be set per team, project, API key, or member and act as a soft cap.
Cloudflare gives you configurable rate limiting per gateway using fixed or sliding windows, returning HTTP 429 when exceeded. Spend limits can be scoped by model, provider, or custom metadata. Free accounts can create 10 gateways and paid accounts 20. Unified Billing traffic is limited to 200 requests per 60 seconds per gateway; that limit does not apply to BYOK traffic.
OpenRouter sets no plan-based rate limits on paid models; provider limits pass through. Budgets and spend controls are available from the Standard plan up.
Routing and fallbacks
All three can fail over from one model or provider to another, but the control surfaces differ.
Vercel lets you set provider order and filters, and model fallbacks through providerOptions.gateway.models in the AI SDK, plus routing rules and virtual models configured at the gateway. A per-request only filter restricts which providers can serve a call at no extra cost.
Cloudflare supports request retries and model fallback, and its Dynamic Routing feature lets you build a versioned routing flow, visually or in JSON, with conditional, percentage-split (for A/B tests), model, rate-limit, and budget-limit nodes. You call a route by using dynamic/{route-name} as the model name, and routes can be rolled back. Dynamic routes currently accept the OpenAI chat-completions request shape and require BYOK.
OpenRouter has the richest per-request routing. The provider object accepts order, allow_fallbacks, only, ignore, sort (by price, throughput, or latency), max_price, quantizations, zdr, and data_collection. By default it load-balances across providers weighted toward cheaper ones, and the :nitro and :floor model suffixes are shortcuts for sorting by throughput or price. A models array gives model-level fallbacks.
Because all three speak the OpenAI request format, switching is mostly a base-URL change. The snippet below is illustrative, not a tested benchmark:
Illustrative only (OpenAI SDK, TypeScript): new OpenAI({ baseURL: 'https://ai-gateway.vercel.sh/v1', apiKey: process.env.AI_GATEWAY_API_KEY }) for Vercel; baseURL 'https://openrouter.ai/api/v1' for OpenRouter; and for Cloudflare, the account-scoped endpoint api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1/chat/completions documented in its chat-completion guide.
Model and API coverage
Vercel documents 400+ models across text, image, video, speech, transcription, realtime, embeddings, and reranking, and exposes a public list at its /v1/models endpoint. It speaks the AI SDK, OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages formats, and your app does not need to be hosted on Vercel; an API key works anywhere. We covered how fast it can add a model in our piece on Vercel shipping Mistral's new model to the gateway the same day.
Cloudflare documents integrations for 24 providers, including OpenAI, Anthropic, Google AI Studio, Vertex AI, Amazon Bedrock, Azure OpenAI, Mistral, Groq, xAI, DeepSeek, Replicate, Hugging Face, Perplexity, its own Workers AI, and even OpenRouter. Unified Billing over HTTP currently covers OpenAI, Anthropic, Google AI Studio, Vertex AI, xAI, and Groq. It also offers a WebSockets API for realtime use.
OpenRouter lists 500+ models from 80+ providers, the largest catalog of the three, behind an OpenAI-compatible API. If you need niche open-weight models or many hosts for the same model, this is its main advantage.
Observability and data controls
Vercel request logs show status, provider, latency, tokens, cost, and each routing attempt, with OpenTelemetry Trace Drains and Custom Reporting as paid add-ons. Zero data retention is free per request on Pro and Enterprise, or $0.10 per 1,000 requests team-wide.
Cloudflare gives an analytics dashboard and logs, free DLP scanning (two predefined profiles without Zero Trust), guardrails powered by Llama Guard on Workers AI, Logpush export, and a zero data retention option for Unified Billing traffic.
OpenRouter Broadcast sends traces to tools including Langfuse, Datadog, PostHog, Sentry, an OpenTelemetry collector, S3, and webhooks. Its guardrails cover prompt injection, sensitive information, and secrets, and its provider filters let you require zero data retention or exclude providers that collect data. Business adds in-region EU and US routing.
If your team runs agents across clouds, the same control questions come up with hyperscaler platforms; see our coverage of Bedrock's web search domain filtering and Anthropic's Claude running on Google Cloud.
Pros and cons at a glance
Vercel AI Gateway pros: zero markup on tokens, a deep AI SDK integration, automatic prompt-cache markers, and broad modality support. Cons: BYOK requires buying credits, no response cache, and the team-wide governance features are paid add-ons.
Cloudflare AI Gateway pros: the core proxy is free with your own keys, there is a real exact-match response cache, configurable rate limits, and a versioned routing builder. Cons: Unified Billing costs 5% and covers fewer providers, dynamic routes require BYOK, and new accounts pay Workers Logs pricing for log storage.
OpenRouter pros: the largest catalog, the most granular per-request provider routing, free-to-use auto routing, no charge for failed attempts, and a generous BYOK allowance. Cons: a 5.5% to 8% fee on credit purchases, and in-region routing requires the Business plan.
Which one should you choose?
Choose Vercel AI Gateway if you build on the AI SDK or Next.js, want one bill without paying a percentage on top, and care more about prompt-cache savings than response caching.
Choose Cloudflare AI Gateway if you already hold provider contracts and keys, want free logging, caching, and rate limiting at the edge, or want to put guardrails and DLP in front of every call.
Choose OpenRouter if model breadth and routing by price or latency matter most, you want to try many open-weight models quickly, or you want one account to cover providers you have no contract with. Stacking is possible too: Cloudflare lists OpenRouter as a supported provider, so you can put Cloudflare's cache and logs in front of OpenRouter. Picking the model is a separate question; see our take on GitHub Copilot choosing the model for you.
FAQ
Do AI gateways mark up token prices?
Per their official pricing pages, none of the three marks up per-token inference. Vercel charges no platform fee on tokens, Cloudflare charges 5% on Unified Billing credit purchases (nothing when you use your own keys), and OpenRouter charges 5.5% (Standard) or 8% (Business) on credit purchases.
Which AI gateway has a response cache?
Cloudflare AI Gateway has an exact-match response cache with TTLs up to one month, and OpenRouter has response caching with TTLs up to 24 hours where hits are not billed. Vercel AI Gateway documents automatic prompt caching for providers such as Anthropic, not a gateway response cache.
Is Cloudflare AI Gateway free?
Its core features, including analytics, caching, and rate limiting, are free on all plans. You pay providers directly with your own keys, or pay a 5% fee on credits if you use Unified Billing. Log storage, guardrails, and Logpush can carry usage-based charges.
Can I use my own API keys with OpenRouter for free?
OpenRouter says BYOK usage is fee-free for the first $25,000 of list-price inference per month, then charges 5% of what that usage would cost on OpenRouter.
Do I need to host on Vercel to use Vercel AI Gateway?
No. Vercel's docs say you can call it from anywhere with an API key; OIDC authentication is an extra option for apps deployed on Vercel.
Verdict
For most teams, the deciding question is who holds the provider relationship. If you do, Cloudflare AI Gateway is the cheapest way to add caching, rate limits, and logs, at no cost for the core proxy. If you want the gateway to hold it and you value price, Vercel AI Gateway's zero-markup credits are the leanest one-bill option. If you want the most models and the most routing control, OpenRouter's 5.5% fee buys the biggest catalog and the finest provider controls. Prices as of October 24, 2026. Check each official pricing page before you commit, because gateway pricing has been changing fast.
Sources
https://vercel.com/docs/ai-gateway
https://vercel.com/docs/ai-gateway/pricing
https://vercel.com/docs/ai-gateway/models-and-providers
https://vercel.com/docs/ai-gateway/models-and-providers/automatic-caching
https://vercel.com/docs/ai-gateway/rate-limits
https://vercel.com/docs/ai-gateway/models-and-providers/model-fallbacks
https://vercel.com/docs/ai-gateway/observability-and-spend
https://developers.cloudflare.com/ai-gateway/
https://developers.cloudflare.com/ai-gateway/reference/pricing/
https://developers.cloudflare.com/ai-gateway/reference/limits/
https://developers.cloudflare.com/ai-gateway/features/unified-billing/
https://developers.cloudflare.com/ai-gateway/features/caching/
https://developers.cloudflare.com/ai-gateway/features/rate-limiting/
https://developers.cloudflare.com/ai-gateway/features/dynamic-routing/
https://developers.cloudflare.com/ai-gateway/configuration/bring-your-own-keys/
https://developers.cloudflare.com/ai-gateway/usage/chat-completion/
https://openrouter.ai/pricing
https://openrouter.ai/docs/guides/routing/provider-selection
https://openrouter.ai/docs/guides/routing/model-fallbacks
https://openrouter.ai/docs/guides/features/response-caching
https://openrouter.ai/docs/guides/overview/auth/byok
https://openrouter.ai/docs/guides/features/broadcast