API Keys & Providers
Everything you need to know about managing API keys and choosing providers.
Overview
Astronox supports 6 cloud-based LLM providers. You need an API key from at least one provider to use the app.
Available providers:
- Google Gemini (Limited free tier, paid tiers available)
- OpenAI (GPT-5.2 and variants)
- Claude (Anthropic—Haiku 4.5, Sonnet 4.5)
- Azure OpenAI (Enterprise deployment)
- MintAI (Pro version—Devstral 2)
- NVIDIA (Dev mode only)
Google Gemini
Getting Your API Key
Step-by-step:
-
Visit Google AI Studio
- URL: https://makersuite.google.com/app/apikey
- Sign in with your Google account
-
Create API Key
- Click "Get API Key" or "Create API Key"
- Select "Create API key in new project" (recommended)
- Or choose existing Google Cloud project
-
Copy the Key
- Key format:
AIza...(39 characters) - Copy the entire key
- Important: Save it securely (shown only once)
- Key format:
-
Add to Astronox
- Open Astronox Settings → API Keys
- Select "Gemini" from Provider dropdown
- Paste your key
- Click "Test Connection"
- Save Settings
Free Tier Limits
Gemini Flash & Flash Lite:
- 60 requests per minute
- 1,500 requests per day
- Free forever
Gemini Pro:
- 10 requests per minute
- 500 requests per day
- Free forever
What counts as a request:
- Each message you send to AI
- Follow-ups in same conversation count separately
- Tool calls don't count extra
Typical usage:
- Light user (10-20 messages/day): Never hits limits
- Regular user (50-100 messages/day): Comfortably within limits
- Power user (200+ messages/day): May hit daily limit
Paid Tier
When you need it:
- Exceed free tier limits regularly
- Need higher rate limits
- Commercial/professional use
How to enable:
-
Set up billing in Google Cloud:
- Visit https://console.cloud.google.com/
- Select your project (same one as API key)
- Enable billing (requires credit card)
-
Pricing (as of Dec 2025):
Flash & Flash Lite:
- Input: $0.075 per 1M tokens
- Output: $0.30 per 1M tokens
- ~$0.001 per typical request
Pro:
- Input: $1.25 per 1M tokens
- Output: $5.00 per 1M tokens
- ~$0.005 per typical request
-
No changes in Astronox:
- Same API key works
- Billing handled by Google
- Monitor usage in Google Cloud Console
Cost estimates:
- 100 requests/day (Flash): ~$3/month
- 100 requests/day (Pro): ~$15/month
- 500 requests/day (Flash): ~$15/month
- 500 requests/day (Pro): ~$75/month
Rate Limit Handling
What happens when you hit limit:
Rate limit (per minute):
⚠️ Rate limit exceeded
Please wait 45 seconds before sending next message.
[Retry in 45s]
- Wait for timer
- Or pause, come back in 1 minute
Daily limit:
⚠️ Daily quota exceeded
You've used 1,500 requests today.
Limit resets at midnight PST.
Options:
• Wait for reset (8 hours)
• Enable billing for unlimited requests
Tips to avoid limits:
- Batch related questions in one message
- Use Flash Lite for simple tasks (shares quota)
- Switch to Pro (separate quota)
- Enable billing
Security Best Practices
Protecting your API key:
✅ Do:
- Keep key private (don't share)
- Store securely in Astronox only
- Regenerate if accidentally exposed
- Monitor usage in Google Console
- Enable billing notifications
❌ Don't:
- Share key publicly (GitHub, forums)
- Hardcode in scripts shared with others
- Use same key across multiple apps
- Ignore unusual usage patterns
If key is compromised:
- Go to Google AI Studio
- Delete compromised key
- Generate new key
- Update in Astronox
- Review usage logs for unauthorized access
Monitoring Usage
In Google AI Studio:
- View requests per day
- See which models used
- Monitor token consumption
- Check billing (if enabled)
In Astronox (future):
- Settings → API Keys → View Usage
- Requests today
- Quota remaining
- Cost estimate
MintAI (Pro)
Getting Access
Requirements:
- Active Pro subscription
- Internet connection
How it works:
- Astronox automatically fetches key from secure feed
- No manual API key configuration needed
- Key refreshes periodically
Setup:
- Subscribe to Pro (via official channels)
- Launch Astronox
- Settings → API Keys → Select "MintAI"
- Test connection
Subscription Details
What's included:
- Access to Devstral 2 (Mistral AI's code model)
- Unlimited requests (fair use policy)
- No per-token billing
- Automatic key management
- Future: Access to additional premium models
Cost:
- Monthly or annual subscription
- Fixed price (no usage billing)
- Check official MintAI site for current pricing
Subscription management:
- Not handled in Astronox
- Contact MintAI support
- Check subscription portal
When MintAI is Better
Choose MintAI if:
- You're already a Pro subscriber
- Heavy code-focused workflows
- Want predictable costs (subscription vs pay-per-use)
- Prefer Devstral 2's code specialization
- Need cheap high rates (Google's free tier is not generous enough)
- Need access to multiple premium models (future)
Stick with Gemini if:
- Occasional usage (free tier sufficient)
- General tasks (not code-heavy)
- Prefer Gemini Pro's quality
- No subscription commitment
Managing Multiple Providers
Why Use Both
Gemini for:
- General file management
- Image analysis (Gemini excels)
- Free tier tasks
- Big input token window
MintAI/Devstral for:
- Code generation and review
- Technical automation
- When you want alternative perspective
- Premium features (future)
Switching Providers
In Settings:
- Settings → API Keys
- Select provider from dropdown
- Ensure key is configured
- Test connection
Via chat:
"Switch to MintAI"
"Use Gemini for next message"
Provider applies to:
- All new messages
- New conversations
- Previous messages keep original provider
Keys Encryption
At rest:
- Keys encrypted with system keychain (when available)
- Or AES-256 encryption (fallback)
In transit:
- HTTPS to AI providers only
- Never transmitted elsewhere
Accessing Your Keys
View in Astronox:
- Settings → API Keys
- Click "Show" to reveal (hidden by default)
- Copy to clipboard
Manual access (advanced):
- Settings file:
settings.json(encrypted field) - Not human-readable without decryption
Troubleshooting API Keys
"Invalid API Key" Error
Gemini:
- Verify key starts with
AIzaand is 39 characters - Check for extra spaces or newlines when pasting
- Confirm key is for Gemini API (not other Google services)
- Try regenerating key in Google AI Studio
- Verify internet connection
MintAI:
- Confirm Pro subscription is active
- Check internet connection
- Click "Fetch Key" again
- Contact MintFlow support if persists
"Connection Failed" Error
Checklist:
- Internet connection: Verify you're online
- Firewall: Allow Astronox to access internet
- VPN: Try disabling temporarily
- Provider status: Check if API is down
- Gemini: https://status.cloud.google.com/
- MintAI: Check MintAI announcements
- DNS: Try switching DNS servers (8.8.8.8)
"Rate Limit Exceeded"
See Rate Limit Handling above.
Quick fixes:
- Wait 1 minute (per-minute limit)
- Wait until midnight PST (daily limit)
- Switch to different model (separate quotas)
- Enable billing (unlimited)
"Quota Exceeded"
Daily quota (free tier):
- Reset time: Midnight Pacific Time
- Wait for reset
- Or enable billing
Billing quota (if enabled):
- Check billing account has funds
- Verify payment method valid
- May need to increase quota in Google Cloud
Key Shows as Valid but Requests Fail
Possible causes:
-
API not enabled:
- Google Cloud Console → APIs & Services
- Enable "Generative Language API"
-
Project billing:
- If past free tier, billing must be enabled
- Verify in Google Cloud Console
-
Key restrictions:
- Check if key has IP or app restrictions
- Remove restrictions or use unrestricted key
-
Expired key:
- Regenerate in provider dashboard
Best Practices
✅ Keep Backup Key
Generate a second API key as backup:
- Store securely (password manager)
- Use if primary key has issues
- Helpful during troubleshooting
✅ Monitor Usage
Check Google AI Studio regularly:
- Spot unusual activity
- Track when approaching limits
- Plan for billing if needed
✅ Use Appropriate Model
Match model to task to save quota:
- Flash Lite: Simple tasks
- Flash: General use
- Pro: Complex tasks only
✅ Rotate Keys Periodically
Security practice:
- Generate new key every 6-12 months
- Update in Astronox
- Delete old key
✅ Set Up Billing Notifications
In Google Cloud:
- Set budget alerts
- Get notified at 50%, 90%, 100% of budget
- Prevent surprise charges
OpenAI (GPT-5.2)
Getting Your API Key
Step-by-step:
-
Visit OpenAI Platform
- URL: https://platform.openai.com/api-keys
- Sign in with your OpenAI account
-
Create API Key
- Click "Create new secret key"
- Name it (e.g., "Astronox")
-
Copy the Key
- Key format:
sk-...(48+ characters) - Copy immediately (shown only once)
- Key format:
-
Add to Astronox
- Open Astronox Settings → OpenAI tab
- Paste your API key
- Select model: GPT-5.2 or GPT-5.2-Codex
- Save
Models
- GPT-5.2 (default): All-purpose
- GPT-5.2-Codex: Code generation
Pricing
- Input: $3 per 1M tokens
- Output: $12 per 1M tokens
- Typical: ~$0.01–0.05 per request
Claude (Anthropic)
Getting Your API Key
Step-by-step:
-
Visit Anthropic Console
- URL: https://console.anthropic.com
- Sign in with your account
-
Create API Key
- Navigate to Settings → API Keys
- Click "Create Key"
-
Copy the Key
- Key format:
sk-ant-... - Copy immediately
- Key format:
-
Add to Astronox
- Open Astronox Settings → Claude tab
- Paste your API key
- Select model: Claude Haiku 4.5 (fast) or Claude Sonnet 4.5 (powerful)
- Save
Models
- Claude Haiku 4.5 (default): Fast, efficient
- Claude Sonnet 4.5: Complex reasoning
Pricing
- Haiku: $0.80/$4 per 1M tokens (in/out)
- Sonnet: $3/$15 per 1M tokens (in/out)
- Typical: ~$0.005–0.02 per request
Azure OpenAI
Getting Your Credentials
Prerequisites:
- Azure subscription (https://azure.microsoft.com)
- Azure OpenAI resource deployed
Step-by-step:
-
Create Resource
- Log in to https://portal.azure.com
- Create "Azure OpenAI" resource
- Deploy a model (e.g., "gpt-5.2" deployment)
-
Get Credentials
- In Azure portal, click "Keys and Endpoint"
- Copy your Endpoint (URL)
- Copy your API Key
-
Add to Astronox
- Open Astronox Settings → Azure OpenAI tab
- Paste Endpoint URL
- Paste API Key
- Select model: GPT-5.2 or GPT-5.2-Codex
- Save
Models
- GPT-5.2 (default): All-purpose
- GPT-5.2-Codex: Code optimization
Pricing
- Input: $2–4 per 1M tokens (varies by region)
- Output: $8–12 per 1M tokens
- Check Azure Cost Management for details
Best For
- Enterprise deployments
- HIPAA/compliance needs
- Regional requirements
Provider Comparison
| Provider | Speed | Cost | Quality | Best For |
|---|---|---|---|---|
| Gemini Flash | ⚡⚡⚡ | 💰 | ⭐⭐⭐⭐ | General use, free |
| OpenAI GPT-5.2 | ⚡⚡ | 💰💰 | ⭐⭐⭐⭐⭐ | Code, complex tasks |
| Claude Haiku | ⚡⚡⚡ | 💰 | ⭐⭐⭐⭐ | Fast reasoning |
| Claude Sonnet | ⚡⚡ | 💰💰 | ⭐⭐⭐⭐⭐ | Advanced reasoning |
| Azure OpenAI | ⚡⚡ | 💰💰 | ⭐⭐⭐⭐⭐ | Enterprise |
Next: Explore Multi-Step Plans for complex workflows.