API Provider Setup
Configure your AI providers to power content generation in AI Product Tools.
To generate content with AI Product Tools, you need to connect the plugin to an AI provider. We support four major providers, each offering different strengths in terms of quality, speed, and cost. This guide will help you set up your preferred provider and securely store your API keys.
API keys are stored encrypted using AES-256 encryption within your WordPress database, ensuring your credentials remain secure and protected from unauthorized access.
Choosing the Right Provider for Your Store
Before you begin the setup, it is helpful to understand the differences between the supported providers. You can choose one based on your specific needs, such as budget, language support, or writing quality. Many store owners start with one and switch as their needs evolve.
- OpenAI: Generally considered the industry standard for high-quality English content. It is excellent for creative and persuasive writing.
- Google Gemini: Offers excellent value and very fast generation speeds. It is particularly strong in multi-language support and processing large amounts of data.
- OpenRouter: Best for flexibility, as it allows you to access many different models through one account. It is great for testing different AI technologies.
- Claude: Known for its sophisticated and nuanced writing style, perfect for luxury, technical, or highly detailed products.
Supported Providers and Detailed Setup Instructions
You can configure one or more of the following providers. Once configured, you can easily switch between them in the plugin settings to compare results and find the best fit for your brand.
1. OpenAI Setup
OpenAI is the most versatile provider, offering a wide range of models suitable for almost any content generation task. It is particularly strong in creative writing and following complex instructions.
- Where to get your key: Visit the OpenAI Platform and create an account. Once logged in, navigate to the API Keys section in your dashboard to generate a new secret key.
- Key Format: Your key will start with
sk-followed by a long string of characters. - Models: Supports GPT-4.1, GPT-5.2, and the O3/O4 series. These models are highly capable and produce professional results.
- Pricing: OpenAI uses a pay-as-you-go model based on tokens (roughly words). You will need to add a credit card to your OpenAI account to use the API beyond any initial free credits.
- Best For: Users who want the most versatile AI with a wide range of model options and top-tier writing quality.
- How to enter: Go to AI Product Tools > Settings > API Configuration, select OpenAI from the dropdown, and paste your key into the field.
2. Google Gemini Setup
Google Gemini is known for its fast generation speeds and excellent value. It is a great choice for high-volume stores that need to process thousands of products quickly without breaking the bank.
- Where to get your key: Visit Google AI Studio and sign in with your Google account. You can create a new API key directly in the dashboard.
- Key Format: Your key will start with
AIzaand is typically shorter than OpenAI keys. - Models: Supports Gemini 3 Pro and the Flash series. The Flash models are optimized for speed and cost-efficiency.
- Pricing: Google offers a generous free tier for Gemini, making it one of the most cost-effective options for smaller stores. Paid tiers are also available for higher volume.
- Best For: Fast content generation, multi-language support, and great overall value for large catalogs.
- How to enter: Go to AI Product Tools > Settings > API Configuration, select Google Gemini, and paste your key.
3. OpenRouter Setup
OpenRouter acts as a bridge, giving you access to multiple AI providers (including OpenAI, Anthropic, and Meta) through a single API. This is perfect for users who want to experiment with different models without creating multiple accounts.
- Where to get your key: Visit OpenRouter and create an account. You can generate an API key from your account settings page.
- Key Format: Your key will start with
sk-or-. - Models: Provides access to dozens of models from various providers, including free models for testing.
- Pricing: OpenRouter uses a unified credit system. You add credits to your OpenRouter account, and they are used regardless of which model you choose.
- Best For: Flexibility and trying out different AI models through one interface without managing multiple subscriptions.
- How to enter: Go to AI Product Tools > Settings > API Configuration, select OpenRouter, and paste your key.
4. Claude (Anthropic) Setup
Claude is highly regarded for its nuanced writing style and ability to follow complex instructions. It often produces content that feels more "human" and less robotic than other models, making it a favorite for high-end brands.
- Where to get your key: Visit the Anthropic Console and create an account. You can generate an API key in the settings area.
- Key Format: Your key will start with
sk-ant-. - Models: Supports Claude Sonnet 4, Opus, and Haiku. Opus is the most powerful, while Haiku is the fastest and most affordable.
- Pricing: Anthropic uses a usage-based pricing model similar to OpenAI. You will need to add credits to your account to use the API.
- Best For: Nuanced writing, highly detailed product content, and technical descriptions that require a high degree of accuracy.
- How to enter: Go to AI Product Tools > Settings > API Configuration, select Claude, and paste your key.
Model Comparison Table
Choosing the right model within a provider is just as important as choosing the provider itself. Here is a quick comparison of the most popular models:
| Model Name | Provider | Best For | Speed |
|---|---|---|---|
| GPT-4o | OpenAI | High-quality, creative content | Fast |
| GPT-4o-mini | OpenAI | Cost-effective, simple tasks | Very Fast |
| Gemini 1.5 Pro | Complex reasoning, large context | Fast | |
| Gemini 1.5 Flash | High-volume, fast generation | Instant | |
| Claude 3.5 Sonnet | Anthropic | Balanced quality and speed | Fast |
| Claude 3 Opus | Anthropic | Maximum quality, complex logic | Moderate |
Detailed Configuration Steps
Follow these steps to finalize your API setup and ensure a stable connection between your store and the AI models:
- Access Settings: Navigate to AI Product Tools > Settings > API Configuration in your WordPress dashboard.
- Select Provider: Choose your preferred provider from the dropdown menu. This will reveal the specific fields for that provider.
- Paste the Key: Carefully paste your API key into the corresponding field. Make sure there are no extra spaces at the beginning or end.
- Save Settings: Click the Save Settings button at the bottom of the page to store your key securely.
- Validate Connection: Click the Validate API Key button. The plugin will send a small test request to the provider to ensure the key is active and working.
- Set Default Model: Once validated, you can select which specific model (e.g., GPT-4o or Gemini Flash) should be used by default for your generation tasks.
- Configure Parameters: You can also adjust advanced parameters like "Temperature" (creativity) and "Max Tokens" (length) if you want more control over the output.
- Test Generation: After saving, go to any product and try generating a description to confirm everything is working as expected.
- Switching Providers: You can repeat these steps for multiple providers and switch between them using the "Default Provider" dropdown.
Tip: You can configure multiple providers and switch between them at any time. This is useful if one provider is experiencing downtime or if you want to use different models for different types of content (e.g., Claude for descriptions and Gemini for titles).
API Key Security Best Practices
Your API keys are like passwords to your AI accounts. It is important to keep them secure:
- Never Share Keys: Do not share your API keys with anyone or post them in public forums.
- Use Restrictions: If your provider allows it, restrict your API key to only be usable from your server's IP address.
- Rotate Keys Regularly: For maximum security, consider generating new API keys every few months and updating them in the plugin settings.
- Monitor Usage: Regularly check your provider's dashboard for any unusual activity or unexpected charges.
- Delete Unused Keys: If you switch providers, delete the old API keys from the provider's dashboard to minimize risk.
- Use Environment Variables: For advanced users, you can store your keys in environment variables for an extra layer of security.
Troubleshooting API Keys
If your API key is not validating or you are seeing errors during generation, check the following common issues:
- Copy-Paste Errors: This is the most common issue. Double-check that you have copied the entire key and that no characters were missed.
- Account Balance: Most providers require you to have a positive balance or a valid payment method on file. Even if you have free trial credits, some models may require a paid account.
- Key Permissions: Ensure that your API key has "Read" and "Write" permissions and is not restricted to a specific IP address that differs from your server's IP.
- Model Availability: Some newer models (like GPT-5 or Claude Opus) may require you to be in a specific usage tier or have a history of successful payments with the provider.
- Server Firewall: If validation fails repeatedly, your server might be blocking outgoing requests to the provider's API. Contact your hosting support to ensure that connections to
api.openai.com,api.anthropic.com, etc., are allowed. - Rate Limits: If you are generating content very quickly, you might hit the provider's rate limits. Try slowing down or upgrading your account tier with the provider.
Security and Privacy
We understand that your API keys are sensitive. AI Product Tools takes several measures to protect them:
- Encryption: All keys are encrypted using industry-standard AES-256-GCM encryption before being saved to the database.
- Server-Side Processing: Your keys are never exposed to your website visitors or sent to our servers. All communication happens directly between your WordPress server and the AI provider.
- Access Control: Only users with administrator privileges can view or modify the API settings in your dashboard.
- No Data Storage: We do not store your product data or generated content on our servers. Everything stays within your own WordPress installation.
Summary of Provider Benefits
| Provider | Best For | Key Strength |
|---|---|---|
| OpenAI | Quality | Versatility and creative writing |
| Gemini | Value | Speed and multi-language support |
| OpenRouter | Flexibility | Access to many models in one place |
| Claude | Nuance | Human-like writing and technical detail |
Conclusion
Setting up your API provider is a one-time task that unlocks the full power of AI Product Tools. Whether you choose the industry-leading quality of OpenAI or the incredible value of Google Gemini, you are now ready to start transforming your WooCommerce store with high-quality, AI-generated content. We recommend starting with one provider and experimenting to see which one works best for your specific products and brand voice.
What's Next?
With your API provider configured and validated, you are now ready to generate your first piece of content. You can start with a single product to see the results or jump straight into bulk operations if you have a large catalog.
