How we compared them

One question decides this list: can you hand someone a key that stops spending at a number you set? For each gateway we checked its own docs and pricing pages on October 25, 2026, for:

  • Budget per key: a dollar limit on one API key, not only on a team, project or gateway
  • Enforcement: whether the request that crosses the budget is blocked or still runs
  • Key expiry: whether a key can end on its own
  • Hosting: whether you run it or the vendor does
  • Price: what it costs to start

We make Keylayer, built for exactly this question, so it's listed first.

The 7 gateways at a glance

GatewayBudget per keyKey expiryHostingPrice to start
KeylayerHard or estimated, per UTC hour, day, week or month1 minute to 365 daysHostedFree; Pro $19 a month
Vercel AI GatewaySoft cap, resets daily, weekly, monthly or never7 days to 1 year, or neverHostedNo markup on tokens
OpenRouterCredit limit, resets daily, weekly, monthly or neverOptional dateHosted5.5% fee on credits
LiteLLMmax_budget per budget_durationOptional durationSelf-hostedFree, open source
PortkeyEnterprise and select Pro plans; no reset, weekly or monthlyOptional dateHosted or open sourceFree tier; $49 a month
Cloudflare AI GatewayNo, budgets per gatewayOptional token TTLHostedCore features free
HeliconeNo, limits set by a request headerNot documentedHosted or self-hostedFree tier; $79 a month

The 7 gateways, one by one

1. Keylayer

A hosted relay for the provider keys you already have: OpenAI, Anthropic, Google Gemini, Groq, Mistral, OpenRouter, ElevenLabs, Hugging Face, Replicate, Resend and GitHub. You add a key to a passkey-locked vault and mint keys from it, each with spend caps per UTC hour, day, week or month, request caps, rate limits, expiry and IP, method and path rules, all listed in the limits docs. A hard cap reserves each request's worst case before it goes out, so the request that would cross the cap gets 403 budget_exceeded. Pick it if you hand keys to apps, agents or teammates and want each one to stop at a number you set, with nothing to run.

2. Vercel AI Gateway

The closest match on per-key budgets. A budget can sit on a team, a project, one API key or a team member, and refresh daily, weekly, monthly or never. Vercel calls it "a soft cap, not a hard limit": the check runs at the start of each request, so the request that crosses the limit still completes. Keys can expire after 7 days to a year, and tokens come at the provider's list price with no markup. Pick it if you deploy on Vercel and a soft cap is enough.

3. OpenRouter

One API and one credit balance for 500+ models from 80+ providers. Each API key can carry its own credit limit in dollars, reset daily, weekly or monthly at midnight UTC, and an optional expiry date. OpenRouter charges a fee when you buy credits, 5.5% on Standard and 8% on Business, and you can bring your own provider keys. Pick it for one bill across many models. To keep your own provider accounts, Keylayer fits better, and it can sit in front of an OpenRouter key too, with estimated caps.

4. LiteLLM

The open-source default. Its proxy gives virtual keys a max_budget with a budget_duration, rpm and tpm limits, parallel request limits and an optional expiry, and reserves the estimated cost before sending. It also routes, load-balances and falls back across 100+ LLMs. You run it with Postgres, and with Redis once you have more than one instance. Pick it for full control and routing; there's more in Keylayer vs LiteLLM.

5. Portkey

Portkey's gateway sets budget limits on API keys in dollars or tokens, with no reset or a weekly or monthly one, plus request or token rate limits per minute, hour or day. Its docs say budget limits are "Available on Enterprise plan and select Pro customers." The free tier records 10,000 logs a month, Production costs $49 a month, and the gateway itself is open source. Pick it if you want its logging and your plan includes budgets.

6. Cloudflare AI Gateway

Core features such as analytics, caching and rate limiting are free. Spend limits are budgets per gateway, up to 20 rules each, split by model, provider or custom metadata such as a user or team ID, or by the signed-in user when the gateway sits behind Cloudflare Access. Its tokens are account-scoped: any token with the Run permission can reach every gateway in the account. Pick it if you're on Cloudflare and a budget per gateway, user or metadata value is enough.

7. Helicone

An LLM observability platform with an open-source AI gateway for routing and monitoring. Its cost limits come from a Helicone-RateLimit-Policy header your code sends, counted in cents per time window, across all requests, per user or per custom property. Because the policy rides on each request, it limits your app's users rather than capping a key. Mintlify acquired Helicone in March 2026 and said it would run in maintenance mode, and Helicone's site now says it is no longer part of Mintlify. It's free for 10,000 requests a month, and Pro is $79 a month. Pick it if you want request monitoring across providers and limits per user of your app.

Questions

Which LLM gateways can set a budget per API key?

Keylayer, Vercel AI Gateway, OpenRouter, LiteLLM and Portkey. Cloudflare AI Gateway budgets per gateway, split by model, provider or metadata, and Helicone limits cost through a header your code sends.

What's the difference between a hard and a soft budget?

A hard budget blocks the request that would cross it. A soft budget checks at the start of each request, so the request that crosses the limit still completes and spend can end up over. Keylayer's hard caps reserve each request's worst case before it goes out, while Vercel documents its budgets as soft caps.

Which gateways run without a server of my own?

Keylayer, Vercel AI Gateway, OpenRouter, Portkey, Cloudflare AI Gateway and Helicone all offer a hosted service. LiteLLM is self-hosted.

Do LLM gateways add a markup on tokens?

Keylayer doesn't: your provider bills you directly and Keylayer charges only its plan, as with a self-hosted LiteLLM. Vercel adds no markup either, OpenRouter charges 5.5% on credit purchases, or 8% on Business, and Cloudflare charges a 5% fee on credits bought through Unified Billing.

How current is this comparison?

We checked every vendor fact against that vendor's own docs and pricing pages on October 25, 2026, and left out anything they don't document.