Contents

Disclosure: StackScout may earn a commission if you purchase through links on this page. This does not affect our evaluations.

AI Tools · Infrastructure Comparison

Vercel AI Gateway vs. Cloudflare AI Gateway vs. OpenRouter (2026): Which LLM Gateway Should You Actually Use?

If your team calls more than one LLM provider in production, you've already run into the problem an AI gateway is built to solve: every provider has its own SDK, its own outage schedule, and its own habit of deprecating a model with a few weeks' notice. Vercel AI Gateway, Cloudflare AI Gateway, and OpenRouter all promise one API key for hundreds of models — but they take three genuinely different approaches to pricing, failover, and who's on the hook when a provider goes down. We checked all three against vendor documentation and independent benchmarks in August 2026, not marketing copy.

Abstract illustration of three glowing blue and emerald light paths converging into a single hexagonal gateway node and fanning back out to a grid of server and model icons, representing a unified AI model gateway routing requests across multiple providers

TL;DR: The Short Answer

Vercel

Best if you're already building on Vercel or the AI SDK: Vercel AI Gateway. Zero markup on tokens — even with your own provider keys — automatic cross-provider retries, and spend monitoring in the same dashboard as your deployments. The tradeoff: a Vercel Function calling it inherits Vercel's own execution-duration limits unless you add Vercel Workflows.

Cloudflare

Best if you're already on Cloudflare, or want caching built in: Cloudflare AI Gateway. The only one of the three with free response caching and DLP scanning, plus optional Unified Billing that puts third-party model spend on one Cloudflare invoice for a flat 5% surcharge.

OpenRouter

Best for catalog breadth and zero platform lock-in: OpenRouter. 500+ models across dozens of providers, including a genuinely free tier — but credit purchases carry a 5.5% (Stripe, $0.80 minimum) or 5% (crypto) fee, and BYOK only waives that fee for the first 1 million requests a month.

Quick Comparison

CriteriaVercel AI GatewayCloudflare AI GatewayOpenRouter
Pricing modelZero markup on tokens, incl. BYOK; pay provider list priceCore gateway free; Unified Billing adds 5% fee on credit purchasesProvider price + 5.5% (Stripe) / 5% (crypto) credit-purchase fee
Free tierModel subset, lower rate limits, until you buy creditsFull core features free on every plan50 free-model requests/day (1,000/day with $10+ balance)
BYOK feeNone, any tier (paid tier required to enable BYOK)No distinct BYOK fee layerFree for first 1M requests/mo, then 5%
Model catalogHundreds of models, major frontier + open-weight providersOpenAI, Anthropic, Google AI Studio, Groq, Mistral, Cohere, Perplexity, DeepSeek, Cerebras, xAI, Workers AI, Bedrock, Azure OpenAI, Replicate500+ models across dozens of providers, incl. free tier
FailoverAutomatic retry to another provider on failureDynamic Routing — configured explicitly, not automaticAutomatic fallback to next provider on error
Response cachingNot a built-in featureBuilt-in edge cachingNot a built-in feature
ObservabilitySpend/cost/latency/token data via dashboard or REST APIDashboard analytics + logs (100K/mo free, 10M/mo paid)Usage dashboard, per-key analytics
CompliancePer-request ZDR free; team-wide ZDR $0.10/1,000 requests (Pro/Enterprise)DLP scanning free (2 predefined profiles without Zero Trust)No gateway-level ZDR; provider-dependent
Best fitTeams on Vercel/AI SDK wanting one bill, no markupTeams on Cloudflare wanting caching + one invoiceTeams wanting the widest catalog, provider-agnostic by design

Figures sourced from each vendor's own documentation as of August 2026 — see References & Sources at the end of this article.

What an AI Gateway Actually Buys You in 2026

An AI gateway sits between your application and the LLM providers you call — OpenAI, Anthropic, Google, and increasingly a long tail of open-weight models served by Groq, Together, Fireworks, and others. Instead of your codebase holding a different SDK, API key, and error-handling path for each provider, you call one endpoint and the gateway handles routing, retries, and — to varying degrees — caching and spend tracking.

This has become harder to ignore in 2026 than it was two years ago, for three reasons that come up in nearly every infrastructure conversation about model usage: provider outages are still common enough that single-provider apps see real downtime; frontier models get deprecated or repriced with only a few weeks' notice, so hardcoding one model into your application logic turns into a recurring migration project; and production LLM usage has shifted from single chat-completion calls toward multi-step agents that call tools, chain models for different steps of a task, and sometimes talk to an MCP server mid-run — see our roundup of the best MCP servers for B2B workflows if you're wiring up that layer on top of whichever gateway you choose. A gateway doesn't fix any of those problems by itself, but it gives you one place to configure fallback behavior, one bill to reconcile, and one dashboard to check when something breaks at 2 a.m.

Illustration of a single glowing green key connected by light blue lines to a cluster of generic geometric shapes, representing one API key unlocking access to many AI models through a gateway

Vercel AI Gateway: Pricing, Features, and Limits

Zero markup, incl. BYOK Hundreds of models Auto cross-provider retry

Vercel AI Gateway is built into the same dashboard developers already use to manage deployments, and its core pricing pitch is unusually simple: no markup and no platform fee on tokens, on the free tier or the paid tier, and even when you bring your own provider key (BYOK). You pay the provider's own list price; Vercel's revenue comes from the surrounding platform, not a spread on inference.

The free tier gives every team access to a subset of models with lower, per-model rate limits — enough to prototype, not enough to run production traffic at scale. Purchasing AI Gateway Credits moves your team to the paid tier, which unlocks the full model catalog and higher rate limits. BYOK is paid-tier only: if a request using your own key fails, AI Gateway automatically retries it with Vercel's system credentials for reliability, and that fallback usage draws from your credit balance.

Beyond raw pricing, the feature set is clearly aimed at teams already inside the Vercel ecosystem: one API key across hundreds of models, OpenAI Chat Completions and Anthropic Messages API compatibility (so existing SDK code often needs minimal changes), automatic retries to a different provider on failure, embeddings support, and per-generation cost, latency, and token data available from the dashboard or a GET /v1/generation REST call. Compliance-minded teams on Pro or Enterprise plans get Zero Data Retention (ZDR) routing at no extra charge per request, or for $0.10 per 1,000 requests if they want it enforced team-wide across every call automatically — worth knowing if your legal team is working through something like an EU AI Act compliance checklist for B2B SaaS buyers.

One practical limit worth flagging before committing a long-running agent architecture to Vercel AI Gateway: if you're calling it from a Vercel Function, that function inherits Vercel's own execution-duration ceiling — 300 seconds by default, extendable to 800 seconds (generally available) or 1,800 seconds (beta) on Pro and Enterprise. That covers most chat and RAG workloads comfortably, but a genuinely long multi-hour agent run needs Vercel Workflows layered on top, not a single function call.

Already shipping on Vercel and the AI SDK?

One key, zero markup on tokens, and spend monitoring in the same dashboard as your deployments.

Cloudflare AI Gateway: Pricing, Features, and Limits

Free core gateway Built-in caching Widest named-provider list

Cloudflare takes a different starting position: the core gateway — dashboard analytics, response caching, and rate limiting — is free on every Cloudflare plan, including the free Workers plan, with no separate per-call gateway fee. What you pay for is everything layered around it. Persistent request logs are capped at 100,000 per month across all your gateways on the free Workers plan, rising to 10 million per gateway on Workers Paid; Logpush volume beyond the included 10 million requests a month on Workers Paid costs $0.05 per million.

The bigger pricing decision is whether to turn on Unified Billing, which lets you pay for third-party model usage — OpenAI, Anthropic, and the rest of Cloudflare's supported provider list — directly through your existing Cloudflare invoice instead of managing separate billing relationships with each provider. It's a convenience feature, priced as one: a flat 5% surcharge on credits purchased through Unified Billing, with the underlying provider inference pricing passed through unmarked-up.

On features, Cloudflare's provider list is the widest of the three on paper — OpenAI, Anthropic, Google AI Studio, Groq, Mistral, Cohere, Perplexity, DeepSeek, Cerebras, xAI, Workers AI, plus AWS Bedrock, Azure OpenAI, and Replicate — reflecting its position as a neutral network layer rather than a model vendor. Cross-provider failover exists via Dynamic Routing, but unlike Vercel's or OpenRouter's default-on automatic retry, you configure the fallback rules yourself. Guardrails (content-safety filtering) and DLP scanning are both free features, though Guardrails bills separately as Workers AI token-based inference based on prompt and response length, and DLP without a Zero Trust subscription is limited to two predefined profiles (Financial Information, and Social/Insurance/National Identifier Numbers).

The other structural difference is latency positioning: Cloudflare AI Gateway runs as a proxy across Cloudflare's edge network — more than 330 locations globally — rather than inside a specific serverless runtime. Community-reported overhead for the proxy hop itself is small, generally in the 10–60ms range depending on how close your traffic originates to a Cloudflare point of presence, though most public benchmarks measure this against a mock upstream rather than a live model response, which tends to overstate how much the gateway itself matters once real provider latency of 500ms–3 seconds is added in.

Standardizing model spend onto one Cloudflare invoice?

Free caching, rate limiting, and DLP scanning, with optional Unified Billing for a flat 5% fee on credits.

OpenRouter: Pricing, Features, and Limits

500+ models Free prototyping tier 5.5%/5% credit fee

OpenRouter is structured less like a platform feature and more like a marketplace: it resells access to model inference from dozens of providers, and its business model is a fee on the credits you buy rather than a fee baked into the platform itself. Add funds by card through Stripe and OpenRouter takes 5.5% of the purchase (a $0.80 minimum applies, which is why a small $5 top-up effectively costs 16% in fees, not 5.5%); pay with cryptocurrency through Coinbase and the fee drops to 5%. Once credits are in your account, you spend them at the provider's own per-token rate.

Bring Your Own Key changes that math only partially: OpenRouter waives its fee on the first 1 million BYOK requests per month, then charges 5% of what the same model and provider would normally cost on everything after that. If you're already spending enough to justify BYOK on another gateway, it's worth modeling whether your traffic actually clears that 1-million-request line before assuming OpenRouter's BYOK path is free in practice.

Where OpenRouter clearly leads is catalog breadth: 500+ models across dozens of providers, including a rotating lineup of free models — as of mid-2026, drawn from providers like Meta, Google, NVIDIA, Alibaba's Qwen, Cohere, and Poolside — that let you prototype without a credit card. Free-model rate limits step up based on account status: 50 requests a day with no credits purchased, 1,000 a day once you've added at least $10, and OpenRouter is upfront that these aren't meant for production traffic. Automatic fallback is on by default — if a provider errors out, OpenRouter routes to the next one transparently — and "latest" model aliases let you point at a flagship model without redeploying code every time a provider ships a new version.

One nuance shows up in independent latency testing: OpenRouter's architecture holds the first response byte until the first token is actually ready, so its time-to-first-byte and time-to-first-token are identical on every request — it doesn't stream headers early the way some other gateways do. In one small, single-location benchmark (n=5 runs — not a large statistical sample), OpenRouter's median cold time-to-first-token came in close to Vercel AI Gateway's (1,123ms vs. 1,099ms) but noticeably behind on warm requests (986ms vs. 822ms). Treat any single latency benchmark as directional rather than definitive — provider mix, region, and time of day all move these numbers by hundreds of milliseconds — but it's a reasonable data point if raw speed matters more to your use case than catalog breadth.

Need the widest model catalog without picking a platform side?

500+ models, a genuine free tier, and automatic fallback across providers.

Feature-by-Feature Breakdown

Pricing and the Real Cost of "Zero Markup"

All three vendors advertise pass-through, no-markup pricing on the model calls themselves, and on that specific claim, all three are telling the truth — the per-token rate you pay for, say, a GPT or Claude model is generally the provider's own list price regardless of which gateway you route through. Where the real cost differences show up is in the fee layered on top of getting money into the system. Vercel charges nothing extra on credits at any tier. Cloudflare only charges if you opt into Unified Billing (5% on credit purchases) — skip it, and you're paying providers directly with no Cloudflare fee at all. OpenRouter's fee is the least avoidable of the three: it applies to every credit purchase (5.5% via Stripe, 5% via crypto) unless you're on the BYOK path and staying under 1 million requests a month. For a team spending roughly $2,000/month on inference, that's about $110/month in OpenRouter fees that a Vercel setup or a fee-free Cloudflare setup wouldn't charge — worth modeling explicitly rather than assuming "no markup" means "no total cost for the gateway."

Model Catalog Breadth

If breadth is the deciding factor, OpenRouter's 500+ models across dozens of providers is the largest catalog of the three, and the one most likely to already carry a niche open-weight model the day it ships. Cloudflare's named-provider list (OpenAI, Anthropic, Google AI Studio, Groq, Mistral, Cohere, Perplexity, DeepSeek, Cerebras, xAI, Workers AI, Bedrock, Azure OpenAI, Replicate) is close behind in providers, though Cloudflare doesn't publish a comparable total model count. Vercel's catalog runs to "hundreds of models" from mainstream frontier and open-weight providers — narrower in raw count than OpenRouter, but every model in it carries the same zero-markup pricing guarantee, which matters more than raw catalog size to some buyers.

Failover and Latency

Illustration of a blue network path with a broken connection automatically rerouted through a curved green backup path, representing automatic failover between AI model providers

Failover behavior differs in an easy-to-miss way: Vercel and OpenRouter both retry to another provider automatically, out of the box, when a request fails. Cloudflare's Dynamic Routing does the same job but isn't automatic by default — you configure which providers back each other up. That's more setup work, but it also means Cloudflare won't silently reroute a request somewhere you didn't explicitly approve, which some security-conscious teams treat as a feature rather than friction. On raw speed, don't expect a clean, permanent winner: the one independent benchmark we found comparing Vercel and OpenRouter directly (see Methodology) showed Vercel modestly ahead on warm requests and roughly tied cold, in a small sample from a single test location; Cloudflare's edge-proxy overhead is reported separately, in the 10–60ms range, and isn't a like-for-like comparison with the other two. Provider response time — not gateway overhead — remains the dominant factor in end-to-end latency for all three.

Observability, Caching, and Compliance

Abstract illustration of translucent glowing blue and green dashboard panels with bar and line chart shapes, representing spend monitoring and observability for AI gateway usage

Vercel and Cloudflare both give you first-party observability without extra setup — Vercel's dashboard shows per-generation cost, latency, and token counts; Cloudflare's shows request-level analytics and logs, with the free plan capped at 100,000 stored logs a month. OpenRouter's dashboard is comparatively lighter on per-request detail, focused on usage and spend by API key. Cloudflare is alone in offering response caching as a built-in gateway feature — useful if your traffic has any repeated-prompt pattern worth short-circuiting before it reaches the model provider at all. On compliance, Vercel's ZDR routing (free per-request, $0.10/1,000 requests team-wide, Pro/Enterprise) is the most explicit of the three about which providers have contractually agreed not to retain or train on your prompts; Cloudflare's DLP scanning catches sensitive data patterns in requests rather than controlling provider-side retention; OpenRouter doesn't offer a gateway-level ZDR control, leaving data-retention terms to whatever underlying provider you're routed to has agreed to. If AI vendor risk is a live topic in your board updates, it's worth reading this alongside a broader look at AI governance platforms built for the EU AI Act era, since gateway-level ZDR is one control among several a governance review will typically ask about.

Pros and Cons

Vercel AI Gateway

Pros

  • Zero markup on tokens, including with BYOK, on every tier
  • Automatic cross-provider retries with no extra configuration
  • Per-generation cost, latency, and token data in the same dashboard as your deployments
  • ZDR routing available per request at no extra charge (Pro/Enterprise)

Cons

  • Free tier limited to a model subset with lower rate limits
  • BYOK requires the paid tier
  • Calling it from a Vercel Function inherits Vercel's own duration limits unless you add Workflows
  • Most natural fit is inside the Vercel ecosystem specifically

Cloudflare AI Gateway

Pros

  • Core gateway (analytics, caching, rate limiting) free on every plan
  • Only one of the three with built-in response caching
  • Widest named-provider list, including Workers AI, Bedrock, and Azure OpenAI
  • Free DLP scanning and optional single-invoice billing

Cons

  • Cross-provider failover (Dynamic Routing) must be configured, not automatic by default
  • Unified Billing adds a flat 5% surcharge on credit purchases
  • Free-plan log retention capped at 100,000 entries/month across all gateways
  • Feels like extra infrastructure if you're not already on Cloudflare

OpenRouter

Pros

  • Largest model catalog of the three (500+ models)
  • Genuine free tier for prototyping, no credit card required
  • Automatic fallback to the next provider on error, on by default
  • No platform lock-in — works the same whether you deploy on Vercel, Cloudflare, AWS, or anywhere else

Cons

  • 5.5% (Stripe) or 5% (crypto) fee on every credit purchase, $0.80 minimum
  • BYOK only waives the fee for the first 1M requests/month
  • No built-in response caching or gateway-level ZDR control
  • Free-tier models are rate-limited and explicitly not production-grade

Who Should Choose Which

The honest answer is that all three are reasonable defaults for different starting points — the right pick usually falls out of infrastructure you've already committed to, not a feature you're missing.

Frequently Asked Questions

Which is better, Vercel AI Gateway or OpenRouter?

Neither is universally better — they optimize for different things. Vercel AI Gateway wins on pricing simplicity (zero markup, including BYOK) and is the natural choice if you're already deploying on Vercel. OpenRouter wins on catalog breadth (500+ models vs. Vercel's hundreds) and platform independence, but its 5.5%/5% credit-purchase fee makes it the more expensive of the two once you factor in total cost, not just the per-token rate.

Which AI gateway is the best?

There isn't a single best gateway in 2026 — the right one depends on what infrastructure you're already committed to and what you're optimizing for. Choose Vercel AI Gateway for the lowest total fee if you're on Vercel, Cloudflare AI Gateway if you want free caching and DLP inside an existing Cloudflare setup, and OpenRouter if catalog breadth or provider independence matters more to you than avoiding a credit-purchase fee.

Is there anything better than OpenRouter?

"Better" depends on the metric. For total cost of ownership, both Vercel AI Gateway and Cloudflare AI Gateway avoid OpenRouter's mandatory credit-purchase fee (Cloudflare only charges it if you opt into Unified Billing). For raw model-catalog size and a genuinely free prototyping tier, OpenRouter is still hard to beat among the three compared here. If you specifically need built-in response caching, Cloudflare AI Gateway is the only one of the three that offers it natively.

What are the key differences between Cloudflare AI Gateway and OpenRouter?

Cloudflare AI Gateway is free at the core (analytics, caching, rate limiting) with an optional 5% Unified Billing surcharge only if you choose to consolidate provider billing; OpenRouter charges its 5.5%/5% fee on every credit purchase by default. Cloudflare offers built-in response caching and DLP scanning that OpenRouter doesn't have; OpenRouter offers a far larger model catalog (500+ vs. Cloudflare's roughly a dozen named provider integrations) and automatic, no-configuration failover, where Cloudflare's Dynamic Routing has to be set up explicitly.

How do these three compare to LiteLLM or Portkey?

LiteLLM and Portkey solve the same routing problem but as self-hosted (or partially self-hosted) libraries and platforms rather than a vendor-run gateway — you trade the convenience of a managed endpoint for more control over where the proxy runs and what it costs at scale. If Vercel, Cloudflare, and OpenRouter all feel like the wrong shape because you need to self-host for data-residency or cost reasons at high volume, LiteLLM and Portkey are the natural next platforms to evaluate; that's a big enough topic to deserve its own dedicated comparison rather than a paragraph here.

Methodology

Pricing and feature details for all three gateways were checked directly against each vendor's own documentation in August 2026: Vercel's AI Gateway docs and pricing reference, Cloudflare's AI Gateway pricing reference, and OpenRouter's quickstart and FAQ pages. Latency figures come from a third-party, publicly published benchmark (see References) that timed DNS, TCP, TLS, time-to-first-byte, and time-to-first-token separately across interleaved requests from the same test machine; the Vercel-vs-OpenRouter figures cited here are explicitly a small sample (n=5, single location) and should be read as directional, not a guarantee of what you'll see on your own infrastructure. Cloudflare's edge-proxy overhead figures come from separate community-reported measurements rather than the same controlled benchmark, since we couldn't find a single test that measured all three gateways identically at the time of writing — a gap worth flagging rather than papering over. We didn't run our own production load test against any of the three; treat every figure here as a documented, source-checked starting point for your own evaluation, not a substitute for testing against your actual traffic pattern.

References & Sources

Ken Hayashi

Technology Consultant covering B2B SaaS infrastructure, AI tooling, and workflow automation for StackScout.

Ken Hayashi
Ken Hayashi

Technology consultant with 10+ years in the Japanese tech industry. Specializing in SaaS evaluation, workflow automation, and B2B tool integration.

Related articles

Loading…