API Provider Setup Guide
Set up OpenAI, Google Gemini, or OpenRouter in under 10 minutes with step-by-step instructions for account creation, API keys, and configuration.
Time to complete: 5-10 minutes (varies by provider) You'll learn: How to configure an AI provider and connect it to AI Product Tools
Choose and configure an AI provider to power your product content generation. This guide covers three supported providers with step-by-step setup instructions, pricing comparisons, and recommendations for different business needs.
Before you begin:
- AI Product Tools plugin installed (install now)
- WordPress admin access
- Email address for provider account registration
- Credit card (optional - only required for OpenAI after free trial)
Which Provider Should You Choose?
Compare the three supported providers to find the best fit for your needs:
| Feature | OpenRouter | OpenAI | Google Gemini |
|---|---|---|---|
| Best For | Getting started, testing | High-quality English content | Multi-language, cost efficiency |
| Setup Time | 3 minutes | 5 minutes | 4 minutes |
| Free Tier | ✅ qwen/qwen3-8b:free model | ❌ $5 credit (requires card) | ✅ Limited free quota |
| Pricing | Free + paid options | $0.002/1K tokens | Free tier + competitive rates |
| Credit Card | ❌ Not required | ✅ Required after trial | ❌ Not required initially |
| Models Available | 100+ models | GPT-4o, GPT-4 Turbo, GPT-3.5 | Gemini Pro, Gemini Flash |
| Quality | Good (varies by model) | Excellent | Excellent |
| Speed | Fast | Fast | Very fast |
💡 Recommendation: Start with OpenRouter if you're new to AI content generation. No credit card required, and you can test with the free qwen/qwen3-8b:free model before committing to paid options.
OpenRouter Setup (Recommended for Beginners)
Why OpenRouter?
- No credit card required to start generating content
- Access to 100+ models including free options
- Easy to upgrade to premium models when needed
- Transparent pricing with pay-as-you-go structure
Step 1: Create OpenRouter Account
-
Visit openrouter.ai ↗
-
Click Sign Up in the top-right corner
-
Register with your email address
- Enter your email
- Create a password
- Verify your email address (check spam folder if needed)
-
Sign in to your new OpenRouter account
![]()
Step 2: Generate API Key
-
Navigate to the API Keys section
- Click your profile icon in top-right
- Select API Keys from the dropdown
-
Create a new API key
- Click Create Key button
- Give it a descriptive name: "AI Product Tools - [Your Store Name]"
- Copy the generated key (starts with
sk-or-v1-)
Example format: sk-or-v1-abc123def456ghi789jkl012mno345...Important: Copy your API key immediately! You won't be able to see it again after closing the dialog.
![]()
Step 3: Configure in AI Product Tools
-
Navigate to Products → AI Product Tools → Settings in WordPress admin
-
Select "OpenRouter" from the AI Provider dropdown
-
Paste your API key into the "OpenRouter API Key" field
-
Select a model from the dropdown
- For free testing: Select
qwen/qwen3-8b:free - For better quality: Select
openai/gpt-3.5-turboor similar paid model
- For free testing: Select
-
Click Save Settings
-
Wait for validation confirmation (green checkmark appears)
![]()
✓ Setup complete! You can now generate your first product description. Try the Quick Start Guide to create your first AI-powered content.
OpenAI Setup (Best Quality)
Why OpenAI?
- Highest quality English content generation
- Most popular and well-tested models
- Best for professional stores needing premium content
- Reliable with 99.9% uptime SLA
Step 1: Create OpenAI Account
-
Visit platform.openai.com ↗
-
Click Sign up
-
Register with email or Google account
- Enter email and create password (or use Google)
- Verify email address
- Complete phone number verification (required)
-
Sign in to OpenAI Platform
![]()
Step 2: Set Up Billing
Billing requirement: OpenAI requires a credit card on file after your free $5 credit expires. Set usage limits to control costs.
-
Navigate to Billing section
- Click your profile → Settings → Billing
-
Add payment method
- Click Add payment method
- Enter credit card information
- Set up auto-recharge (optional)
-
Set usage limits (recommended)
- Navigate to Usage limits
- Set monthly limit (e.g., $10, $20, $50)
- Enable email notifications at 50%, 75%, 90%
![]()
Step 3: Generate API Key
-
Navigate to API Keys
-
Create new secret key
- Click Create new secret key
- Name it: "AI Product Tools - [Your Store]"
- Copy the key (starts with
sk-)
Example format: sk-abc123def456ghi789jkl012mno345...Critical: Save your API key immediately! OpenAI shows the key only once. If you lose it, you must create a new key.
Step 4: Configure in AI Product Tools
-
Go to Products → AI Product Tools → Settings
-
Select "OpenAI" from AI Provider dropdown
-
Paste API key into "OpenAI API Key" field
-
Select a model:
- Budget:
gpt-3.5-turbo($0.002/1K tokens) - Balanced:
gpt-4o-mini - Premium:
gpt-4oorgpt-4-turbo
- Budget:
-
Click Save Settings and wait for validation
✓ OpenAI connected! You can now use GPT models for high-quality product descriptions.
Google Gemini Setup (Multi-Language)
Why Gemini?
- Free tier with generous monthly quotas
- Excellent multi-language support (100+ languages)
- Fast generation with competitive pricing
- Google Cloud reliability and infrastructure
Step 1: Create Google Cloud Account
-
Sign in with your Google account
- Use existing Google account or create new one
-
Accept terms of service for Google AI Studio
![]()
Step 2: Create Google Cloud Project
-
Click Get API Key
-
Create a new project or select existing
- Project name: "AI Product Tools" (or your store name)
- Organization: Leave default or select your organization
-
Enable Gemini API for the project
- This happens automatically when creating API key
Step 3: Generate API Key
-
Click Create API Key in existing project
-
Copy the generated API key
- Starts with
AIza... - Store securely
- Starts with
Example format: AIzaSyABC123DEF456GHI789JKL012MNO345...![]()
Step 4: Configure in AI Product Tools
-
Navigate to Products → AI Product Tools → Settings
-
Select "Gemini" from AI Provider dropdown
-
Paste API key into "Gemini API Key" field
-
Select a model:
- Fast & Free:
gemini-1.5-flash - Balanced:
gemini-1.5-pro
- Fast & Free:
-
Click Save Settings
✓ Gemini configured! You now have access to Google's AI models with free tier quota.
Testing Your Configuration
After setting up your API provider, test the connection:
Quick Test Steps
-
Go to Products → All Products
-
Edit any product
-
Find AI Product Tools metabox in sidebar
-
Click Generate Description
-
Wait 3-10 seconds
Expected result: Generated description appears in preview area
If successful: Your API provider is configured correctly! ✅
If failed: See troubleshooting section below ⬇
Troubleshooting
Issue: "Invalid API key" error
Symptoms:
- Error message appears after clicking Save Settings
- Red X icon next to API key field
- Cannot generate content
Solution:
-
Verify you copied the complete API key (no extra spaces or line breaks)
-
Check the key format matches your provider:
- OpenRouter:
sk-or-v1-... - OpenAI:
sk-... - Gemini:
AIza...
- OpenRouter:
-
Confirm the key is active in your provider dashboard
- OpenRouter: Check API Keys section
- OpenAI: Verify key not revoked at platform.openai.com/api-keys
- Gemini: Check API key status in Google Cloud Console
-
Re-generate a new API key if the current one doesn't work
-
For OpenAI: Ensure billing is configured and you have available credits
Related: Troubleshooting API Errors
Issue: Generation works but returns error "Quota exceeded"
Symptoms:
- API key validates successfully
- First few generations work
- Later generations fail with quota/limit error
Solution:
For OpenRouter:
- Check your account balance at openrouter.ai
- Add credits if using paid models
- Switch to free model (
qwen/qwen3-8b:free) for testing
For OpenAI:
- Verify billing is configured at platform.openai.com/settings/billing
- Check usage limits haven't been reached
- Add payment method or increase limits
For Gemini:
- Check free tier quota at console.cloud.google.com
- Wait until quota resets (usually monthly)
- Enable billing for higher limits
Related: Understanding Provider Limits
Issue: Slow generation times (>30 seconds)
Symptoms:
- Generation takes very long to complete
- Sometimes times out completely
Solution:
-
Try a different model
- OpenRouter: Switch to faster model (e.g.,
meta-llama/llama-3-8b-instruct) - OpenAI: Use
gpt-3.5-turboinstead ofgpt-4 - Gemini: Use
gemini-1.5-flashinstead ofgemini-1.5-pro
- OpenRouter: Switch to faster model (e.g.,
-
Check your internet connection and server response time
-
Verify your hosting provider allows outbound API calls
- Contact hosting support if unsure
- Some hosts block external API requests
-
Increase PHP timeout limits if you have server access
- Add to wp-config.php:
set_time_limit(120);
- Add to wp-config.php:
Related: Generation Performance Issues
Provider Comparison: Which to Choose?
Choose OpenRouter if you:
- ✅ Are new to AI content generation
- ✅ Want to test without credit card
- ✅ Need flexibility to try different models
- ✅ Prefer pay-as-you-go pricing
- ✅ Want transparent model pricing
Choose OpenAI if you:
- ✅ Need the highest quality English content
- ✅ Run a professional e-commerce store
- ✅ Value reliability and uptime
- ✅ Can commit to usage-based billing
- ✅ Want the most widely-tested AI models
Choose Gemini if you:
- ✅ Need multi-language support (100+ languages)
- ✅ Want generous free tier quota
- ✅ Prefer Google Cloud infrastructure
- ✅ Need fast generation speeds
- ✅ Are already using Google Cloud services
Next Steps
Now that your AI provider is configured:
Immediate Actions:
- Generate your first description - Complete the 5-minute quick start
- Customize prompt settings - Control writing style and tone
- Try different models - Compare model quality and speed
Advanced Configuration:
- Switch between providers - Change provider anytime
- Use custom variables - Include product specs automatically
- Monitor usage and costs - Track API consumption
Related Topics
- Installation Guide - Plugin installation instructions
- Quick Start Guide - Generate your first description
- Settings Configuration - Complete settings reference
- AI Models Comparison - Detailed model information
- Troubleshooting - Common issues and solutions
Installation Guide
Install AI Product Tools for WooCommerce in under 5 minutes with this step-by-step guide covering requirements, installation, and verification
Quick Start: Your First AI Description in 5 Minutes
Generate and apply your first AI-powered product description in 5 minutes with this beginner-friendly step-by-step guide.