# OpenRouter or Vercel AI Gateway: which fits a BYOK team?

URL: https://infro.io/blog/openrouter-or-vercel-ai-gateway-which-fits-a-byok-team
Author: INFRO Editorial (https://infro.io/blog/editorial)
Publisher: INFRO
Published: 2026-11-29
Last modified: 2026-11-29
Last reviewed: 2026-11-29 (next review due 2026-12-29)
Topic: Architecture and migration
Format: Comparison

> For a BYOK team the two differ less on features than on defaults: on OpenRouter your key is tried first but shared capacity is the default fallback [^openrouter-byok], and on Vercel AI Gateway, as INFRO read it, a failed BYOK request is retried on Vercel's credentials [^infro-vercel-alternatives]. Pick the one whose default you can switch off, then test it with your key removed.

Key takeaways:
- On OpenRouter, BYOK keys are tried first but, by default, a failing key falls back to OpenRouter's shared endpoints; a per-key setting can forbid that.
- On Vercel AI Gateway, as INFRO read Vercel's documentation, BYOK needs a purchased balance and a failed BYOK request is retried on Vercel's credentials and billed to that balance.
- The two disagree on logging: OpenRouter stores prompts only if you enable Input & Output Logging, which keeps them at least three months, while Vercel's retention terms need to be read on Vercel's own page.
- Test every candidate with your own provider key removed and watch which credential serves the request and where the charge lands.
- A gateway that runs only on your connections cannot fall back to capacity you did not authorise, but it also cannot serve a model you hold no account for.

## What a BYOK team is actually choosing between

Searches for "openrouter vs vercel ai gateway" usually come from a team that already holds contracts with OpenAI, Anthropic or Google and wants one front door without a second place where money is spent. Both products accept your own provider keys. The difference is what each does when the key is not enough.

OpenRouter is a hosted router: you call its endpoint, and it serves models through its own provider accounts or through keys you add [1]. Vercel AI Gateway is built into the Vercel platform and the AI SDK, and by INFRO's reading of Vercel's documentation, BYOK is available on its paid tier and needs a purchased balance [2]. One is a model access service that added BYOK; the other is a gateway that sits beside the framework you may already deploy on.

> **Note: Where the Vercel facts come from**
> I could not read Vercel's own pages for this piece. Vercel details below are INFRO's published reading of them, dated 2026-10-19 (migration guide) and 2026-11-16 (pricing) [2]. Re-read Vercel's BYOK, budgets and pricing pages the day you decide. OpenRouter details come from OpenRouter's documentation, read 2026-11-29.

## The side-by-side

The rows below look similar on a feature sheet but hide different switches, so the sections after the table take them one at a time.

| Question | OpenRouter | Vercel AI Gateway (as INFRO read it) |
| --- | --- | --- |
| Whose capacity serves the request | Your key first; shared OpenRouter endpoints by default if it fails [3] | Vercel's system credentials by default; your own optional on the paid tier [2] |
| Billing path | Your provider bills inference; OpenRouter charges 5% of the equivalent OpenRouter cost, from its balance, after a monthly allowance [3] | No markup on tokens, but BYOK needs a purchased balance and add-ons are priced per request [2] |
| Failed own-key request | Falls through your other keys, then shared capacity unless you forbid it [3] | Retried on Vercel's credentials and billed to your balance [2] |
| Budgets and own-key spend | BYOK spend counts toward guardrail and workspace budgets only if you switch that on [1] | BYOK spend excluded from budgets [2] |
| Prompt logging | Off until you enable Input & Output Logging (beta) [4] | Custom reporting by user and tags, trace drains to your tool [2] |

Table: Five behaviours that matter when you hold the provider contract.

## Key ownership and who spends the money

On OpenRouter your keys are split into two sections: prioritized keys, attempted before OpenRouter's own endpoints, and fallback keys, tried only after OpenRouter's endpoints have been attempted [3]. If every key in both sections hits a rate limit or fails, the default is to use shared OpenRouter endpoints, which spend OpenRouter's balance rather than your provider contract [3].

That default has four settings per prioritized key, from weakest to strongest: use shared capacity (default); never use it for the models the key applies to; never use it for any model on that provider; and never use any other provider or key for those models, in which case a request that your keys cannot serve fails with a 404 [3]. There is a subtlety with ordering. If you send `provider.order` naming a provider you hold no key for, OpenRouter's shared capacity for that provider is tried first, and your Bedrock or Vertex keys come after it [3]. A per-request `order` can therefore route around your own key.

On Vercel, the INFRO reading is that the fallback to system credentials is a feature: a rate-limited or revoked key does not stop traffic, it moves the spend to the balance you bought from Vercel, at Vercel's rate rather than your contract rate [2]. If you have a committed-spend agreement, that spend lands outside it.

Neither behaviour is a defect for a team that wants one balance and no provider accounts. It is a mismatch for a team whose finance function reconciles provider invoices.

## Billing path: what lands where

With OpenRouter BYOK, the inference line goes to your provider and a second line, 5% of what the same model and provider would cost on OpenRouter, comes out of your OpenRouter balance once you pass the monthly allowance, which is $25,000 of list-price inference cost on pay-as-you-go and custom on Enterprise [3]. Fallback traffic adds a third line, because shared capacity is paid from that same balance [3].

With Vercel, INFRO's reading is no markup or platform fee on tokens, with list-price deduction from a purchased balance, plus add-ons priced per request that apply to BYOK requests too. Examples INFRO lists: team-wide zero data retention at $0.10 per 1,000 requests, a team-wide provider allowlist at $0.10 per 1,000 billed requests, and trace drains at $0.05 per 1,000 traces plus $0.50 per GB of egress [2]. Those are Vercel's list figures as INFRO read them, not an estimate of your cost.

> **Example: Illustrative: three lines to reconcile**
> These numbers are made up to show the shape. Suppose a month has 10 million requests, 98% served on your key and 2% retried on the gateway's own capacity after a rate limit.
> 
> - Provider invoice: covers 9.8 million requests, at your contract rate.
> - Gateway fee line: whatever the gateway charges on own-key traffic.
> - Gateway balance: covers 200,000 requests, at the gateway's rate, not yours.
> 
> The point is that the 2% is invisible on the provider invoice. Ask each gateway to export it by request.

## Failover control

OpenRouter gives two levers. Provider routing: the `provider` object accepts `order`, `allow_fallbacks` (default true), `only`, `ignore`, `zdr`, `data_collection` and more, and default routing uses each provider's measured price, throughput, latency and reliability [5]. Model fallbacks: a `models` array tries the next model on any error, including context length validation errors, moderation flags, rate limits and downtime, and the request is priced by the model that finally answered [6]. The second point matters: a context-length error can silently move you to a different model.

A request that pins behaviour looks like this:

```json
{
  "model": "anthropic/claude-sonnet-4.5",
  "provider": {
    "order": ["anthropic"],
    "allow_fallbacks": false,
    "zdr": true
  },
  "messages": [{ "role": "user", "content": "ping" }]
}
```

`allow_fallbacks: false` stops provider-level fallback for the request [5]. It does not by itself change the per-key shared capacity setting, which lives in your BYOK key configuration [3].

For Vercel, the failover behaviour INFRO documents is that a failed BYOK request is retried on Vercel's credentials [2]. INFRO's guide also says to stay on Vercel if you rely on its OIDC tokens, Realtime, per-request provider sorting or per-request zero-data-retention routing, none of which INFRO offers [2].

## Logging and data retention

OpenRouter stores prompts and completions only if an admin turns on Input & Output Logging, currently in beta. Retention is a minimum of three months and may be longer at OpenRouter's discretion unless you request deletion, and the feature is skipped for requests through the regional `eu.openrouter.ai` and `us.openrouter.ai` endpoints [4]. Broadcast sends the data to your own observability tool instead [4].

Separately, OpenRouter describes every endpoint with three policy tiers: ZDR, Safety Retention and Retention and Training [7]. Safety Retention endpoints may keep any request, flagged or not, for abuse detection, and if you have not chosen, self-serve accounts allow them while enterprise accounts use ZDR only [7]. The page also carries a notice that from October 27, 2026 OpenRouter plans to screen all inference requests, ZDR included, for CSAM in flight, with flagged content retained for review [7]. ZDR enforcement covers provider routing only, not plugins and tools such as web search [7]. For the history, see [OpenRouter drops 125 endpoints from ZDR](https://infro.io/blog/openrouter-drops-125-endpoints-from-zdr-audit-your-traffic-now).

For Vercel, INFRO's pages cover custom reporting by user and tags, trace drains, and a team-wide ZDR setting [2]. They say nothing I can cite about how long Vercel keeps request content, so ask Vercel that question directly.

## How to choose, and a test before you commit

OpenRouter fits when you want the broadest model catalog, including models you hold no account for, with nothing to run, and you are willing to set per-key shared capacity rules and per-request routing options. One ownership note: INFRO's migration index records that Stripe announced on 2026-08-19 it agreed to acquire OpenRouter, with no completion notice as of 2026-10-19 [8]; check current status if supplier risk is part of your review.

Vercel fits when your app already runs on Vercel and the AI SDK, you rely on its OIDC tokens, per-request provider sorting or ZDR routing, and you accept a purchased balance as the fallback path [2].

Run the same four checks on either:

- [ ] Remove or revoke the provider key in a staging project and send a request. Which credential answered?
- [ ] Find that request in the export and in the provider invoice. Does each show it?
- [ ] Trigger a context-length error and a 429. Does the request change model or provider?
- [ ] Turn logging on, send a marked prompt, and find out where it is stored and how long it stays.

If the answers show a path you did not authorise, a gateway that runs only on your own connections is the alternative. INFRO is one: you connect your provider accounts, and INFRO routes and fails over across your connections only, so a request your keys cannot serve is refused rather than moved to anyone else's capacity [9]. It records estimated provider cost per request, applies budgets before the provider call, keeps prompt capture off by default with a retention window you choose [10], and takes 0% of model spend. It cannot serve a model you have no account for, does not speak the Vercel AI Gateway protocol, and has no price or latency sorting equivalent [8]. See also [OpenRouter vs LiteLLM](https://infro.io/blog/openrouter-vs-litellm) and [Vercel AI Gateway alternatives](https://infro.io/blog/vercel-ai-gateway-alternatives-what-to-check-on-a-byok-gateway).

## Questions

### Does Vercel AI Gateway or OpenRouter charge for using your own provider keys?

OpenRouter's BYOK page states a fee of 5% of what the same model and provider would cost on OpenRouter, deducted from your OpenRouter balance after a monthly allowance of $25,000 in list-price inference cost on pay-as-you-go [3]. For Vercel, INFRO's reading is that there is no markup on tokens but BYOK needs a purchased balance and some add-ons are charged per request [2]; confirm that on Vercel's pricing page.

### Can I stop OpenRouter from using its own capacity when my key fails?

Yes. Each prioritized BYOK key has a shared capacity fallback setting, and the stronger levels stop requests for that key's models from spending OpenRouter's balance, at the price of rate-limit errors or a 404 when your keys cannot serve the request [3].

### Which one is better for zero data retention?

OpenRouter documents per-request zdr routing and account or guardrail enforcement, with Safety Retention endpoints as a separate choice [7]. INFRO's reading of Vercel is a team-wide ZDR setting charged per request [2]. Neither setting changes what your own provider contract says, so verify the endpoint policy for the models you call.

## Sources

1. OpenRouter vs LiteLLM: hosted router or self-hosted gateway? — INFRO. https://infro.io/blog/openrouter-vs-litellm (accessed 2026-11-29)
2. Vercel AI Gateway alternatives: what to check on a BYOK gateway — INFRO. https://infro.io/blog/vercel-ai-gateway-alternatives-what-to-check-on-a-byok-gateway (accessed 2026-11-29)
3. BYOK: bring your own provider API keys — OpenRouter. https://openrouter.ai/docs/guides/overview/auth/byok (accessed 2026-11-29)
4. Input & Output Logging — OpenRouter. https://openrouter.ai/docs/guides/features/input-output-logging (accessed 2026-11-29)
5. Provider Routing — OpenRouter. https://openrouter.ai/docs/guides/routing/provider-selection (accessed 2026-11-29)
6. Model Fallbacks — OpenRouter. https://openrouter.ai/docs/guides/routing/model-fallbacks (accessed 2026-11-29)
7. Zero Data Retention — OpenRouter. https://openrouter.ai/docs/guides/features/zdr (accessed 2026-11-29)
8. Migration guides: move your AI gateway to INFRO — INFRO. https://infro.io/migrate (accessed 2026-11-29)
9. Failover & fallbacks — INFRO docs. https://infro.io/docs/features/fallbacks (accessed 2026-11-29)
10. Privacy & data — INFRO docs. https://infro.io/docs/privacy (accessed 2026-11-29)
