What is BYOK in AI? Bring your own key, explained for buyers
BYOK means you put your own AI provider key into a tool and the provider bills you directly. What a key is, who charges for what, the security questions to ask, and when the extra setup pays off.
MagizAI Team7 min read
BYOK in AI means bring your own key. Instead of paying a software tool for the AI inside it, you create an API key with an AI provider such as OpenAI, Anthropic or Google, paste it into the tool, and the provider bills you directly for what the tool uses. The tool still charges for its own software.
The same letters mean something else in cloud security, where BYOK is about supplying your own encryption keys. This guide is about AI keys: what they are, how the money splits, what to ask before you hand one over, and when the arrangement is worth it.
What an API key is
An API key is a long secret string that a provider gives you in its developer console. Every request sent with that key counts against your account and lands on your bill. OpenAI's production best practices say its API uses keys for authentication, and tell you not to expose them in code or public repositories. It also recommends giving project keys an expiry date and rotating them on a schedule.
Think of a key as a password that is tied to your card. Whoever holds it can run up your bill until you revoke it. Google's Gemini API key page adds a rule that matters for websites: never put a key in client-side code, because users can pull it out of a web or mobile app. Calls should go through a server.
Who pays what with BYOK
With BYOK you get two bills. The AI provider charges for usage, measured in tokens, which are small pieces of text. The tool charges for everything around the model: the chat window or editor, storage, integrations, seats for your team and support.
Providers list prices per million tokens, with input (what is sent to the model) and output (what it writes back) priced separately. The model you choose can change the bill a great deal. On OpenAI's pricing page, checked on 13 October 2026, output from its flagship models costs between $0.50 and $50 per million tokens at standard, short-context rates. Anthropic's pricing page, checked the same day, lists Claude Haiku 5.5 at $0.50 per million output tokens for prompts up to 100,000 tokens, and Claude Fable 5.1 at $50. OpenAI's guide puts 1,000 tokens at roughly 750 words.
So BYOK is not automatically cheap. What it gives you is a clear view: you see the real AI cost, you pick the model, and you can check whether the tool adds anything on top. Vercel's AI Gateway documentation, for example, says requests made with your own credentials carry no added markup.
What a BYOK tool still charges for
Bringing a key takes AI usage off the tool's bill. It does not remove the bill. Expect to pay the tool for:
- The software you actually use: the chat window, inbox, editor or workflow builder.
- Seats, if the tool prices per person.
- Limits that have nothing to do with AI, such as the number of bots or projects, storage, contacts or channels.
- Add-ons, such as removing the tool's branding.
Check which plans allow your own key, and whether the price changes when you use one. The words to look for on a plan table are "own key", "API key" and "custom LLM".
Which AI tools offer BYOK?
BYOK AI tools fall into two broad groups. Developer gateways are the clearest case: Vercel AI Gateway and Cloudflare AI Gateway both sit between your code and several AI providers and accept your provider keys. Cloudflare's documentation, updated on 22 September 2026, describes storing those keys in its Secrets Store, with easier rotation and budget limits.
Business tools offer it too, website chatbots among them, either as a plan of its own or as a setting. If a tool you already use runs on a well-known model, look in its settings for a field called API key, own key or AI provider.
Security questions to ask before you paste a key
- Where is the key stored, and who can read it? It should be encrypted at rest and never shown in full again once saved. Ask whether the vendor's staff can see it.
- Does the key ever reach a browser? It should only be used from the tool's servers, which is exactly what Google's guidance asks of anyone building with a Gemini key.
- Can I give this tool a key of its own? Anthropic lets you scope a key to a single workspace, and OpenAI has project keys. A key that only one tool uses can be revoked without breaking anything else.
- Can I cap the spend? OpenAI offers spend alerts and hard spend limits that stop API traffic once the limit is reached. Anthropic's Console lets you set a monthly spend limit and alerts for each workspace. Google's billing page offers project spend caps for the Gemini API, marked experimental, and warns that overages can run for around ten minutes.
- Which data terms come with my key? This one catches people out. Google's Gemini API terms, effective 23 March 2026, say content sent through unpaid services, such as the free quota, is used to improve Google's products and may be read by human reviewers, while paid use is not used that way. Users in the European Economic Area, Switzerland and the UK get the paid-service data terms either way. OpenAI's data controls page says API data is not used to train its models unless you opt in, and abuse-monitoring logs are kept for up to 30 days by default. Anthropic's commercial terms say it may not train models on customer content from its services.
- What happens when my key fails? Some tools quietly switch to their own credentials. Vercel's BYOK documentation says a failed request is retried with its system credentials, and that this usage is billed against your credits balance. Know which way your tool goes.
- Can I remove the key at any time? Deleting it from the tool and revoking it at the provider should each take a minute.
When BYOK is worth it
- You already have an account, credits or a contract with a provider, with data terms your business has approved.
- You want to choose the model yourself: a small one for routine answers, a stronger one for harder work.
- Your volume would hit a plan's message cap, and you would rather pay per token than upgrade.
- You want the AI cost on its own line, so you know exactly what it is.
When it is not
- You want one bill and no provider console to look after.
- Your volume is small enough that a plan with AI included covers it easily.
- Your only key is on a free tier whose data terms you would not accept for customer conversations.
- Nobody on your team will set a spend limit, watch usage or rotate the key.
Where MagizAI's BYOK plan fits
MagizAI is an AI chatbot and live chat for websites and WhatsApp, and one of its plans is built around your own key. You add a key from Anthropic Claude, OpenAI, Google Gemini, DeepSeek, Moonshot Kimi, Groq, Mistral or OpenRouter, and you pay that provider directly. There is no message cap from us on that plan, but your provider's own rate limits and billing still apply.
The key is encrypted before it is stored, only its last four characters are ever shown back, and you can remove it from your settings. On this plan, replies only ever use keys you added. If one provider's key stops working, the chatbot can move to another provider you have added a key for, never to a key of ours. The BYOK chatbot page explains the plan, the provider help article shows where the key goes, and the plans are on the pricing page.