LLM gateways
LLM gateways compared: fees, BYOK and self-hosting
An LLM gateway (or AI gateway) puts many model providers behind one API. OpenRouter adds a 5.5% platform fee, Cloudflare 5% on Unified Billing credits and Vercel no markup at all, while LiteLLM is free to self-host under the MIT license. The real differences are who runs the gateway and how you pay for tokens.
- OpenRouter fee
- 5.5%, or 8% on Business
- Cloudflare credits fee
- 5% on Unified Billing
- Vercel AI Gateway
- No markup, no platform fee
- LiteLLM
- MIT license, free to self-host
Updated
What an LLM gateway does
An LLM gateway, also called an AI gateway or LLM proxy, is one API endpoint that sits in front of many model providers.
- Your application calls one OpenAI-compatible API instead of maintaining separate SDKs for each provider.
- The gateway handles provider keys, using either your own keys (BYOK) or the gateway's prepaid credits.
- It routes requests across providers and triggers automatic fallbacks when a provider errors out.
- You can turn on response caching and enforce rate limits at the gateway layer.
- Platform teams get request logs, usage analytics and spend budgets in one place.
Gateways handle token billing in two ways: BYOK, where the model provider bills your account directly, or gateway credits, where the gateway pays the provider and may add its own fee.
LLM gateways compared
Pricing below was checked on October 29, 2026 on each vendor's own pricing page.
- LiteLLM costs nothing beyond your own servers because the gateway is MIT-licensed and self-hosted.
- Vercel AI Gateway charges no markup or platform fee, and Cloudflare adds 5% only when you buy its Unified Billing credits.
- OpenRouter has the widest hosted catalog, with 500+ models across 80+ providers, and takes a 5.5% platform fee.
| Gateway | Runs where | What it charges | Provider keys | Free option |
|---|---|---|---|---|
| OpenRouter | Hosted | 5.5% platform fee, 8% on Business | BYOK free to $25,000 a month, then 5% | Free plan with free models |
| LiteLLM | Self-hosted, MIT license | Free; Enterprise priced on request | Your own provider keys | Open-source gateway, free forever |
| Portkey | Hosted, or self-host the MIT gateway | Production plan $49 a month | Your own keys or Model Catalog | Developer plan, 10k logs a month |
| Cloudflare AI Gateway | Hosted on Cloudflare | Core free; 5% fee on Unified Billing credits | Your keys or Cloudflare credits | Analytics, caching, rate limiting |
| Vercel AI Gateway | Hosted on Vercel | List price, no markup or platform fee | BYOK with no fee | Monthly free credits, some models |
| Helicone | Hosted; Apache-2.0 code | Pro $79 a month, Team $799 a month | BYOK, or credits at 0% markup | Hobby, 10,000 requests a month |
| Plan2API | Hosted | $0, $12 or $29 a month, no per-token fees | Your Claude, ChatGPT, Google AI or Kimi plan | Free plan, 50 requests a day |
Hosted or self-hosted
If you self-host, LiteLLM runs in your own cloud or fully air-gapped, sends no telemetry to LiteLLM, and sends prompts only to the model providers you configure. Portkey's MIT-licensed gateway also runs on your own infrastructure with npx @portkey-ai/gateway or Docker, and the trade-off with either option is that you have to operate, scale and upgrade the servers yourself.
Hosted gateways like OpenRouter, Cloudflare AI Gateway, Vercel AI Gateway, Helicone and Portkey's cloud need no servers to manage, but every prompt passes through the vendor's infrastructure. Vercel AI Gateway does not log prompts or responses and records only request metadata (such as status, model, provider, token usage, cost and duration), while OpenRouter always stores request metadata and stores prompts and responses only if you opt in to prompt logging or to OpenRouter's use of your inputs and outputs, or if content is flagged as potential CSAM.
What each gateway costs
- OpenRouter: The Free plan has no platform fee, covers the free models and does not include BYOK; Standard pay-as-you-go charges a 5.5% platform fee, Business charges 8%, Enterprise offers fee discounts, and BYOK is free up to $25,000 a month of list-price inference, then 5% deducted from OpenRouter credits.
- LiteLLM: The open-source MIT gateway is free to self-host, while Enterprise adds SSO, SCIM, JWT auth, RBAC, audit logs and support through a dedicated Slack or Teams channel with custom SLAs, priced on request with an enterprise trial available.
- Portkey: The Developer plan is free with 10k recorded logs a month and 3-day log retention; the Production plan is $49 a month with 100k recorded logs, $9 per extra 100k requests and 30-day log retention; Enterprise has custom pricing.
- Cloudflare AI Gateway: Core features (dashboard analytics, caching, rate limiting) are free on every Cloudflare plan, accounts whose first gateway was created before September 24, 2026 get 100,000 logs in total on Workers Free and 10,000,000 logs per gateway on Workers Paid (newer accounts use Workers Logs pricing), and Unified Billing adds a 5% fee on purchased credits so $100 of credits costs $105.
- Vercel AI Gateway: Tokens are billed at the provider's list price with no markup or platform fee on credits or BYOK, every team starts on a free tier with monthly free credits on a subset of models at lower rate limits, buying credits moves the team to the paid tier and ends that monthly credit, and purchased credits expire after one year.
- Helicone: Hobby is free with 10,000 requests a month, 1 seat and 7-day retention; Pro is $79 a month plus usage over the included requests, unlimited seats and 1-month retention; Team is $799 a month with 3-month retention, SOC 2 and HIPAA; Enterprise has custom pricing with on-prem deployment, and Helicone credits run at 0% markup.
How to choose an LLM gateway
- If you want one API key and one bill across 500+ models from 80+ providers (plus 16 free models listed in its models API on October 29, 2026), use OpenRouter.
- If you want to pay provider list prices with zero platform fee or markup, use Vercel AI Gateway.
- If your stack already runs on Cloudflare, use Cloudflare AI Gateway, where caching, rate limiting and analytics are free.
- If you have to self-host or run air-gapped with hard spend caps per virtual key, team and model, use LiteLLM.
- If your main priority is request logs, observability and key management on a hosted platform, look at Portkey or Helicone.
A gateway backed by your AI subscriptions
The gateways above bill tokens through provider API keys or prepaid gateway credits. Plan2API belongs to a different category, subscription-to-API tools: it is a hosted gateway with one OpenAI-compatible endpoint (https://api.plan2api.com/v1) that serves models from AI subscriptions you already pay for (Claude Pro or Max, ChatGPT plans through Codex, Google AI Pro or Ultra through Antigravity, and Kimi memberships through Kimi Code) for a flat $0, $12 or $29 a month, and never bills per token.
Plan2API serves the OpenAI Chat Completions format at POST /v1/chat/completions (along with GET /v1/models and image endpoints on paid plans), with no /v1/responses, no Anthropic /v1/messages, no /v1/completions and no /v1/embeddings. Every request counts against your connected subscription's own usage limits, and when every connected account runs out of quota, the API returns HTTP 429 with subscription_quota_exhausted and a Retry-After header. If you already run LiteLLM, it can sit in front of Plan2API as an OpenAI-compatible endpoint by using the openai/ model prefix and setting api_base to https://api.plan2api.com/v1.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.plan2api.com/v1",
api_key=os.environ["PLAN2API_KEY"],
)
reply = client.chat.completions.create(
model="claude/claude-sonnet-5",
messages=[{"role": "user", "content": "Explain what an LLM gateway does in two sentences."}],
)
print(reply.choices[0].message.content)Use the AI subscriptions you already pay for as one OpenAI-compatible API key.
- Free: 1 subscription, 50 requests a day, no card
- Pro: $12 a month
FAQ
What is an LLM gateway?
An LLM gateway is a single API endpoint in front of many model providers that handles provider keys, request routing, fallbacks, caching, logs and spend limits. OpenRouter, LiteLLM, Portkey, Cloudflare AI Gateway, Vercel AI Gateway and Helicone are all LLM gateways.
Is an AI gateway the same as an LLM gateway?
Yes. LiteLLM's FAQ says an AI gateway is also called an LLM gateway or LLM proxy, and Cloudflare and Vercel both name their products AI Gateway.
What is the best free LLM gateway?
LiteLLM is the best free option if you can host it yourself, since the gateway is MIT-licensed and free forever. If you want a hosted free tier, Cloudflare AI Gateway's core features are free, Portkey's Developer plan includes 10k logs a month, Helicone's Hobby plan includes 10,000 requests a month, and Vercel AI Gateway gives every team monthly free credits on a subset of models.
Does OpenRouter charge a markup?
No, OpenRouter passes provider inference prices through with no markup. Instead, it charges a 5.5% platform fee on Standard pay-as-you-go and 8% on Business, while BYOK is free for the first $25,000 a month of list-price inference and 5% after that.
Can I self-host an AI gateway?
Yes. LiteLLM can be self-hosted in your own cloud or air-gapped with no telemetry, Portkey's MIT-licensed gateway runs with npx @portkey-ai/gateway or Docker, and Helicone's codebase is open source under the Apache-2.0 license.
Can I use my ChatGPT or Claude subscription through an LLM gateway?
Not directly with gateways that need provider API keys or their own credits, such as OpenRouter or Vercel AI Gateway. Vercel does let you use API credits claimed through eligible ChatGPT or Claude subscriptions via BYOK, but that spends the API credit grant in your provider account rather than your plan's own usage limits, and BYOK on Vercel still requires purchased AI Gateway Credits. Plan2API lets you route requests through your existing Claude Pro or Max, ChatGPT (via Codex), Google AI Pro or Ultra (via Antigravity) and Kimi subscriptions behind one OpenAI-compatible API for a flat $0 to $29 a month.
Sources
- OpenRouter pricingopenrouter.ai
- OpenRouter data collectionopenrouter.ai
- Cloudflare AI Gateway pricingdevelopers.cloudflare.com
- Cloudflare AI Gateway Unified Billingdevelopers.cloudflare.com
- Vercel AI Gateway pricingvercel.com
- Portkey pricingportkey.ai
- Helicone pricinghelicone.ai
- LiteLLMlitellm.ai