AI Product Tools Documentation
Getting Started

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:

FeatureOpenRouterOpenAIGoogle Gemini
Best ForGetting started, testingHigh-quality English contentMulti-language, cost efficiency
Setup Time3 minutes5 minutes4 minutes
Free Tierqwen/qwen3-8b:free model❌ $5 credit (requires card)✅ Limited free quota
PricingFree + paid options$0.002/1K tokensFree tier + competitive rates
Credit Card❌ Not required✅ Required after trial❌ Not required initially
Models Available100+ modelsGPT-4o, GPT-4 Turbo, GPT-3.5Gemini Pro, Gemini Flash
QualityGood (varies by model)ExcellentExcellent
SpeedFastFastVery 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.


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

  1. Visit openrouter.ai ↗

  2. Click Sign Up in the top-right corner

  3. Register with your email address

    • Enter your email
    • Create a password
    • Verify your email address (check spam folder if needed)
  4. Sign in to your new OpenRouter account

OpenRouter sign-up page

Step 2: Generate API Key

  1. Navigate to the API Keys section

    • Click your profile icon in top-right
    • Select API Keys from the dropdown
  2. 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.

OpenRouter API key generation interface

Step 3: Configure in AI Product Tools

  1. Navigate to Products → AI Product Tools → Settings in WordPress admin

  2. Select "OpenRouter" from the AI Provider dropdown

  3. Paste your API key into the "OpenRouter API Key" field

  4. Select a model from the dropdown

    • For free testing: Select qwen/qwen3-8b:free
    • For better quality: Select openai/gpt-3.5-turbo or similar paid model
  5. Click Save Settings

  6. Wait for validation confirmation (green checkmark appears)

Settings page with OpenRouter configured successfully

✓ 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

  1. Visit platform.openai.com ↗

  2. Click Sign up

  3. Register with email or Google account

    • Enter email and create password (or use Google)
    • Verify email address
    • Complete phone number verification (required)
  4. Sign in to OpenAI Platform

OpenAI platform sign-up page

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.

  1. Navigate to Billing section

    • Click your profile → Settings → Billing
  2. Add payment method

    • Click Add payment method
    • Enter credit card information
    • Set up auto-recharge (optional)
  3. Set usage limits (recommended)

    • Navigate to Usage limits
    • Set monthly limit (e.g., $10, $20, $50)
    • Enable email notifications at 50%, 75%, 90%

OpenAI billing settings with usage limits

Step 3: Generate API Key

  1. Navigate to API Keys

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

  1. Go to Products → AI Product Tools → Settings

  2. Select "OpenAI" from AI Provider dropdown

  3. Paste API key into "OpenAI API Key" field

  4. Select a model:

    • Budget: gpt-3.5-turbo ($0.002/1K tokens)
    • Balanced: gpt-4o-mini
    • Premium: gpt-4o or gpt-4-turbo
  5. 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

  1. Visit aistudio.google.com/app/apikey ↗

  2. Sign in with your Google account

    • Use existing Google account or create new one
  3. Accept terms of service for Google AI Studio

Google AI Studio welcome page

Step 2: Create Google Cloud Project

  1. Click Get API Key

  2. Create a new project or select existing

    • Project name: "AI Product Tools" (or your store name)
    • Organization: Leave default or select your organization
  3. Enable Gemini API for the project

    • This happens automatically when creating API key

Step 3: Generate API Key

  1. Click Create API Key in existing project

  2. Copy the generated API key

    • Starts with AIza...
    • Store securely
Example format: AIzaSyABC123DEF456GHI789JKL012MNO345...

Gemini API key generation interface

Step 4: Configure in AI Product Tools

  1. Navigate to Products → AI Product Tools → Settings

  2. Select "Gemini" from AI Provider dropdown

  3. Paste API key into "Gemini API Key" field

  4. Select a model:

    • Fast & Free: gemini-1.5-flash
    • Balanced: gemini-1.5-pro
  5. 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

  1. Go to Products → All Products

  2. Edit any product

  3. Find AI Product Tools metabox in sidebar

  4. Click Generate Description

  5. 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:

  1. Verify you copied the complete API key (no extra spaces or line breaks)

  2. Check the key format matches your provider:

    • OpenRouter: sk-or-v1-...
    • OpenAI: sk-...
    • Gemini: AIza...
  3. 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
  4. Re-generate a new API key if the current one doesn't work

  5. 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:

  1. Check your account balance at openrouter.ai
  2. Add credits if using paid models
  3. Switch to free model (qwen/qwen3-8b:free) for testing

For OpenAI:

  1. Verify billing is configured at platform.openai.com/settings/billing
  2. Check usage limits haven't been reached
  3. Add payment method or increase limits

For Gemini:

  1. Check free tier quota at console.cloud.google.com
  2. Wait until quota resets (usually monthly)
  3. 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:

  1. Try a different model

    • OpenRouter: Switch to faster model (e.g., meta-llama/llama-3-8b-instruct)
    • OpenAI: Use gpt-3.5-turbo instead of gpt-4
    • Gemini: Use gemini-1.5-flash instead of gemini-1.5-pro
  2. Check your internet connection and server response time

  3. Verify your hosting provider allows outbound API calls

    • Contact hosting support if unsure
    • Some hosts block external API requests
  4. Increase PHP timeout limits if you have server access

    • Add to wp-config.php: set_time_limit(120);

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:

Advanced Configuration: