---
type: analysis
slug: guide-model-gateways-openrouter-litellm-vercel-ai-gateway
title: "Model gateways: OpenRouter, LiteLLM, Vercel AI Gateway"
description: "Model gateways unify many LLM providers behind one OpenAI-compatible API with routing, fallbacks, budgets/keys, and usage logs. OpenRouter is a hosted multi-provider API (600+ models / 80+ providers on paid plans) that passes through provider list prices and charges a platform fee on credit purchase"
published_at: 2026-11-17T09:00:00.000Z
topics: ["tools","developer_tools"]
source_urls: ["https://openrouter.ai/docs/faq","https://openrouter.ai/docs/guides/routing/provider-selection","https://openrouter.ai/docs/guides/routing/model-fallbacks","https://openrouter.ai/docs/guides/overview/auth/byok","https://docs.litellm.ai/docs/proxy/quick_start","https://docs.litellm.ai/docs/proxy/virtual_keys","https://docs.litellm.ai/docs/proxy/reliability","https://docs.litellm.ai/docs/proxy/users","https://vercel.com/docs/ai-gateway","https://openrouter.ai/pricing","https://vercel.com/docs/ai-gateway/pricing","https://docs.litellm.ai/docs/enterprise","https://portkey.ai/pricing","https://developers.cloudflare.com/ai-gateway/reference/pricing/","https://openrouter.ai/docs","https://developers.cloudflare.com/ai-gateway/get-started/","https://vercel.com/ai-gateway","https://developers.cloudflare.com/ai-gateway/features/","https://portkey.ai/docs/product/ai-gateway"]
author: "Andrey Reshetnikov"
author_profile: https://newruntime.com/owner-profile.md
---
Model gateways unify many LLM providers behind one OpenAI-compatible API with routing, fallbacks, budgets/keys, and usage logs. OpenRouter is a hosted multi-provider API (600+ models / 80+ providers on paid plans) that passes through provider list prices and charges a platform fee on credit purchases (5.5% Standard, 8% Business), with BYOK ($25k/mo list-price allowance then 5%). LiteLLM is primarily a self-hosted open-source AI Gateway/proxy (plus Python SDK) for 100+ providers with virtual keys, budgets/rate limits, spend tracking, and failover; Enterprise adds SSO/audit logs via a license (custom usage pricing). Vercel AI Gateway is a managed gateway (usable off-Vercel) with zero token markup including BYOK, provider/model failover, budgets, and request logs. Alternatives: Portkey (hosted gateway + OSS self-host; Production $49/mo for 100k logs) and Cloudflare AI Gateway (core analytics/caching/rate limiting free; Unified Billing adds 5% on credit purchases). A gateway is worth it when you need multi-provider uptime, central keys/budgets, or one invoice—less so for a single stable provider with existing contracts.

*Field guide compiled 2026-11-06 from the official documentation, pricing pages and changelogs linked below; every line links to the page that states it.*

## What it does

- **OpenRouter — OpenAI-compatible unified API.** Implements the OpenAI API for /responses, /chat/completions, and /completions; also lists /api/v1/models. Drop-in via OpenAI SDK with base URL https://openrouter.ai/api/v1. How: Create credits + API key; send Bearer token. Optional HTTP-Referer / X-OpenRouter-Title for app rankings. [source](https://openrouter.ai/docs/faq)
- **OpenRouter — Provider Routing.** Default routing picks providers by effective price, throughput, TTFT, rate limits, reliability, and quality. Request body provider object supports order, allowfallbacks (default true), sort (price|throughput|latency), only/ignore, zdr, datacollection, maxprice, etc. Shortcuts :nitro (throughput) and :floor (price). How: Pass provider={order:..., allowfallbacks, sort} on Responses/Chat Completions, or append :nitro/:floor to the model slug. [source](https://openrouter.ai/docs/guides/routing/provider-selection)
- **OpenRouter — Model Fallbacks.** models array tries model IDs in order on errors (including rate limits, downtime, moderation, context validation). Pricing uses the model that ultimately answered. Anthropic Messages path uses fallbacks (max 3 entries). How: Send models:primary, backup, ... (or OpenAI SDK extrabody.models / Anthropic fallbacks). [source](https://openrouter.ai/docs/guides/routing/model-fallbacks)
- **OpenRouter — BYOK (Bring Your Own Keys).** Encrypted provider keys with Prioritized vs Fallback sections; BYOK fee is 5% of list-price inference above a plan allowance. Pay-as-you-go includes $25,000/month with no BYOK fee (Enterprise custom). Shared-capacity fallback modes control whether OpenRouter credits can cover failures. How: Add keys in workspace BYOK settings; optional provider.order; manage via BYOK management API. [source](https://openrouter.ai/docs/guides/overview/auth/byok)
- **LiteLLM — open-source AI Gateway / Proxy.** One gateway for 100+ LLM providers in OpenAI ChatCompletions & Completions format; also MCP tools and A2A agents. Proxy manages authentication, spend tracking & budgets via Virtual Keys, and load balancing (docs cite 1.5k+ req/s in load tests). How: Install litellmproxy; run litellm --model ... or litellm --config config.yaml (default http://0.0.0.0:4000). [source](https://docs.litellm.ai/docs/proxy/quick_start)
- **LiteLLM — Virtual Keys + spend tracking.** With Postgres + masterkey, /key/generate creates virtual keys that can restrict models, track spend per key/user/team, support aliases, block/unblock, and (Enterprise) key rotation. How: Set DATABASEURL and generalsettings.masterkey; call /key/generate; apps send Authorization: Bearer sk-... [source](https://docs.litellm.ai/docs/proxy/virtual_keys)
- **LiteLLM — Fallbacks (Provider Failover).** Automatic failover between modelname groups after retries: fallbacks (general errors), contentpolicyfallbacks, and contextwindowfallbacks. Supports defaultfallbacks, cooldowns, and disablefallbacks per request/key. How: Set routersettings.fallbacks or litellmsettings.fallbacks in config.yaml; optionally contentpolicyfallbacks / contextwindowfallbacks. [source](https://docs.litellm.ai/docs/proxy/reliability)
- **LiteLLM — Budgets & rate limits.** maxbudget + budgetduration on global proxy, teams, team members, internal users, and virtual keys; also tpmlimit / rpmlimit / maxparallelrequests. Budgets require a connected Postgres DB (DB-less deployments do not enforce them). How: Configure litellmsettings.maxbudget or set maxbudget/budgetduration on /team/new, /user/new, /key/generate. [source](https://docs.litellm.ai/docs/proxy/users)
- **Vercel AI Gateway — managed multi-provider controls.** One managed gateway for centralized credentials (system or BYOK), request logging (model/provider/latency/tokens/cost/routing attempts), spending controls (budgets for team/project/API key/member), and provider failover with ordered provider/model fallbacks. Works from any server—not only Vercel. Zero markup on provider token prices, including BYOK. How: Call https://ai-gateway.vercel.sh/v1/chat/completions with AIGATEWAYAPIKEY (or OIDC on Vercel). Configure models, budgets, BYOK in dashboard. [source](https://vercel.com/docs/ai-gateway)

## Modes

- **OpenRouter hosted API.** Hosted multi-provider endpoint; credits or BYOK. EU/US in-region hosts on Business/Enterprise (eu.openrouter.ai / us.openrouter.ai). [source](https://openrouter.ai/docs)
- **LiteLLM self-hosted Proxy + Python SDK.** Run proxy locally/in VPC (OpenAI-compatible HTTP) or call completion() in-process. Enterprise is a license key on the same image—not a separate hosted product. [source](https://docs.litellm.ai/docs/enterprise)
- **Vercel AI Gateway managed.** Hosted gateway callable from any infrastructure with API key; Vercel deployments can use OIDC instead. System credentials or BYOK. [source](https://vercel.com/docs/ai-gateway)
- **Cloudflare AI Gateway.** Cloudflare-account gateway: Unified Billing credits, BYOK stored keys, or pass provider keys in request headers. OpenAI-compatible path /ai/v1/chat/completions and provider-specific gateway.ai.cloudflare.com routes. [source](https://developers.cloudflare.com/ai-gateway/get-started/)

## Pricing and limits

- **OpenRouter Standard (pay-as-you-go):** Platform fee 5.5% when purchasing credits; inference at provider list price (no markup). Pricing FAQ: fee charged on credit purchases, never on individual requests.. 600+ models, 80+ providers; BYOK $25,000 list-price inference/month with no fees then 5%; rate limits passthrough from providers; 5 workspaces; credit card/crypto payment options. [source](https://openrouter.ai/pricing)
- **OpenRouter Business (pay-as-you-go):** Platform fee 8% on credit purchases; inference at provider list price (no markup).. Same model catalog as Standard; EU/US in-region routing; advanced notifications; workspace limit 1,000; same BYOK $25k then 5%. [source](https://openrouter.ai/pricing)
- **Vercel AI Gateway add-ons:** Custom Reporting: USD $0.075 / 1,000 tag/user ID/quota entity ID writes; USD $5 / 1,000 reporting-endpoint queries. Team-wide provider allowlist: USD $0.10 per 1,000 successful requests (Pro/Enterp.... Per-request only filter and per-request ZDR: no additional cost. BYOK: no markup/fee; requires purchased credits. [source](https://vercel.com/docs/ai-gateway/pricing)
- **LiteLLM Enterprise:** Usage-based; contact for quote. Free 30-day trial with full license. SSO free for up to 5 users; beyond that Enterprise license required.. SSO/SCIM, audit logs, org/team admins, secret managers, IP allowlists, multi-region, support SLAs; same gateway image + LITELLMLICENSE. [source](https://docs.litellm.ai/docs/enterprise)
- **Portkey Production:** USD $49/month; +USD $9 overages per additional 100k requests.. 100k recorded logs/month; retention 30 days logs / 90 days metrics; RBAC; unlimited prompt templates; LLM & Partner Guardrails. [source](https://portkey.ai/pricing)
- **Cloudflare AI Gateway:** Core features (dashboard analytics, caching, rate limiting) free on all plans. Unified Billing: 5% fee on credits purchased (e.g. $100 credits → $105 charge); provider inference passed through with.... Legacy Logs storage: Workers Free 100,000 logs total across gateways; Workers Paid 10,000,000 logs per gateway. DLP scanning free (limited predefined profiles without Zero Trust DLP). [source](https://developers.cloudflare.com/ai-gateway/reference/pricing/)

## Recent changes

- 2026-11-05: Vercel AI Gateway marketing changelog: Gemini Omni 1.2 Flash now available on AI Gateway. [source](https://vercel.com/ai-gateway)
- 2026-11-04: Vercel AI Gateway marketing changelog: Kimi K3.1 Pro now has more ZDR providers on AI Gateway. [source](https://vercel.com/ai-gateway)
- 2026-11-03: Vercel AI Gateway marketing changelog: Tencent Hy4 now available on AI Gateway. [source](https://vercel.com/ai-gateway)
- 2026-11-04: Cloudflare AI Gateway Features docs last updated (Caching, Spend Limits, Auto Router, Guardrails, DLP, BYOK, etc.). [source](https://developers.cloudflare.com/ai-gateway/features/)
- 2026-11-02: Cloudflare AI Gateway Pricing docs last updated (Workers Logs cutoff Sep 24, 2026; Unified Billing 5% credit fee). [source](https://developers.cloudflare.com/ai-gateway/reference/pricing/)

## Alternatives

- **Portkey AI Gateway.** Hosted/OSS gateway featuring Universal API, Fallbacks, Load Balancing, Retries, Cache (Simple & Semantic), Budget Limits, Rate Limits, Circuit Breaker, Conditional Routing. Monetizes observability logs (Free 10k/mo; Production $49/mo + $9/100k) rather than token markup. [source](https://portkey.ai/docs/product/ai-gateway)
- **Cloudflare AI Gateway.** Edge gateway with Caching, Spend Limits, Rate Limiting, Auto Router, Dynamic Routing/fallbacks, Guardrails, DLP, Authentication, BYOK (20+ providers), Analytics/Logging. Core analytics/caching/rate limiting free; Unified Billing adds 5% credit-purchase fee. [source](https://developers.cloudflare.com/ai-gateway/features/)

## Traps

- OpenRouter does not mark up inference; the fee is on credit purchases (5.5% Standard / 8% Business). Failed/fallback attempts that error are not charged for model tokens (you pay the successful run). [source](https://openrouter.ai/pricing)
- OpenRouter BYOK: above the $25k/mo (Standard/Business) list-price allowance, a 5% fee is deducted from OpenRouter credits. BYOK does not bypass account datacollection/ZDR policies unless you declare ZDR on the key. [source](https://openrouter.ai/docs/guides/overview/auth/byok)
- OpenRouter FAQ: credit purchase fee is 5.5% with USD $0.80 minimum (crypto 5%); unused credits may expire after one year; unused-credit refunds only within 24 hours (platform fees non-refundable; crypto never refundable). [source](https://openrouter.ai/docs/faq)
- LiteLLM budgets/virtual keys require Postgres (DATABASEURL). Without a DB, maxbudget fails open and virtual keys cannot be resolved. [source](https://docs.litellm.ai/docs/proxy/users)
- Vercel AI Gateway: BYOK needs purchased Credits (paid tier). Budgets cover system-credential spend only—BYOK spend does not count toward those budget limits; configure provider-side controls too. [source](https://vercel.com/docs/ai-gateway/pricing)
- Vercel free tier uses a subset of models and lower rate limits; first paid credit purchase ends the monthly free credit. [source](https://vercel.com/docs/ai-gateway/pricing)
- Cloudflare Guardrails are billed as Workers AI token inference on @cf/meta/llama-guard-3-8b. Unified Billing credits are credit-card only. [source](https://developers.cloudflare.com/ai-gateway/reference/pricing/)
- LiteLLM Proxy quick start: litellm 1.84.0+ needs Python ≥3.10; bare pip on older Python can silently resolve to 1.83.9. [source](https://docs.litellm.ai/docs/proxy/quick_start)

Author: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Tools](https://newruntime.com/topics/tools.md): Explore the tools topic hub.
- topic hub: [Developer Tools](https://newruntime.com/topics/developer-tools.md): Explore the developer_tools topic hub.
- collection: [Analysis](https://newruntime.com/analysis.json): Open the latest authorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
