API Provider Setup Guide
Complete guide to setting up OpenAI, Google Gemini, and OpenRouter API providers for AI Product Tools
This comprehensive guide walks you through setting up each supported AI provider, including account creation, API key generation, billing setup, and optimization recommendations.
Supported AI Providers
AI Product Tools supports three leading AI providers:
OpenAI (ChatGPT)
- Models: GPT-4o, GPT-4.1, o1-preview, GPT-4o-mini
- Best For: Creative content, growth-focused stores
- Pricing: Pay-per-use with volume discounts
- Free Tier: $5 credit for new accounts
Google Gemini AI
- Models: Gemini 1.5 Pro, Flash, Flash-8B
- Best For: Fast generation, cost efficiency
- Pricing: Generous free tier + competitive rates
- Free Tier: Extensive monthly quota
OpenRouter
- Models: Access to multiple open-source models
- Best For: Model variety, competitive pricing
- Pricing: Various pricing tiers
- Free Tier: Limited free usage
OpenAI Setup
Step 1: Create OpenAI Account
Account Requirements:
- Valid email address
- Phone number for verification
- Credit card for billing (required after free credits)
-
Visit OpenAI Platform
- Go to platform.openai.com
- Click Sign up or Log in
-
Complete Registration
- Enter email and create password
- Verify email address
- Complete phone verification
-
Account Verification
- Provide necessary verification documents
- Wait for account approval (usually instant)
Step 2: Generate API Key
-
Navigate to API Keys
- Click your profile in top-right corner
- Select View API keys
- Or go directly to API keys section
-
Create New Key
- Click Create new secret key
- Choose a descriptive name (e.g., "AI Product Tools - My Store")
- Set permissions if needed (default is fine)
- Important: Copy the key immediately - you won't see it again
-
Key Format
- OpenAI keys start with
sk-
- Example:
sk-1234567890abcdef...
- Store securely - treat like a password
- OpenAI keys start with
Step 3: Set Up Billing
Billing Requirements:
- Credit card required after free credits expire
- Set usage limits to control costs
- Monitor usage regularly
- Set up alerts for spending thresholds
-
Add Payment Method
- Go to Billing section
- Click Add payment method
- Enter credit card information
-
Set Usage Limits
- Navigate to Usage limits
- Set monthly spending limit (recommended: start with $20-50)
- Enable email alerts
-
Review Pricing
- Check current model pricing
- Understand token-based billing
- Consider volume discounts for high usage
Step 4: Configure in Plugin
-
Access Plugin Settings
- Go to AI Product Tools → Settings
- Click API Settings tab
-
Select OpenAI Provider
- Choose "OpenAI" from provider dropdown
- Interface updates to show OpenAI options
-
Enter API Key
- Paste your API key in the field
- Click Save Settings
- Wait for connection test (green checkmark = success)
-
Choose Default Model
- Select preferred model from dropdown
- Consider your needs vs. costs
- Can be changed anytime
Google Gemini Setup
Step 1: Create Google AI Studio Account
Account Benefits:
- Use existing Google account
- Generous free tier
- Simple setup process
- No credit card required initially
-
Visit Google AI Studio
- Go to aistudio.google.com
- Click Get started
-
Sign In
- Use existing Google account
- Or create new Google account if needed
-
Accept Terms
- Review and accept terms of service
- Confirm country/region settings
Step 2: Generate API Key
-
Access API Key Section
- Click Get API Key button
- Or navigate to API keys in settings
-
Create Project (if needed)
- Create new Google Cloud project
- Or select existing project
- Follow project setup wizard
-
Generate Key
- Click Create API Key
- Choose project for the key
- Copy the generated key immediately
-
Key Management
- Keys don't expire automatically
- Can be regenerated if compromised
- Set up restrictions if needed
Step 3: Configure Quotas and Billing
-
Review Free Quotas
- Check monthly free allowances
- Understand rate limits
- Monitor usage patterns
-
Set Up Billing (Optional)
- Add billing account for usage beyond free tier
- Set budget alerts
- Configure spending controls
Step 4: Configure in Plugin
-
Select Gemini Provider
- In plugin settings, choose "Google Gemini"
- Interface updates for Gemini options
-
Enter API Key
- Paste Gemini API key
- Save and test connection
-
Select Model
- Choose from available Gemini models
- Consider speed vs. quality needs
OpenRouter Setup
Step 1: Create OpenRouter Account
-
Visit OpenRouter
- Go to openrouter.ai
- Click Sign Up
-
Registration
- Create account with email
- Verify email address
- Complete profile setup
Step 2: Get API Key
-
Navigate to Keys
- Go to Keys section in dashboard
- Click Create Key
-
Configure Key
- Set key name and permissions
- Choose usage limits
- Generate and copy key
Step 3: Add Credits
- Purchase Credits
- Go to Credits section
- Add funds to account
- Various payment methods supported
Step 4: Configure in Plugin
- Select OpenRouter
- Choose "OpenRouter" as provider
- Enter API key and save
Provider Comparison and Recommendations
Cost Comparison
Provider | Free Tier | Paid Pricing | Best For |
---|---|---|---|
OpenAI | $5 credit | $0.01-0.06/1K tokens | Premium quality content |
Gemini | Generous monthly quota | $0.001-0.01/1K tokens | Cost-effective bulk generation |
OpenRouter | Limited free usage | Varies by model | Model variety and flexibility |
Quality Comparison
OpenAI
Strengths: Excellent creativity, nuanced understanding, consistent quality Best For: growth-focused stores, creative content, brand storytelling Models: GPT-4o (best quality), GPT-4o-mini (cost-effective)
Google Gemini
Strengths: Fast processing, cost efficiency, good accuracy Best For: Large catalogs, standard products, budget-conscious operations Models: Gemini 1.5 Pro (quality), Flash (balanced), Flash-8B (speed)
OpenRouter
Strengths: Model diversity, competitive pricing, flexibility Best For: Experimentation, specific model requirements, cost optimization Models: Multiple options from various providers
Recommendation Matrix
By Business Size
Small Businesses (< 100 products)
- Primary: Google Gemini (free tier)
- Premium: OpenAI GPT-4o-mini
- Strategy: Start free, upgrade for key products
Medium Businesses (100-1000 products)
- Primary: Google Gemini Flash
- Premium: OpenAI GPT-4.1
- Strategy: Mixed approach based on product importance
Large Businesses (1000+ products)
- Bulk: Google Gemini Flash-8B
- Standard: Google Gemini Flash
- Premium: OpenAI GPT-4o
- Strategy: Tiered approach by product category
By Product Type
E-commerce/Retail
- Recommended: Google Gemini (cost-effective)
- Alternative: OpenAI GPT-4o-mini
- Focus: Efficiency and consistency
Luxury/Premium Brands
- Recommended: OpenAI GPT-4o
- Alternative: OpenAI o1-preview
- Focus: Quality and brand voice
Technical Products
- Recommended: OpenAI o1-preview
- Alternative: OpenAI GPT-4o
- Focus: Accuracy and detail
Security Best Practices
API Key Security
Security Guidelines:
- Never share API keys publicly
- Store keys securely
- Regenerate if compromised
- Use environment variables in development
- Set up usage alerts
- Regular security audits
Usage Monitoring
-
Set Up Alerts
- Configure spending alerts
- Monitor unusual usage patterns
- Set up rate limit notifications
-
Regular Reviews
- Check usage reports monthly
- Analyze cost vs. benefit
- Optimize based on patterns
-
Access Control
- Limit key permissions
- Use separate keys for different environments
- Rotate keys periodically
Troubleshooting Common Issues
API Key Problems
Invalid Key Error
- Verify key format and completeness
- Check for extra spaces or characters
- Ensure key hasn't been revoked
Authentication Failed
- Confirm account is active
- Check billing status (for paid providers)
- Verify API access is enabled
Connection Issues
Network Errors
- Check internet connection
- Verify firewall settings
- Test from different network
Rate Limiting
- Reduce request frequency
- Upgrade plan if needed
- Implement retry logic
Billing Issues
Payment Declined
- Update payment method
- Check card limits and expiration
- Contact provider support
Unexpected Charges
- Review usage reports
- Check for API key misuse
- Set up better monitoring
Optimization Tips
Cost Optimization
-
Model Selection
- Use appropriate models for each task
- Don't over-engineer for simple needs
- Test cheaper models first
-
Prompt Efficiency
- Keep prompts concise
- Use variables effectively
- Avoid unnecessary repetition
-
Usage Patterns
- Batch operations when possible
- Use caching for repeated requests
- Monitor and adjust strategies
Performance Optimization
-
Provider Selection
- Choose fastest models for bulk operations
- Use premium models for critical content
- Consider geographic latency
-
Request Optimization
- Optimize prompt length
- Use efficient variable substitution
- Implement proper error handling
Next Steps
After setting up your API provider:
Test Generation
Generate your first product to test the setup
Configure Settings
Optimize your generation settings
Learn Best Practices
Master optimization techniques
Explore Models
Understand different AI models