Vercel AI Gateway

Listed at https://vercel.com/docs/ai-gateway

Overall Rank #8 ⭐ Consider
⚠️ Proxy required (China needs VPN) | 🌍 International

💰 Token Pricing

TypePriceNote
Input 免费层: $5/月 AI Gateway Credits;付费层: 按量付费,Provider 官价零加价 per million tokens
Output Token 零加价(含 BYOK);附加功能另计 per million tokens
💡 Free Credits: $5/month free AI Gateway Credits per team (Free-Tier eligible models only)

🤖 Supported Models (200)

OpenAI GPT-4o / GPT-4o-mini / GPT-5.xAnthropic Claude Opus 4.8 / Sonnet 4Google Gemini 2.5 Pro / FlashxAI GrokMistral / MixtralCohere RerankGroq (fast inference)Embeddings + Reranking + Image + Video (Beta)

✨ Pros

  • $5/mo free credit, zero markup on tokens (incl. BYOK)
  • Native AI SDK v5/v6 integration, one-line drop-in
  • OpenAI / Anthropic / OpenResponses multi-protocol support
  • Built-in observability, cost attribution, API key budgets
  • Automatic model fallback with code-defined retry chain
  • Zero data retention (ZDR) and provider allowlist optional

⚠️ Cons

  • ×Vercel-locked ecosystem, weaker for non-Vercel deployments
  • ×Closed source, no self-hosting
  • ×No guardrails (content moderation, PII, prompt injection defense)
  • ×No prompt versioning / experiment platform
  • ×Add-on features can add up at high volume
  • ×China access requires proxy / VPN

🎯 Best For

Vercel-native teams; Next.js apps and Vercel-deployed projects; enterprises needing multi-provider routing with zero markup and BYOK

💰 Pricing & Plans

PlanCostBest For
Hobby (Free)$0Up to $5/mo AI Gateway Credits per team — covers prototype traffic
Pro ($20/mo)$20/monthVercel Pro subscribers get $5/mo AI Gateway Credits bundled with deploy quota
Pay-as-you-goProvider list rates, zero markupAfter free credits exhausted; tokens billed at OpenAI/Anthropic/Google list price
BYOK (Bring Your Own Key)Provider API costs onlyUse existing OpenAI/Anthropic keys; Vercel adds observability + routing for free
Team / EnterpriseCustom contractVolume commitments, SSO, dedicated support, custom data retention

🔧 API & Developer Experience

  • API Style: OpenAI-compatible /v1/chat/completions + native Anthropic + OpenResponses — Vercel AI SDK routes through the gateway transparently; no SDK migration needed for existing OpenAI/Anthropic codebases.
  • Base URL: https://ai-gateway.vercel.sh/v1 (single unified endpoint) — every supported provider/model is reachable from the same URL via the `model` parameter.
  • SDK Compatibility: AI SDK v5/v6 (TypeScript-native, drop-in for Next.js + Vercel functions). Also compatible with raw OpenAI Python/Node SDKs by swapping base_url + api_key.
  • Model Selection: 200+ models from OpenAI, Anthropic, Google, xAI, Mistral, Cohere, Groq, plus embeddings, rerankers, image+video (Beta). Switch models via `provider/model` strings without code changes.
  • Streaming & Function Calling: SSE token streaming on every model; native tool calling passthrough for OpenAI/Anthropic schemas; structured outputs supported where the upstream provider supports them.
  • Observability & Cost Attribution: Built-in Vercel dashboard — per-request token counts, latency, cost in USD, model/provider breakdown, error rates. Per-API-key and per-user cost attribution for team billing.
  • Fallback & Routing: Code-defined fallback chains (e.g. primary OpenAI → fallback Anthropic on rate-limit); provider allowlist and Zero Data Retention (ZDR) flag for regulated workloads.

🔀 Unified Provider Routing

Vercel AI Gateway's defining product feature is unified provider routing — a single base_url that fans out to 200+ models across OpenAI, Anthropic, Google, xAI, Mistral, Cohere, and Groq, with the same OpenAI SDK call signature regardless of upstream provider. For Next.js / Vercel deployments, this collapses a multi-provider integration into one line of code (the AI SDK's `streamText({ model: 'anthropic/claude-sonnet-4' })`), with Vercel handling credential isolation, retry logic, and observability for every call. The practical effect is dramatic: teams that previously maintained separate SDK clients, separate API keys, separate rate-limit handling, and separate observability pipelines per provider can now route everything through the gateway and pay only the upstream provider's list price (zero markup). The trade-off is Vercel-locked — non-Vercel deployments lose the bundle-with-deploy-quota advantage and the unified dashboard, although the underlying OpenAI-compatible endpoint still works anywhere.

🌐 Regional Availability & Latency

Vercel AI Gateway (ai-gateway.vercel.sh) is hosted on Vercel's global edge network, but access from mainland China is restricted — Chinese IPs are typically blocked at the network edge, similar to api.vercel.com itself. From a US/EU client, latency to the gateway is 100-300ms for first-token streaming on standard models, comparable to direct calls to OpenAI/Anthropic from the same region. The gateway adds a thin routing layer (typically <50ms overhead) over upstream provider calls, so end-to-end latency is roughly (gateway edge latency) + (upstream provider latency). For production workloads serving China-based users, the standard pattern is to either route through a Vercel-deployable proxy in a non-China region, or fall back to a domestic provider (Bailian, DeepSeek, Zhipu) for China traffic and the Vercel Gateway for global traffic. Vercel does not currently offer a CN-specific edge node for the gateway.