Skip to content

Architecture and migrationComparison

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

Both OpenRouter and Vercel AI Gateway accept your own provider keys, and both can still send a request somewhere you did not intend. This comparison walks through key ownership, billing path, failover control, and logging and retention, so you can test the defaults before you pick.

By INFRO Editorial

Published

7 min read

One application request entering a central AI gateway and branching to many model routes

In short

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 3, and on Vercel AI Gateway, as INFRO read it, a failed BYOK request is retried on Vercel's credentials 2. 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.

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.

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

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:

request body (OpenRouter chat completions)
{
  "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.

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 and Vercel AI Gateway alternatives.

Questions readers ask

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.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.OpenRouter vs LiteLLM: hosted router or self-hosted gateway? (opens in a new tab) — INFRO. Accessed Nov 29, 2026.
  2. 2.Vercel AI Gateway alternatives: what to check on a BYOK gateway (opens in a new tab) — INFRO. Accessed Nov 29, 2026.
  3. 3.BYOK: bring your own provider API keys (opens in a new tab) — OpenRouter. Accessed Nov 29, 2026.
  4. 4.Input & Output Logging (opens in a new tab) — OpenRouter. Accessed Nov 29, 2026.
  5. 5.Provider Routing (opens in a new tab) — OpenRouter. Accessed Nov 29, 2026.
  6. 6.Model Fallbacks (opens in a new tab) — OpenRouter. Accessed Nov 29, 2026.
  7. 7.Zero Data Retention (opens in a new tab) — OpenRouter. Accessed Nov 29, 2026.
  8. 8.Migration guides: move your AI gateway to INFRO (opens in a new tab) — INFRO. Accessed Nov 29, 2026.
  9. 9.Failover & fallbacks (opens in a new tab) — INFRO docs. Accessed Nov 29, 2026.
  10. 10.Privacy & data (opens in a new tab) — INFRO docs. Accessed Nov 29, 2026.

About this article

OpenRouter's provider routing, BYOK, zero data retention, input and output logging and model fallbacks pages were read on 2026-11-29, along with INFRO's docs, privacy and failover pages and its migration index. Vercel's own documentation sits on a host this process cannot read, so every Vercel fact is taken from INFRO's published reading of it (migration guide read 2026-10-19, pricing re-checked 2026-11-16), labeled as such, and left out where INFRO's pages were silent.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.