If your AI app talks to more than one model provider, you already know the pain: each provider has its own API shape, auth, and billing. An AI gateway gives you one integration point across all of them, but not every gateway gives you the same level of production tooling.
This guide compares Vercel AI Gateway and OpenRouter on routing, pricing, observability, and developer experience so you can pick the right fit for production.
Copy link to headingWhat is an AI gateway?
An AI gateway is the layer between your app and the model providers it calls. Instead of wiring up each provider separately with its own auth, error handling, and usage tracking, you route everything through one control plane. It tracks token usage, routes requests to specific providers, handles retries and fallbacks when a provider goes down, and gives you one dashboard for spend and latency across the board.
An AI gateway differs from a standard API proxy in scope. A proxy handles HTTP-level concerns like authentication, caching, and traffic control. A gateway adds model-aware behavior on top: token tracking, provider-aware failover, and streaming normalization for outbound AI calls.
Copy link to headingWhat is Vercel AI Gateway?
Vercel AI Gateway routes your AI requests to multiple providers through a single endpoint, with native integration into the AI SDK. These are its core features:
Copy link to headingMulti-provider routing
You set a priority list of providers per request, and the gateway works through them in order. If the first provider is down or slow, the request falls back to the next one automatically. The routing docs cover how provider priority and fallback behavior work in detail.
Copy link to headingBuilt-in observability
The observability dashboard shows request activity, token usage, and spend across every provider you're routing to, tied to your Vercel projects. You can see the cost per feature or per deployment without wiring up a separate monitoring tool.
Copy link to headingFluid compute architecture
The gateway runs on Fluid compute, which means it scales with your traffic and only charges for Active CPU time. No capacity planning, no reserved instances. Requests pass through Vercel's Global Network, so the gateway adds no extra infrastructure hops to your existing deployment.
Copy link to headingAI SDK integration
The @ai-sdk/gateway package wires gateway access into the AI SDK directly. Provider ordering, fallback rules, and model selection all live in the same streamText or generateText call your app already uses. If you're already on the AI SDK, adding gateway routing is a package install and a config change.
Copy link to headingWhat is OpenRouter?
OpenRouter is a managed API that gives you access to models from multiple providers through a single endpoint, using an OpenAI-compatible API format. These are its key features.
Copy link to headingBroad model catalog
OpenRouter aggregates models across providers and model families behind one endpoint. The broad catalog is useful when you're evaluating models across different providers and comparing outputs before committing to a specific set.
Vercel AI Gateway takes a different approach with a curated provider set where every model is integrated into your routing and observability setup from the start.
Copy link to headingOpenAI-compatible API
OpenRouter uses an OpenAI-compatible API format, so existing OpenAI integration code can point to OpenRouter without changes. Provider-specific features and parameters work within the scope of what the compatibility layer exposes.
Copy link to headingCommunity SDK support
OpenRouter works with the AI SDK through community packages like @openrouter/ai-sdk-provider. These are community-maintained rather than official AI SDK providers, so update timelines depend on package maintainers rather than Vercel's release cycle.
Copy link to headingModel evaluation
Swapping models on OpenRouter means changing a string in your API call, which makes it a practical tool for comparing model behavior early in a project. When you move from evaluation to production, Vercel AI Gateway adds provider ordering, failover, and per-deployment observability on top of your routing layer.
Copy link to headingKey differences between Vercel AI Gateway and OpenRouter
Here's how the two compare across the most relevant dimensions for production AI workloads.
The sections below cover each difference in detail.
Copy link to headingModel access and provider support
Vercel AI Gateway integrates every supported model into your routing and observability setup, so there's no extra wiring between the gateway and the rest of your stack. Once you've committed to a provider set, that integration depth pays off in fewer moving parts.
OpenRouter's strength is the range of models available through one endpoint, which is valuable during the evaluation phase when you're testing across providers. Once you've locked in your provider set, tighter platform integration around those choices means less to wire up and maintain in production.
Copy link to headingRouting and fallbacks
With Vercel AI Gateway, provider ordering lives in your application code, version-controlled and testable alongside your generation logic:
import { streamText } from 'ai';
const result = streamText({ model: 'anthropic/claude-sonnet-5', prompt: 'Explain the tradeoffs of server-side rendering', providerOptions: { gateway: { order: ['vertex', 'bedrock', 'anthropic'], }, },});OpenRouter handles routing through its own managed layer, with configuration that lives outside your codebase. If you want routing decisions tied to specific deployments and visible in code review, the in-code approach is a better fit.
Copy link to headingPricing and cost structure
Vercel AI Gateway passes through provider pricing at cost with zero markup, and supports BYOK (bring your own key) at no additional fee, so you pay providers directly at their list price.
OpenRouter also charges provider list prices per token, but adds a 5.5% fee when you purchase credits ($0.80 minimum per transaction), and BYOK requests beyond 1 million per month incur a 5% fee. These fees cover the managed routing layer and model access.
Copy link to headingObservability and logging
Vercel AI Gateway ships a native dashboard that links token usage, latency, and spend to your Vercel projects out of the box, per project and per deployment, without a custom monitoring pipeline.
OpenRouter focuses on model access rather than deployment-level observability. If you need to track spend per feature or per deployment, you'd typically wire up third-party monitoring alongside it.
Copy link to headingIntegration and developer experience
Vercel AI Gateway integrates through a first-party SDK package. Routing config lives alongside your generation calls, updates ship with the SDK, and breaking changes are documented in the same release cycle.
OpenRouter integrates through OpenAI-compatible tooling and community SDK packages. The community-driven approach offers flexibility, though SDK updates are maintained by package authors rather than Vercel's engineering team.
Copy link to headingWhen to choose Vercel AI Gateway
Vercel AI Gateway is the right choice when you're building AI features you plan to ship and maintain in production. It fits best when:
Deploying on Vercel: Routing, auth, and usage tracking live in the same stack as your deployments
Building with the AI SDK: Gateway access plugs directly into your existing
streamTextandgenerateTextcallsTracking cost per project: Native observability ties token usage and spend to specific project deployments
Moving to production: Provider ordering and failover are version-controlled in your application code
Building with Next.js: Deployment, runtime, and gateway management connect inside one platform
If you want your AI infrastructure integrated with your deployment platform rather than managed as a separate system, Vercel AI Gateway is the more direct path.
Copy link to headingWhen to choose OpenRouter
OpenRouter fits use cases where catalog breadth is the priority:
Early model evaluation: Compare outputs across a wide range of models through one endpoint
Quick prototyping: Point existing OpenAI-compatible integration code at OpenRouter without changes
Exploration-stage projects: Add observability, routing control, and first-party SDK support later as requirements firm up
Once you're past the evaluation phase, Vercel AI Gateway keeps routing config, cost tracking, and SDK integration in the same stack as your deployments.
Copy link to headingBuild AI features on Vercel AI Gateway
Vercel AI Gateway connects multi-provider routing, native observability, and first-party SDK integration to your deployment platform. If you're shipping AI features to real users, keeping routing and cost tracking in the same stack as your deployments means fewer tools to maintain and fewer things to break.
If you're ready to try it, start a new project on Vercel and connect AI Gateway with the @ai-sdk/gateway package. There are also AI templates with gateway routing pre-configured if you want to see how it works before wiring it into your own app.
Copy link to headingFrequently asked questions about Vercel AI Gateway and OpenRouter
Copy link to headingCan you use OpenRouter with the Vercel AI SDK?
Yes. OpenRouter integrates with the AI SDK through community packages like @openrouter/ai-sdk-provider and through OpenAI-compatible configuration. These are community-maintained, so update timelines depend on the package authors.
Copy link to headingDoes Vercel AI Gateway charge a markup on model costs?
No. Vercel AI Gateway passes through provider list pricing with zero markup, and BYOK (bring your own key) is supported for direct provider billing at no additional fee.
Copy link to headingCan you self-host Vercel AI Gateway or OpenRouter?
Neither is designed for self-hosting. Both are managed services. If you need residency, isolation, or on-premise deployment, check each product's documentation for current deployment options.
Copy link to headingWhat is the difference between an AI gateway and an API proxy?
An AI gateway routes requests to model providers with token tracking, provider-aware failover, and streaming normalization built in. A traditional API proxy handles HTTP-level concerns like authentication, caching, and traffic control, but has no awareness of model calls or token consumption.