Getting Your API Keys
WP-AutoInsight connects directly to the AI providers. You bring the key, the plugin uses it on your site, and you pay the provider directly.
Direct Connection: Unlike other plugins, you pay the AI providers directly for only what you use. This guide shows you how to get those keys safely.
Before you choose a provider
Section titled “Before you choose a provider”You do not need every provider. Most users start with one text provider and optionally one image provider.
- OpenAI: Strong general-purpose writing and image generation.
- Claude: Good for polished writing and analytical drafts.
- Gemini: Fast and cost-effective for larger volumes.
- Perplexity: Best when you want web-grounded answers and visible citations.
- Stability AI: Optional image provider if you want an alternative to OpenAI and Gemini images.
1. OpenAI (GPT-4, DALL-E)
Section titled “1. OpenAI (GPT-4, DALL-E)”OpenAI is the most popular choice for versatile writing and high-quality images.
- Go to the OpenAI API Dashboard.
- Sign up or log in.
- Click “Create new secret key”.
- Give it a name like “WordPress Plugin” and copy the key immediately (it won’t be shown again).
- Note: You must add a small amount of credit (e.g., $5) to your OpenAI account for the key to work.
2. Anthropic (Claude)
Section titled “2. Anthropic (Claude)”Claude is famous for its natural, human-like writing style and advanced reasoning.
- Visit the Anthropic Console.
- Create an account and verify your email.
- Navigate to the “API Keys” section.
- Click “Create Key” and copy it to your clipboard.
3. Google (Gemini)
Section titled “3. Google (Gemini)”Gemini is often the fastest and most budget-friendly option for high-volume content.
- Go to Google AI Studio.
- Sign in with your standard Google account.
- Click “Create API key”.
- Choose a project (or create a new one) and copy your key.
4. Perplexity (Live Research)
Section titled “4. Perplexity (Live Research)”Use Perplexity if you need your posts to include real-time web data and clickable citations.
- Visit the Perplexity API Settings.
- Ensure you have a Perplexity Pro subscription or credits in your API account.
- Click “Generate” under the API Key section.
5. Stability AI (Image Generation)
Section titled “5. Stability AI (Image Generation)”Use Stability AI as an alternative image provider for Featured Images and Infographics.
- Go to Stability AI API Keys.
- Create an account and add credits to your account.
- Click “Create API Key” and copy it.
- Enter it in WP-AutoInsight > Advanced Settings under “Image Settings.”
Where to put your keys
Section titled “Where to put your keys”Once you have a key, there are three practical ways to use it:
- Onboarding Wizard: Best for first-time setup.
- WP-AutoInsight > Connections > API Keys: The main place for day-to-day configuration and choosing which model to use.
- wp-config.php or WordPress Connectors: Best for agencies, staging environments, or security-conscious setups.
Advanced: Use wp-config.php
Section titled “Advanced: Use wp-config.php”For maximum security, you can define your keys in your site’s wp-config.php file. The plugin supports constants for all providers:
define('OPENAI_API', 'your-openai-key');define('GEMINI_API', 'your-gemini-key');define('CLAUDE_API', 'your-anthropic-key');define('PERPLEXITY_API', 'your-perplexity-key');define('STABILITY_API', 'your-stability-key');WordPress 7.0+ Note: If you use the native WordPress Connectors screen, the convention is different: OPENAI_API_KEY, ANTHROPIC_API_KEY, and GOOGLE_API_KEY. WP-AutoInsight supports both naming styles automatically.
Which key wins if more than one exists?
Section titled “Which key wins if more than one exists?”The plugin checks credentials in this order:
- WordPress Connectors, if available on the site.
wp-config.phpconstants.- Keys saved in the plugin settings.
That means a technical team can define keys centrally while content editors still use the plugin normally.
How the plugin handles providers in 4.0
Section titled “How the plugin handles providers in 4.0”In version 4.0, the plugin uses a shared provider registry behind the scenes. For most users, the benefit is simple: model lists, validation, image support, and connection rules stay more consistent across the dashboard and settings screens. You can see the health of each connection (Verified, Stale, or Failed) directly on the main Dashboard.