How to Get Your Own API Keys
Complete step-by-step guide to obtain API keys from Google Gemini, OpenAI, and Anthropic Claude for use with Stanza's BYOK feature
📖 Overview
Stanza's BYOK (Bring Your Own Key) feature allows you to use your own API keys from OpenAI, Anthropic, or Google. This gives you direct access to premium AI models while keeping full control over your API usage and costs.
💡 Note: By default, Stanza runs 100% offline on your Mac for maximum privacy. BYOK is optional and only needed if you want to access cloud-based premium models from these providers.
🔑 Getting API Keys
1. Google Gemini API Key
Google's Gemini models offer powerful AI capabilities with a generous free tier.
- Visit Google AI Studio: Go to Google AI Studio
- Sign in with your Google account
- Create an API key: Click on "Get API key" or "Create API key" button
- Create a new project or select an existing one
-
Copy your API key - it will look like this:
AIzaSyC_example_key_1234567890abcdefghijk
✨ Free Tier: Google offers 15 requests per minute for free, which is generous for personal use.
2. OpenAI API Key
Access to GPT-4o and other OpenAI models.
- Visit OpenAI Platform: Go to OpenAI API Keys
- Sign in or create an account
- Create a new API key: Click on "Create new secret key"
- Name your key (e.g., "Stanza App")
-
Copy your API key immediately - you won't be able to see it again:
sk-proj-example_key_1234567890abcdefghijk
- Add billing information: Go to Billing settings and add a payment method
⚠️ Important: OpenAI requires a paid account with billing information. You'll be charged based on usage (typically $0.002-0.06 per 1K tokens depending on the model).
3. Anthropic Claude API Key
Access to Claude models from Anthropic.
- Visit Anthropic Console: Go to Anthropic API Keys
- Sign in or create an account
- Request API access (if you haven't already)
- Create a new API key: Click on "Create Key"
- Name your key (e.g., "Stanza App")
-
Copy your API key immediately - you won't be able to see it again:
sk-ant-api03-example_key_1234567890abcdefghijk
- Add billing information: Go to billing settings and add a payment method
⚠️ Important: Anthropic requires billing information. You'll be charged based on usage (typically $0.003-0.015 per 1K tokens depending on the model).
🔐 Adding API Keys to Stanza
- Open Stanza on your Mac
- Go to Settings: Click on the "Settings" button
- Choose "Bring Your Own Key (BYOK)" under "Service Type"
- Navigate to API Keys section
- Paste your API key into the appropriate field (OpenAI, Anthropic, or Google)
- Save your API Keys
- Select your preferred model from the available options
🛡️ Security: Your API keys are stored securely in your Mac's keychain. Stanza never sees or accesses your keys - they're only used for direct communication between your device and the AI provider.
💰 Cost Comparison
Here's a rough comparison of costs for different providers (prices may vary):
- Google Gemini: Free tier available (15 RPM), then pay-as-you-go starting at $0.00025 per 1K characters
- OpenAI GPT-4o: ~$0.0025 per 1K input tokens, ~$0.01 per 1K output tokens
- OpenAI GPT-4o mini: ~$0.00015 per 1K input tokens, ~$0.0006 per 1K output tokens
- Anthropic Claude: ~$0.003-0.015 per 1K tokens depending on model
💡 Tip: For typical grammar checking usage, costs are usually very minimal - often just a few cents per day even with regular use.
❓ Frequently Asked Questions
Do I need to use BYOK?
No! Stanza works 100% offline by default. BYOK is completely optional and only needed if you want to access cloud-based premium models.
Which provider should I choose?
Google Gemini is recommended for most users due to its generous free tier. OpenAI offers powerful models like GPT-4o for more advanced needs. Claude is great for longer context and nuanced writing.
Is my API key secure?
Yes! Your API keys are stored in your Mac's secure keychain. Stanza never transmits your keys to our servers. They're only used for direct communication between your Mac and the AI provider.
Can I switch between providers?
Absolutely! You can add multiple API keys and switch between providers anytime in Stanza's settings.
📧 Need Help?
If you encounter any issues or have questions about setting up API keys, feel free to reach out to us at support@stanza-app.com