AI Product Tools Documentation Logo
AI Product ToolsDocumentation
Getting Started

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)
  1. Visit OpenAI Platform

  2. Complete Registration

    • Enter email and create password
    • Verify email address
    • Complete phone verification
  3. Account Verification

    • Provide necessary verification documents
    • Wait for account approval (usually instant)

Step 2: Generate API Key

  1. Navigate to API Keys

    • Click your profile in top-right corner
    • Select View API keys
    • Or go directly to API keys section
  2. 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
  3. Key Format

    • OpenAI keys start with sk-
    • Example: sk-1234567890abcdef...
    • Store securely - treat like a password

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
  1. Add Payment Method

    • Go to Billing section
    • Click Add payment method
    • Enter credit card information
  2. Set Usage Limits

    • Navigate to Usage limits
    • Set monthly spending limit (recommended: start with $20-50)
    • Enable email alerts
  3. Review Pricing

    • Check current model pricing
    • Understand token-based billing
    • Consider volume discounts for high usage

Step 4: Configure in Plugin

  1. Access Plugin Settings

    • Go to AI Product ToolsSettings
    • Click API Settings tab
  2. Select OpenAI Provider

    • Choose "OpenAI" from provider dropdown
    • Interface updates to show OpenAI options
  3. Enter API Key

    • Paste your API key in the field
    • Click Save Settings
    • Wait for connection test (green checkmark = success)
  4. 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
  1. Visit Google AI Studio

  2. Sign In

    • Use existing Google account
    • Or create new Google account if needed
  3. Accept Terms

    • Review and accept terms of service
    • Confirm country/region settings

Step 2: Generate API Key

  1. Access API Key Section

    • Click Get API Key button
    • Or navigate to API keys in settings
  2. Create Project (if needed)

    • Create new Google Cloud project
    • Or select existing project
    • Follow project setup wizard
  3. Generate Key

    • Click Create API Key
    • Choose project for the key
    • Copy the generated key immediately
  4. Key Management

    • Keys don't expire automatically
    • Can be regenerated if compromised
    • Set up restrictions if needed

Step 3: Configure Quotas and Billing

  1. Review Free Quotas

    • Check monthly free allowances
    • Understand rate limits
    • Monitor usage patterns
  2. Set Up Billing (Optional)

    • Add billing account for usage beyond free tier
    • Set budget alerts
    • Configure spending controls

Step 4: Configure in Plugin

  1. Select Gemini Provider

    • In plugin settings, choose "Google Gemini"
    • Interface updates for Gemini options
  2. Enter API Key

    • Paste Gemini API key
    • Save and test connection
  3. Select Model

    • Choose from available Gemini models
    • Consider speed vs. quality needs

OpenRouter Setup

Step 1: Create OpenRouter Account

  1. Visit OpenRouter

  2. Registration

    • Create account with email
    • Verify email address
    • Complete profile setup

Step 2: Get API Key

  1. Navigate to Keys

    • Go to Keys section in dashboard
    • Click Create Key
  2. Configure Key

    • Set key name and permissions
    • Choose usage limits
    • Generate and copy key

Step 3: Add Credits

  1. Purchase Credits
    • Go to Credits section
    • Add funds to account
    • Various payment methods supported

Step 4: Configure in Plugin

  1. Select OpenRouter
    • Choose "OpenRouter" as provider
    • Enter API key and save

Provider Comparison and Recommendations

Cost Comparison

ProviderFree TierPaid PricingBest For
OpenAI$5 credit$0.01-0.06/1K tokensPremium quality content
GeminiGenerous monthly quota$0.001-0.01/1K tokensCost-effective bulk generation
OpenRouterLimited free usageVaries by modelModel 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

  1. Set Up Alerts

    • Configure spending alerts
    • Monitor unusual usage patterns
    • Set up rate limit notifications
  2. Regular Reviews

    • Check usage reports monthly
    • Analyze cost vs. benefit
    • Optimize based on patterns
  3. 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

  1. Model Selection

    • Use appropriate models for each task
    • Don't over-engineer for simple needs
    • Test cheaper models first
  2. Prompt Efficiency

    • Keep prompts concise
    • Use variables effectively
    • Avoid unnecessary repetition
  3. Usage Patterns

    • Batch operations when possible
    • Use caching for repeated requests
    • Monitor and adjust strategies

Performance Optimization

  1. Provider Selection

    • Choose fastest models for bulk operations
    • Use premium models for critical content
    • Consider geographic latency
  2. Request Optimization

    • Optimize prompt length
    • Use efficient variable substitution
    • Implement proper error handling

Next Steps

After setting up your API provider: