Bring your own AI key for email: how it works
What bring your own key means for AI in a mail app: how to get a key, how you are billed, where your email text goes and where the key is kept.
Sanjeev Maharjan5 min read

Bring your own key (BYOK) means the mail app has no AI service of its own. You create an API key with an AI provider such as Anthropic, OpenAI, Google or xAI, paste it into the app, and the app sends the text of an email to that provider when you ask for a summary or a reply. The provider bills you for what you use.
The short version: get an API key from the provider's developer console, set up billing there, paste the key into your mail app and check where the app stores it. The email text goes to the provider you chose, so read its data terms and keep sensitive senders out of AI altogether.
What bring your own key means
A mail app can offer AI in two ways. Either the app maker holds the key and your email text passes through the maker's server, or you hold the key and the app talks to the provider directly from your computer.
| The app maker's key | Your own key | |
|---|---|---|
| Who sees the email text | The app maker's server and the AI provider | The AI provider only |
| Who you pay for AI | The app maker, usually a flat fee | The provider, for what you use |
| Setting up | Nothing to do | A few minutes, once |
How to get an API key
An API key is not a chat subscription. Paying for a provider's chat app does not, as a rule, include API use: the developer side has its own account page and its own billing.
- Open the provider's developer console and sign in: Anthropic's console for Claude keys, OpenAI's API keys page, Google AI Studio for Gemini keys or the xAI console for Grok keys.
- Set up billing if the provider asks for it. Some want credit bought in advance, some bill at the end of the month.
- Create a key and give it a name you will recognise.
- Copy the key straight away. Most consoles show it in full only once.
- Paste it into the mail app's AI settings and run the app's test, if it has one.
- Set a spending limit in the console if it offers one.
Treat the key like a password. Anyone who has it can spend your money. If you think it has leaked, delete it in the provider's console and make a new one.
What it costs
Providers bill per use, not per month. The unit is the token, a piece of a word: you pay for the text you send (the email and the instructions) and the text that comes back. Each provider publishes its prices per model on its own pricing page, and they change, so read them there.
- The model. Every provider sells small, quick models and large ones. Summarising an email is an easy job, and the small models cost a fraction of the large ones.
- The length of the mail. A long thread costs more than a two-line note.
- How often it runs. A summary you ask for costs once. Anything that runs by itself on every email you open adds up faster.
Where your email text goes
With your own key, the text of the email travels over an encrypted connection to the provider and the answer comes back the same way. A copy of that mail still leaves your computer, so check two things.
- The provider's terms for API data. Each one publishes how long it keeps API requests and whether it trains models on them. These terms often differ from the ones for the same company's chat app.
- The app's route. A real BYOK app sends the request from your computer to the provider. If its privacy policy has the maker's servers handling AI requests, your key and your mail pass through the maker too. The guide on whether a mail app can read your email shows how to tell.
Where the key is stored, and who is left out
A key in a plain settings file can be read by any program running under your account. On a Mac the right place is the Keychain, the system's encrypted store for passwords. An app should say where it keeps your key.
Some mail should never go to an AI provider: your bank, your doctor, your lawyer. A careful app lets you list senders or whole domains that are never sent, and checks that list before every request.
How Mailvie handles your key
Mailvie is a mail app for the Mac, and its AI works only with your own key: Claude, OpenAI, Gemini or Grok. There is no Mailvie AI server and no key of ours in the app. Version 0.1.0 has no on-device model, so without a key the AI buttons say what is needed and do nothing else.
- In Settings, AI, you paste a key and press Check and save. Mailvie asks the provider whether it accepts the key and stores it only if it does, in the macOS Keychain.
- You pick a model from the list your key can use.
- A summary or a reply sends the open conversation straight from your Mac to that provider, as the published list of connections says.
- Settings, Privacy has a "Never send to AI" list of senders and domains. A conversation with one excluded sender is excluded as a whole.
- Summaries that appear by themselves are off until you switch them on for an account.
Reading mail and search are free. The AI features need a plan, and the monthly and yearly plans start with a 7-day trial: see the pricing page, or download Mailvie for Mac (Apple Silicon, macOS 14 or later).
Questions people ask
Is bringing your own AI key cheaper than a subscription?
It depends on how much you use it. Light use with a small model costs little, and heavy use of a large model costs more. The provider's console shows your real spend, which is the only figure worth trusting.
Does my chat subscription include an API key?
As a rule, no. The providers sell their chat apps and their API separately, each with its own billing. You create the key in the developer console and pay for API use there.
Can the mail app maker see my key or my email?
Not if the app sends requests straight from your computer to the provider. If the privacy policy puts the maker's own servers in the path, the maker can see both the key and the text.
Written by Sanjeev Maharjan
Sanjeev Maharjan builds Mailvie, a mail app for the Mac. Found a mistake in this guide? Write to [email protected].