Astronox Docs

API Keys & Providers

Everything you need to know about managing API keys and choosing providers.

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:

  1. Google Gemini (Limited free tier, paid tiers available)
  2. OpenAI (GPT-5.2 and variants)
  3. Claude (Anthropic—Haiku 4.5, Sonnet 4.5)
  4. Azure OpenAI (Enterprise deployment)
  5. MintAI (Pro version—Devstral 2)
  6. NVIDIA (Dev mode only)

Google Gemini

Getting Your API Key

Step-by-step:

  1. Visit Google AI Studio

  2. 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
  3. Copy the Key

    • Key format: AIza... (39 characters)
    • Copy the entire key
    • Important: Save it securely (shown only once)
  4. 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

When you need it:

  • Exceed free tier limits regularly
  • Need higher rate limits
  • Commercial/professional use

How to enable:

  1. Set up billing in Google Cloud:

  2. 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
  3. 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:

  1. Go to Google AI Studio
  2. Delete compromised key
  3. Generate new key
  4. Update in Astronox
  5. 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:

  1. Astronox automatically fetches key from secure feed
  2. No manual API key configuration needed
  3. Key refreshes periodically

Setup:

  1. Subscribe to Pro (via official channels)
  2. Launch Astronox
  3. Settings → API Keys → Select "MintAI"
  4. 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:

  1. Settings → API Keys
  2. Select provider from dropdown
  3. Ensure key is configured
  4. 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:

  1. Verify key starts with AIza and is 39 characters
  2. Check for extra spaces or newlines when pasting
  3. Confirm key is for Gemini API (not other Google services)
  4. Try regenerating key in Google AI Studio
  5. Verify internet connection

MintAI:

  1. Confirm Pro subscription is active
  2. Check internet connection
  3. Click "Fetch Key" again
  4. Contact MintFlow support if persists

"Connection Failed" Error

Checklist:

  1. Internet connection: Verify you're online
  2. Firewall: Allow Astronox to access internet
  3. VPN: Try disabling temporarily
  4. Provider status: Check if API is down
  5. 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:

  1. API not enabled:

    • Google Cloud Console → APIs & Services
    • Enable "Generative Language API"
  2. Project billing:

    • If past free tier, billing must be enabled
    • Verify in Google Cloud Console
  3. Key restrictions:

    • Check if key has IP or app restrictions
    • Remove restrictions or use unrestricted key
  4. 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:

  1. Visit OpenAI Platform

  2. Create API Key

    • Click "Create new secret key"
    • Name it (e.g., "Astronox")
  3. Copy the Key

    • Key format: sk-... (48+ characters)
    • Copy immediately (shown only once)
  4. 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:

  1. Visit Anthropic Console

  2. Create API Key

    • Navigate to Settings → API Keys
    • Click "Create Key"
  3. Copy the Key

    • Key format: sk-ant-...
    • Copy immediately
  4. 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:

Step-by-step:

  1. Create Resource

  2. Get Credentials

    • In Azure portal, click "Keys and Endpoint"
    • Copy your Endpoint (URL)
    • Copy your API Key
  3. 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

ProviderSpeedCostQualityBest 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.