Skip to main content

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

  1. Visit OpenAI Platform
  2. Sign in to your OpenAI account
  3. Click “Create new secret key”
  4. Copy the key and add it to Parsaa
  • GPT-4: 0.03/1Kinputtokens,0.03/1K input tokens, 0.06/1K output tokens
  • GPT-3.5 Turbo: 0.001/1Kinputtokens,0.001/1K input tokens, 0.002/1K output tokens
  • GPT-4 Turbo: 0.01/1Kinputtokens,0.01/1K input tokens, 0.03/1K output tokens

Anthropic (Claude)

  1. Visit Anthropic Console
  2. Sign in to your Anthropic account
  3. Navigate to “API Keys” section
  4. Create a new key and add it to Parsaa
  • Claude-3 Opus: 15/1Minputtokens,15/1M input tokens, 75/1M output tokens
  • Claude-3 Sonnet: 3/1Minputtokens,3/1M input tokens, 15/1M output tokens
  • Claude-3 Haiku: 0.25/1Minputtokens,0.25/1M input tokens, 1.25/1M output tokens

Google (Gemini)

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Create a new API key
  4. Add the key to Parsaa settings
  • 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

  1. Visit Fireworks AI
  2. Create an account and sign in
  3. Navigate to API Keys section
  4. Generate a new key for Parsaa
  • 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

  1. Visit Voyage AI
  2. Sign up for an account
  3. Access your API dashboard
  4. Create a new API key
  • Code Embeddings: For semantic code search
  • Similarity Search: Find similar code patterns
  • Code Clustering: Group related code together
  • Voyage-2: $0.10/1M input tokens
  • Voyage-3: $0.20/1M input tokens
  • Custom Models: Contact for pricing

OpenRouter

  1. Visit OpenRouter
  2. Create an account
  3. Generate an API key
  4. Add it to Parsaa for access to multiple models
  • Access to 100+ models from various providers
  • Unified API for different model providers
  • Cost comparison and optimization
  • 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

# Add OpenAI key
parsaa config set openai.api_key "your-key-here"

# Add Claude key
parsaa config set claude.api_key "your-key-here"

# List all configured keys
parsaa config list
# Set environment variables
export OPENAI_API_KEY="your-key-here"
export CLAUDE_API_KEY="your-key-here"
export GOOGLE_API_KEY="your-key-here"

# Parsaa will automatically detect these

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

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

  • 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
  • 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

Never share your API keys. Keep them secure and never commit them to version control.
  • 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
  • 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

  • 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
  • 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

Symptoms: “Invalid API key” errorsSolutions:
  1. Verify the key is correct and complete
  2. Check if the key has expired
  3. Ensure the key has proper permissions
  4. Try regenerating the key
Symptoms: “Rate limit exceeded” errorsSolutions:
  1. Wait for the rate limit to reset
  2. Upgrade to a higher tier plan
  3. Use a different model provider
  4. Implement request queuing
Symptoms: “Model not available” errorsSolutions:
  1. Check if the model is supported
  2. Verify your account has access
  3. Try a different model
  4. 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.