API Keys
Generate and manage API keys for connecting WordPress to your account.
Overview
API keys authenticate the WordPress plugin with the Picture Optimizer cloud service. Each key is tied to your user account and inherits your credit balance and plan limits.
Generate a Key
- Log in to your SerpTransformer dashboard
- Navigate to Settings → API Keys
- Click Generate New Key
- Copy the key immediately
The full API key is only shown once at generation time. After that, only a prefix (e.g., sk-...abc) is displayed for identification. If you lose the key, you must generate a new one.
Key Format
API keys follow the format:
The key is hashed and stored server-side. When the WordPress plugin sends a request, the gateway hashes the provided key and matches it against stored hashes.
Using the Key
In WordPress Plugin
Enter the key in Settings → Picture Optimizer → API Key. The plugin includes it as an X-API-Key header on every request to the Flask API gateway.
In Direct API Calls
If you're making API calls programmatically (not through the WordPress plugin), include the key as a header:
Key Management
Multiple Keys
You can generate multiple API keys for different WordPress installations. Each key is independently active and can be deactivated without affecting others.
Deactivating a Key
From Settings → API Keys, click the toggle next to a key to deactivate it. Deactivated keys immediately stop working — any WordPress plugin using that key will receive authentication errors.
Deleting a Key
Deleted keys are permanently removed and cannot be recovered. Generate a new key if needed.
Security Best Practices
- Never commit API keys to version control
- Use different keys for staging and production WordPress sites
- Rotate keys periodically
- Deactivate keys for sites you no longer manage
- The API key is stored encrypted in the WordPress
wp_optionstable
