API Key Setup Guide
Set up your AI API key in Maexry. Step-by-step instructions for Google Gemini, OpenAI, Anthropic, and Ollama.
API Key Setup Guide
Maexry uses a Bring Your Own Key model. You provide the AI key, your device does the processing, and no one else sees your email.
What Is BYOK?
BYOK stands for Bring Your Own Key. Instead of routing your emails through someone else's AI service, you provide an API key from the provider you trust. Maexry uses that key directly from your device to classify and process your email.
Your API key stays on your device, except when Maexry sends it to your provider to make a request. Maexry encrypts it with a key protected by the Secure Enclave and keeps it in your device's Keychain. It's never sent to Maexry's servers, and it doesn't sync to your other devices.
Choose Your Provider
Pick the provider that fits your priorities. You can switch at any time in Settings.
| Provider | Model | Approx. Cost | Best For |
|---|---|---|---|
| Google Gemini | Gemini 2.0 Flash | ~$0.01–0.02/1K emails | Budget-conscious |
| OpenAI | GPT-4o mini | ~$0.02–0.05/1K emails | Existing OpenAI accounts |
| Anthropic | Claude Haiku | ~$0.02–0.04/1K emails | Existing Anthropic accounts |
| Ollama (Bridge) | Your choice | $0 (your hardware) | Classification on hardware you control |
Typical monthly cost for BYOK usage is approximately $0.50–$1.00/month depending on email volume and provider.
Get Your Key: Google Gemini
- Open Google AI Studio at aistudio.google.com.
- Sign in with your Google account.
- Click Get API Key, then Create API Key.
- Copy the key. It starts with
AIza... - Turn on billing for the key in Google AI Studio. On Google's free tier, Google may use what you send to improve its products.
- Open Maexry → Settings → AI Configuration → Cloud LLM (BYOK) → Google Gemini.
- Paste your key and tap Save.
Your key is now stored locally on your device. Maexry will use it to classify incoming emails.
Get Your Key: OpenAI
- Go to the OpenAI Platform at platform.openai.com.
- Create an account or sign in.
- Navigate to API Keys → Create new secret key.
- Name it something recognizable (e.g., "Maexry") and copy it immediately. OpenAI shows the key only once.
- Add a payment method. OpenAI API keys require prepaid credits — the key won't work without billing enabled.
- Open Maexry → Settings → AI Configuration → Cloud LLM (BYOK) → OpenAI.
- Paste your key and tap Save.
Get Your Key: Anthropic
- Go to the Anthropic Console at console.anthropic.com.
- Create an account or sign in.
- Navigate to API Keys → Create Key.
- Name it and copy it immediately.
- Add a payment method. Like OpenAI, the API requires active billing.
- Open Maexry → Settings → AI Configuration → Cloud LLM (BYOK) → Anthropic.
- Paste your key and tap Save.
Set Up Ollama (Bridge)
Ollama lets you run open-source AI models on your own hardware. No API key, no usage fees, no cloud AI provider.
- Download Ollama from ollama.com on your Mac or PC.
- Install it and open a terminal.
- Pull the recommended model:
ollama pull [recommended-model] - Ollama starts a local server at
http://localhost:11434. - Open Maexry → Settings → AI Configuration → Ollama Server.
- Enter the local URL and tap Save.
Every AI classification now goes to your own Ollama instance, never to a cloud AI service. With Ollama on the same Mac, your email stays on that Mac for AI processing.
Related Product Modes
- Base ($19.99 once): You bring your own API key. AI runs through your chosen provider. Own forever.
- Pro ($3.99/mo or $34.99/yr): Standalone — everything in Base plus end-to-end encrypted cross-device sync of your triage and settings (skip re-classification on your other devices), plus priority support.
Troubleshooting Your Key
"Invalid key" error Double-check for trailing spaces or line breaks in your pasted key. Go back to your provider's dashboard, copy the key fresh, and paste it again. If the error persists, generate a new key.
"Quota exceeded" Your provider has run out of prepaid credits or hit a usage limit. Log in to your provider's billing page and add credits or upgrade your plan. Maexry processes emails in batches, so high email volume uses more credits.
"Model not available" Some models require waitlist access or a specific billing tier. Check your provider's documentation. If the model isn't accessible, try a different provider in Maexry Settings — you can switch at any time.
Key works but classification seems stuck Restart Maexry. If the issue persists, check the Troubleshooting Guide for more detailed steps.