← Index

Journal

Vercel AI Gateway vs OpenRouter: picking an AI gateway in 2026

July 23, 2026 · 5 min read · By @ici_dab

Vercel AI Gateway vs OpenRouter, an AI gateway comparison from the Ellelion Journal

If you ship on Vercel and call models from TypeScript, the AI SDK plus AI Gateway is the least work: one API, no token markup, built-in fallbacks. If you want the widest model catalog with almost no setup, OpenRouter wins. If prompts can't leave your network, self-host LiteLLM or Portkey. The AI SDK is the library, the gateway is the router. They're different jobs.

I've picked an AI provider for every product I ship, and I've changed my mind more than once. The pitch decks blur together, so this is the version with the marketing peeled off: what each option reaches, what it charges, and where I keep landing after building on them.

AI SDK, gateway, provider: three different things

People drop these names in one bucket, and it makes the choice harder than it is. The AI SDK is a TypeScript library. It's how your code calls a model, streams tokens, and runs tools. A gateway like Vercel AI Gateway or OpenRouter sits between your code and the model providers and hands you one endpoint, one bill, and automatic failover. An inference provider like Together or Groq is who runs the model on their own hardware. Groq's LPU chips push 500+ tokens a second on open models, the fastest inference on the market in 2026, and that speed sits a layer below whatever gateway you put in front of it. You can stack all three: SDK in the code, gateway for routing, provider underneath. Sort them apart and the rest of this gets simple.

Vercel AI Gateway

This is what Ellelion runs on, so I'll put the bias in the open. Vercel's AI Gateway went generally available in August 2025. It reaches 200+ models across text, image, video, and audio through one OpenAI-style endpoint, and it bills the provider's list price with no markup, including when you bring your own keys. If a provider degrades, it fails over to the same model somewhere else with no downtime. Usage, spend, requests, and time-to-first-token all land in one dashboard at the team, key, and project level. If you already deploy on Vercel and call models from the AI SDK, standing it up is close to zero work.

Introducing the Vercel AI Gateway
The Vercel AI Gateway: one endpoint, 200+ models, provider fallbacks. Image: Vercel.

The trade is that the routing stays simple on purpose. You get provider failover and cost-aware model selection, not weighted load-balancing across ten keys or per-request budget policies. For a solo builder that ceiling is high enough that I've never hit it. A platform team routing millions of calls with strict cost rules would.

OpenRouter

OpenRouter is the one to beat on raw breadth. It fronts 400+ models from 70+ providers behind an OpenAI-compatible API, and it's the fastest place to start when all you want is a key and a lot of models to try. It doesn't mark up tokens either. The cost shows up elsewhere: buying credits with a card carries a 5.5 percent fee (5 percent for crypto), and bring-your-own-key usage is free up to 25,000 dollars of list-price inference a month, then 5 percent after that. It also runs a free tier, 25+ models at 50 requests a day, which is enough to kick the tires on a model before you wire it in. For most solo builders those fees are rounding error. If model selection is your whole reason for wanting a gateway, OpenRouter is hard to argue against.

The self-hosted lane: LiteLLM and Portkey

Managed gateways stop making sense the moment compliance or internal networking takes the wheel. LiteLLM is an open-source proxy with 40,000+ GitHub stars that speaks the OpenAI format to 100+ providers and runs on your own boxes. Portkey aims at enterprises that want observability, guardrails, and the option to self-host. You give up the zero-setup convenience and get control over where traffic goes and who can see it. If a security review is going to ask where your prompts travel, this is the lane you want.

The four, at a glance

TypeModelsToken markupMain costBest for
Vercel AI GatewayManaged200+NoneProvider list price; credits or BYOKYou're on Vercel and the AI SDK
OpenRouterManaged400+None5.5% card credit fee; 5% BYOK over $25k/moWidest catalog, least setup
LiteLLMSelf-hosted (OSS)100+ providersNoneYour own infraCompliance, full control
PortkeyManaged or self-hostManyPlan-basedSubscriptionEnterprise observability + guardrails
Figures as reported by each vendor and third-party guides, mid-2026. Pricing moves fast, so check the current numbers before you commit.

How I choose, in practice

The rule I use across nine products is boring. If I'm shipping on Vercel and writing TypeScript, I reach for the AI SDK and let the Gateway route, because the setup cost is near zero and the bill matches provider pricing. If Vercel didn't carry a model I needed, I'd point the same AI SDK code at OpenRouter and keep moving, no rewrite. If a client needed prompts to never leave their network, I'd stand up LiteLLM. None of these is a religion. The AI SDK is provider-agnostic on purpose, so swapping the gateway underneath is a config change, not a migration, and that alone takes most of the risk out of picking wrong today.

Sources

  1. Vercel: AI Gateway
  2. Vercel Docs: AI Gateway pricing (no markup)
  3. Vercel Docs: AI Gateway Bring Your Own Key (BYOK)
  4. Vercel Changelog: AI Gateway is now generally available (August 2025)
  5. OpenRouter: models directory (400+ models, 70+ providers)
  6. OpenRouter: pricing and fees
  7. LiteLLM: open-source LLM proxy
  8. LiteLLM (BerriAI) on GitHub: 100+ providers, OpenAI-compatible
  9. Portkey: AI gateway for enterprises
  10. Groq: LPU inference performance (500+ tokens/sec on open models)

Common questions

Is the AI SDK the same as the AI Gateway?
No. The AI SDK is a TypeScript library for calling models, streaming, and running tools inside your code. The AI Gateway is a routing service between your code and the providers. You can use the SDK with the Gateway, with OpenRouter, or with a provider directly.
Does Vercel AI Gateway add a markup?
No. Vercel charges the provider's list price with no markup, including with bring-your-own-key. You pay for credits, or your own provider keys flow through at cost, and both show up in the same billing and observability view.
What does OpenRouter cost?
OpenRouter doesn't mark up tokens. It charges 5.5 percent when you buy credits by card (5 percent for crypto), and bring-your-own-key usage is free up to 25,000 dollars of list-price inference a month, then 5 percent. Figures as reported mid-2026.
Which one is cheapest?
On raw token cost they're close, since none of them marks up provider rates. The gap is fees and setup: Vercel AI Gateway if you're already there, OpenRouter's small credit fee for the widest catalog, or self-hosted LiteLLM to cut third-party fees entirely and run your own infra.
Can I switch gateways later?
Yes, if you call models through the AI SDK or any OpenAI-compatible client. The request shape is the same, so moving between Vercel AI Gateway, OpenRouter, and a direct provider is mostly a config change rather than a rewrite.

Verified on July 23, 2026