API Configuration
Learn how to connect your preferred AI providers to AI Product Tools.
The API Configuration section is where you connect the plugin to AI services like OpenAI, Google Gemini, OpenRouter, and Anthropic Claude. You must configure at least one provider to start generating content.
Accessing API Configuration
To manage your API keys and providers:
- Navigate to AI Product Tools in your WordPress admin sidebar.
- Click on Settings.
- Select the API Configuration tab.
Provider Selection
The plugin supports multiple AI providers. Each provider is displayed as a card showing its name, available models, and current status.
- OpenAI: Access to GPT-4 and GPT-5 models.
- Gemini: Google's high-speed AI models.
- OpenRouter: A unified interface to access various models including Llama and Mistral.
- Claude: Anthropic's models known for high-quality writing.
To select a provider as your default, click on its card. The plugin will use the selected provider for all generation tasks as long as it has a valid API key.
If your active provider's API key becomes invalid or expires, the plugin will automatically attempt to switch to the next available provider with a valid key.
Managing API Keys
Each provider requires a unique API key to function.
How to add an API key:
- Click the provider card you wish to configure.
- Locate the API Key field.
- Enter your key. You can use the eye icon to show or hide the characters.
- Click Save Settings at the bottom of the page.
Key Format Hints:
- OpenAI: Usually starts with
sk-... - Gemini: Usually starts with
AIza... - OpenRouter: Usually starts with
sk-or-... - Claude: Usually starts with
sk-ant-...
If you do not have an API key, use the Get API Key link provided under each field to visit the provider's official console and create one.
Security and Validation
The plugin takes security seriously:
- Encryption: All API keys are stored using AES-256 encryption to protect your credentials.
- Validation: The system automatically sanitizes inputs, removes accidental spaces, and limits keys to 300 characters to prevent errors.
- Status Indicators: A "Configured" badge will appear on provider cards once a valid key is saved.
Never share your API keys with anyone. If you suspect a key has been compromised, revoke it in the provider's console and generate a new one immediately.
Auto-Switching Logic
If you remove the API key for your currently active provider, the plugin will automatically look for another configured provider. This ensures your bulk generation jobs and chatbot remain functional even if one service is disconnected.
What's Next?
Now that your API is connected, you can configure your Content Settings to match your brand's voice.
