What is BYOK in AI? Bring your own key means a platform runs your AI requests on provider accounts you own, using credentials you give it, instead of on its own accounts. Your provider — OpenAI, Anthropic, Google, a cloud — bills you directly, and your contract, negotiated rates and data agreements apply to the traffic. The platform governs the requests without buying them.
That sounds like a setting. In practice it decides who your provider's customer is, and implementations differ in ways that undo the point if you do not ask. This guide explains what BYOK changes, then gives five questions that separate one implementation from another, with what three well-known platforms document today.
What BYOK changes
| Question | Platform's accounts | Your accounts (BYOK) |
|---|---|---|
| Who is the provider's customer? | The platform | You |
| Which rates apply? | The platform's price for the model | Your contract's rate |
| Which data terms apply? | The platform's agreement with the provider | Your agreement with the provider |
| Who sees the provider invoice? | The platform | You |
| What happens if the platform goes away? | Your inference stops | Your provider accounts still work |
| Who holds the provider relationship and volume history? | The platform | You |
For a hobby project the left column is often simpler: one account, one balance, every model. For a company with negotiated rates, committed spend with a cloud, data processing agreements or a procurement process, the right column is usually required. It is also the basis of an AI control plane that governs traffic without sitting in the money flow.
Five questions to ask any BYOK platform
1. What happens when my key fails?
This is the question that matters most, because a fallback to the platform's own capacity means a request you meant to run under your contract runs under theirs.
- OpenRouter: by default, if all your keys hit a rate limit or fail, OpenRouter falls back to its shared endpoints; a per-key setting, "Never use shared capacity", turns that off1.
- Vercel AI Gateway: if a request with your credentials fails, it retries with its system credentials, and that fallback usage is billed against your credits balance; with zero data retention on, the fallback is limited to ZDR-eligible system credentials2.
- Cloudflare AI Gateway: keys are stored in Secrets Store, and a provider authorization header sent on the request takes precedence over the stored key3.
None of these behaviours is wrong; a fallback improves availability. But if you chose BYOK for data terms or contract reasons, you need to know whether the fallback exists and how to turn it off.
2. Do budgets and limits see BYOK spend?
A spend limit that cannot see your own-key traffic does not limit it.
- Vercel: spend through your own credentials "isn't counted in budgets" and "a budget can't be used to cap BYOK spend"2.
- OpenRouter: by default BYOK spend does not count toward guardrail or workspace budgets; an "Include BYOK spend" setting includes it1.
- Cloudflare: spend limits apply to BYOK requests for models with known pricing4.
3. What does BYOK cost?
Pricing models differ. OpenRouter charges a fee of 5% of what the same usage would cost on OpenRouter, after a monthly allowance measured in list-price inference cost1. Vercel makes BYOK available on its paid tier and requires purchased AI Gateway credits2. Other platforms charge a subscription with no fee on model spend. Work out what each structure costs at your volume, including any fallback usage billed on top.
4. How are keys stored, scoped and rotated?
The platform now holds a credential to your provider account. Ask:
- Is the key encrypted at rest, and is it ever returned by an API or shown in a console after it is saved?
- Can it be limited to one project, environment or workload?
- Can you hold several keys per provider and rotate one while the others serve?
- Is every key change in an audit log?
On your side, give the platform an inference-only key, never an organization admin key; least privilege for provider admin keys and BYOK credential architecture go into detail.
5. How do I leave?
Because the provider accounts are yours, leaving should mean pointing your applications back at the provider or another gateway. Check that the platform's API is a standard shape (OpenAI-compatible, or the provider's own), that your request and cost history can be exported, and that nothing in your code depends on platform-only fields you cannot remove in an afternoon. Avoiding LLM vendor lock-in covers the wider question.
Setting up BYOK safely
Whichever platform you choose, the work on your side is the same:
- Create a dedicated key per platform and environment. Never reuse the key your own services use, so revoking the platform's access does not break anything else, and usage reports separate the two.
- Scope it. Use the provider's own controls: an OpenAI project key limited to the project the platform serves, an Anthropic key in a dedicated workspace, a Google Cloud project used only for that traffic. Give it inference permissions only.
- Set a ceiling at the provider too. OpenAI and Anthropic both let you set spend limits on the organization, project or workspace. A provider-side limit is the backstop if the platform's own limits fail or are misconfigured.
- Record the arrangement. Note which platform holds which key, who created it, and when it should be rotated. The audit question "who can call our OpenAI account?" should have a written answer.
- Rehearse revocation. Revoke and replace the key once before you depend on it, and time how long the platform takes to pick up the new one.
BYOK is a mechanism, not the product
Holding your keys is the easy part. What makes a BYOK platform useful is what it does with the traffic: routing and failover across your accounts, access policy, budgets that refuse before the provider is called, cost estimates at your own rates, attribution and an audit trail. Judge a BYOK platform on those, and on its answers to the five questions above.
How INFRO answers the five questions
INFRO runs only on provider accounts you connect; it holds no provider accounts of its own and charges a software subscription with 0% markup on model spend. Failure: failover moves only between your own connections, in the order your route sets; when none can serve a request it fails with an error naming each attempt. Budgets: every request is on your keys, so budgets at organization, project, member and key level see all of it, checked before the provider is called. Cost: a plan subscription; nothing is priced per token. Keys: each provider key is sealed on arrival and never shown again; applications use INFRO gateway keys that can be limited to chosen providers, environments or IP ranges and rotated with an overlap window, and changes are in the audit log. Exit: the API is OpenAI-compatible, your provider accounts keep working without INFRO, and request and cost history can be exported.
Summary
BYOK means your provider is billing you, under your terms. Before you rely on it, find out what a platform does when your key fails, whether its budgets see your own-key spend, what it charges for BYOK, how it holds your keys, and how you would leave.
