Overview
Parsaa supports multiple AI providers, allowing you to choose the best model for your specific needs. Configure your API keys to access different AI services and models.Privacy First: All API keys are stored locally on your machine and never transmitted to Parsaa servers.
Supported Providers
OpenAI
Getting Your API Key
Getting Your API Key
- Visit OpenAI Platform
- Sign in to your OpenAI account
- Click “Create new secret key”
- Copy the key and add it to Parsaa
Recommended Models
Recommended Models
- GPT-4: Best for complex code analysis and generation
- GPT-3.5 Turbo: Fast and cost-effective for most tasks
- GPT-4 Turbo: Enhanced version with larger context window
Pricing
Pricing
- GPT-4: 0.06/1K output tokens
- GPT-3.5 Turbo: 0.002/1K output tokens
- GPT-4 Turbo: 0.03/1K output tokens
Anthropic (Claude)
Getting Your API Key
Getting Your API Key
- Visit Anthropic Console
- Sign in to your Anthropic account
- Navigate to “API Keys” section
- Create a new key and add it to Parsaa
Recommended Models
Recommended Models
- Claude-3 Opus: Most capable for complex reasoning
- Claude-3 Sonnet: Balanced performance and cost
- Claude-3 Haiku: Fastest and most cost-effective
Pricing
Pricing
- Claude-3 Opus: 75/1M output tokens
- Claude-3 Sonnet: 15/1M output tokens
- Claude-3 Haiku: 1.25/1M output tokens
Google (Gemini)
Getting Your API Key
Getting Your API Key
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Add the key to Parsaa settings
Recommended Models
Recommended Models
- Gemini Pro: Best for general coding tasks
- Gemini Pro Vision: For image-to-code generation
- Gemini Ultra: Most advanced capabilities
Pricing
Pricing
- Gemini Pro: Free tier available, then $0.50/1M input tokens
- Gemini Pro Vision: $0.50/1M input tokens
- Gemini Ultra: $1.25/1M input tokens
Fireworks AI
Getting Your API Key
Getting Your API Key
- Visit Fireworks AI
- Create an account and sign in
- Navigate to API Keys section
- Generate a new key for Parsaa
Recommended Models
Recommended Models
- Llama 2 70B: Open-source alternative to GPT-4
- Code Llama 34B: Specialized for code generation
- Mixtral 8x7B: Efficient mixture of experts model
Pricing
Pricing
- Llama 2 70B: $0.40/1M input tokens
- Code Llama 34B: $0.20/1M input tokens
- Mixtral 8x7B: $0.15/1M input tokens
Voyage AI
Getting Your API Key
Getting Your API Key
- Visit Voyage AI
- Sign up for an account
- Access your API dashboard
- Create a new API key
Use Cases
Use Cases
- Code Embeddings: For semantic code search
- Similarity Search: Find similar code patterns
- Code Clustering: Group related code together
Pricing
Pricing
- Voyage-2: $0.10/1M input tokens
- Voyage-3: $0.20/1M input tokens
- Custom Models: Contact for pricing
OpenRouter
Getting Your API Key
Getting Your API Key
- Visit OpenRouter
- Create an account
- Generate an API key
- Add it to Parsaa for access to multiple models
Available Models
Available Models
- Access to 100+ models from various providers
- Unified API for different model providers
- Cost comparison and optimization
Benefits
Benefits
- Model Switching: Easy switching between providers
- Cost Optimization: Choose the most cost-effective model
- Fallback Support: Automatic fallback to backup models
Adding API Keys to Parsaa
Method 1: Settings Panel
1
Open Settings
In Xcode, go to Parsaa > Settings or use
⌘,2
Navigate to API Keys
Click on the “API Keys” tab in the settings panel
3
Add Provider
Click “Add Provider” and select your AI provider
4
Enter API Key
Paste your API key and click “Save”
5
Test Connection
Click “Test” to verify the API key works correctly
Method 2: Command Line
Using Parsaa CLI
Using Parsaa CLI
Environment Variables
Environment Variables
Model Selection Strategy
For Code Analysis
Complex Analysis
Recommended: GPT-4 or Claude-3 Opus
- Best for understanding complex code
- Excellent reasoning capabilities
- Higher cost but better results
Quick Analysis
Recommended: GPT-3.5 Turbo or Claude-3 Haiku
- Fast response times
- Cost-effective for simple tasks
- Good for basic code review
For Code Generation
Swift/SwiftUI
Recommended: GPT-4 or Code Llama
- Specialized in Swift development
- Understands iOS patterns
- Best for UI code generation
General Purpose
Recommended: Claude-3 Sonnet or Gemini Pro
- Good balance of quality and cost
- Versatile for different languages
- Reliable performance
For Code Refactoring
Complex Refactoring
Recommended: GPT-4 or Claude-3 Opus
- Understands code relationships
- Preserves functionality
- Suggests architectural improvements
Simple Refactoring
Recommended: GPT-3.5 Turbo or Claude-3 Haiku
- Quick style improvements
- Basic optimization
- Cost-effective for simple changes
Cost Optimization
Smart Model Selection
Automatic Selection
Automatic Selection
Parsaa can automatically choose the best model based on:
- Task Complexity: Simple tasks use cheaper models
- Code Size: Large files use more capable models
- Context Requirements: Complex context needs advanced models
- Cost Budget: Set limits to control spending
Manual Override
Manual Override
You can always override automatic selection:
- Force Specific Model: Use a particular model for all tasks
- Cost Limits: Set maximum cost per request
- Quality Thresholds: Minimum quality requirements
- Fallback Models: Backup options if primary fails
Usage Monitoring
Cost Tracking
Cost Tracking
- Real-time Usage: See costs as you use Parsaa
- Daily Limits: Set spending limits per day
- Monthly Budgets: Track monthly AI costs
- Usage Reports: Detailed breakdown of expenses
Optimization Tips
Optimization Tips
- Batch Requests: Group similar requests together
- Context Optimization: Reduce unnecessary context
- Model Switching: Use cheaper models for simple tasks
- Caching: Cache similar requests to avoid duplicates
Security Best Practices
API Key Security
Secure Storage
Secure Storage
- Local Storage: Keys stored locally on your machine
- Encryption: Keys encrypted at rest
- No Transmission: Keys never sent to Parsaa servers
- Access Control: Only you can access your keys
Key Management
Key Management
- Regular Rotation: Change keys periodically
- Limited Scope: Use keys with minimal required permissions
- Monitoring: Track key usage and access
- Revocation: Ability to revoke compromised keys
Privacy Considerations
Data Privacy
Data Privacy
- Code Analysis: Your code is sent to AI providers for analysis
- No Storage: AI providers don’t store your code permanently
- Usage Policies: Review each provider’s data usage policies
- Sensitive Code: Consider using local models for sensitive projects
Local Alternatives
Local Alternatives
- Ollama: Run models locally for complete privacy
- LM Studio: Local model management
- Custom Models: Use your own fine-tuned models
- Hybrid Mode: Combine local and cloud processing
Troubleshooting
Common Issues
Invalid API Key
Invalid API Key
Symptoms: “Invalid API key” errorsSolutions:
- Verify the key is correct and complete
- Check if the key has expired
- Ensure the key has proper permissions
- Try regenerating the key
Rate Limit Exceeded
Rate Limit Exceeded
Symptoms: “Rate limit exceeded” errorsSolutions:
- Wait for the rate limit to reset
- Upgrade to a higher tier plan
- Use a different model provider
- Implement request queuing
Model Not Available
Model Not Available
Symptoms: “Model not available” errorsSolutions:
- Check if the model is supported
- Verify your account has access
- Try a different model
- Contact the provider for support
Getting Help
Contact Support
Having trouble with API keys? Our support team is here to help.
Beta Support: During the beta period, we provide priority support for all API key and configuration issues.
