-
Notifications
You must be signed in to change notification settings - Fork 0
API Keys Setup
Complete guide to obtaining and configuring LLM provider API keys for AutoCat.
AutoCat requires an API key from at least one LLM provider to enable AI-powered categorization. This guide covers:
- How to obtain API keys from each provider
- How to configure keys in AutoCat
- Cost and rate limit information
- Security best practices
Best for: Free tier users, fast categorization, generous limits
Pros:
- Free tier with generous limits
- Fast response times (Gemini 2.0 Flash)
- Large context window (1M tokens)
- No credit card required for free tier
Cons:
- Rate limited (15 requests per minute on free tier)
Cost: Free tier available
Best for: High accuracy, detailed reasoning
Pros:
- Excellent categorization accuracy
- Detailed reasoning output
- Fast models (Claude 3.5 Haiku)
Cons:
- Requires credit card
- Paid service (no free tier)
- More expensive than Google AI
Cost: Pay-as-you-go (starts at $0.25 per million input tokens)
Best for: Balanced performance
Pros:
- Well-established provider
- Good categorization accuracy
- Fast models (GPT-4o Mini)
Cons:
- Requires credit card
- Paid service (no free tier)
- Rate limits on free trial
Cost: Pay-as-you-go (starts at $0.15 per million input tokens)
Best for: Online search integration
Pros:
- Online search capabilities
- Fast models (Llama 3.1 Sonar)
- Good for research-based categorization
Cons:
- Requires credit card
- Paid service (limited free tier)
- Less common provider
Cost: Free tier with $5 credit, then pay-as-you-go
- Go to Google AI Studio
- Click "Get API Key" or "Get Started"
- Sign in with Google account
- Click "Create API Key"
- Select or create a Google Cloud project
- Copy the API key (starts with
AIza...)
Method A: Settings UI
- Open AutoCat
- Settings β Categorization β LLM Settings
- Scroll to "Google AI" section
- Tap "API Key" field
- Paste your API key
- Tap "Test Connection" to verify
Method B: Environment Variable (More secure)
# In Termux or shell
export GOOGLE_AI_API_KEY="AIzaSy..."
# AutoCat will automatically detect this- Settings β Categorization β LLM Settings
- Under "Google AI", tap "Model"
- Select "Gemini 2.0 Flash (Recommended)"
- Save settings
- Free tier: 15 requests per minute
- Quota: 1,500 requests per day
- Batch processing: Recommended to reduce requests
- Go to Anthropic Console
- Sign up or log in
- Click "API Keys" in sidebar
- Click "Create Key"
- Give it a name (e.g., "AutoCat")
- Copy the key (starts with
sk-ant-...)
Note: Requires credit card on file
Method A: Settings UI
- Open AutoCat
- Settings β Categorization β LLM Settings
- Tap "LLM Provider" β Select "Claude"
- Tap "API Key" field under "Claude"
- Paste your API key
- Tap "Test Connection" to verify
Method B: Environment Variable
export ANTHROPIC_API_KEY="sk-ant-..."Recommended models:
- Claude 3.5 Haiku: Fast, affordable
- Claude 3.5 Sonnet: More accurate, slower
- Tier 1 (new accounts): 50 requests per minute
- Tier 2 (after $5 spend): 1,000 requests per minute
- Go to OpenAI Platform
- Sign up or log in
- Click on your profile β "API Keys"
- Click "Create new secret key"
- Name it (e.g., "AutoCat")
- Copy the key (starts with
sk-...)
Note: Requires credit card on file
Method A: Settings UI
- Open AutoCat
- Settings β Categorization β LLM Settings
- Tap "LLM Provider" β Select "OpenAI"
- Tap "API Key" field under "OpenAI"
- Paste your API key
- Tap "Test Connection" to verify
Method B: Environment Variable
export OPENAI_API_KEY="sk-..."Recommended model:
- GPT-4o Mini: Fast, affordable, good accuracy
- Free trial: 3 requests per minute
- Tier 1 (after $5 spend): 500 requests per minute
- Go to Perplexity AI
- Sign up or log in
- Navigate to API settings
- Create new API key
- Copy the key
Method A: Settings UI
- Open AutoCat
- Settings β Categorization β LLM Settings
- Tap "LLM Provider" β Select "Perplexity"
- Tap "API Key" field under "Perplexity"
- Paste your API key
- Tap "Test Connection" to verify
Method B: Environment Variable
export PERPLEXITY_API_KEY="pplx-..."Recommended model:
- Llama 3.1 Sonar Small: Fast, affordable
| Provider | Model | Estimated Cost | Free Tier |
|---|---|---|---|
| Google AI | Gemini 2.0 Flash | $0.00 | β Free |
| Claude | Claude 3.5 Haiku | ~$0.01-0.02 | β Paid |
| OpenAI | GPT-4o Mini | ~$0.01 | β Paid |
| Perplexity | Llama 3.1 Sonar | ~$0.01 |
Note: Costs are estimates based on typical app metadata. Actual costs may vary.
Assuming daily re-categorization of 100 apps:
| Provider | Daily | Monthly (30 days) |
|---|---|---|
| Google AI | Free | Free |
| Claude | $0.01 | $0.30 |
| OpenAI | $0.01 | $0.30 |
| Perplexity | Free (with credit) | $0.30 (after credit) |
Why?
- API keys not stored in app settings
- More secure (not in backups)
- Easy to rotate keys
How?
Termux:
# Add to ~/.bashrc or ~/.zshrc
export GOOGLE_AI_API_KEY="your-key-here"
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"
export PERPLEXITY_API_KEY="your-key-here"
# Reload shell
source ~/.bashrcAndroid (via Termux):
# Create a script to set env vars
cat > ~/set-api-keys.sh <<EOF
export GOOGLE_AI_API_KEY="your-key-here"
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"
export PERPLEXITY_API_KEY="your-key-here"
EOF
# Source before running AutoCat
source ~/set-api-keys.shBest practice: Rotate API keys every 90 days
- Generate new key in provider console
- Update AutoCat settings or env variable
- Test connection
- Delete old key in provider console
Prevent unexpected charges:
- Set up billing alerts in provider console
- Monitor API usage regularly
- Set spending limits if available
- Review AutoCat accuracy metrics (Settings β LLM Settings)
After adding API key:
- Settings β Categorization β LLM Settings
- Find your provider section
- Tap "Test Connection"
- Wait for result:
- β Success: Shows latency and model version
- β Failure: Shows specific error message
"Invalid API key"
- Double-check key is copied correctly
- Verify key is active in provider console
- Check for extra spaces
"Rate limit exceeded"
- Wait a few seconds and try again
- Check your provider's rate limits
- Consider upgrading tier
"Network error"
- Check internet connection
- Verify provider API is not down
- Check firewall/VPN settings
| Use Case | Recommended Provider | Why |
|---|---|---|
| Just trying AutoCat | Google AI | Free, no credit card needed |
| Daily use (free) | Google AI | Generous free tier |
| Best accuracy | Claude 3.5 Haiku | Higher quality categorization |
| Balanced (cost/quality) | OpenAI GPT-4o Mini | Good quality, reasonable cost |
| Auto-select best | Enable "Auto-Select" | Let AutoCat choose based on accuracy |
What it does: AutoCat tracks accuracy for each provider and automatically selects the best performing one.
How to enable:
- Settings β Categorization β LLM Settings
- Enable "Auto-Select Best Model"
- Ensure you have API keys for multiple providers
- AutoCat will analyze 30 days of accuracy data
Requirements:
- At least 2 providers configured
- Minimum 10 categorizations per provider
- At least 70% accuracy threshold
You can switch providers at any time:
- Settings β Categorization β LLM Settings
- Tap "LLM Provider"
- Select new provider
- Ensure new provider has valid API key
- Test connection
Note: Existing categorizations remain unchanged. Only new categorizations use new provider.
To re-categorize all apps with new provider:
- Switch provider (above steps)
- Settings β Categorization
- Tap "Re-categorize All Apps"
- Wait for completion
Q: Can I use multiple providers? A: Yes! Add keys for multiple providers and enable "Auto-Select Best Model" to let AutoCat choose.
Q: Do I need to pay for AutoCat? A: No, AutoCat is free. You only pay for LLM provider API usage (Google AI has free tier).
Q: How many apps can I categorize for free? A: With Google AI free tier: ~1,500 categorizations per day (more with batch processing).
Q: What if my key stops working? A: Check provider console for:
- Key status (active/revoked)
- Billing issues
- Rate limit exceeded
- API quota exhausted
Q: Can I share my API key? A: No, API keys are personal. Sharing violates provider terms of service.
Q: How do I delete my API key from AutoCat? A: Settings β Categorization β LLM Settings β Tap API key field β Delete text
- Check internet connection
- Verify API key is correct (copy/paste again)
- Test in provider console (make test API call)
- Check provider status (is API down?)
- Check provider dashboard for usage limits
- Wait for quota reset (usually daily/hourly)
- Upgrade tier if available
- Switch to different provider temporarily
- Update AutoCat to latest version
- Check model availability in provider docs
- Select different model in settings
- Report issue if model should be available
- User Guide - Using AutoCat features
- Developer Guide - Contributing to AutoCat
- Troubleshooting - Common issues
Last Updated: 2025-12-25
AutoCat | Fork of Lawnchair 15 | Download Latest Build | Last Updated: 2025-12-25