Docs
← Back to site

Connecting OpenAI

2 min readUpdated November 21, 2026

If your site is on WordPress 6.x (rather than 7.0’s built-in AI client), you’ll connect OpenAI directly with your own API key.

Getting an API key#

Go to platform.openai.com/api-keys and create a new key.

Connecting it#

The AI provider settings with OpenAI selected, the model and Test connection.

Go to WP Super Docs → Settings → AI. Under AI Provider (called Override Provider (optional) on WordPress 7):

  1. Set Provider to OpenAI (ChatGPT).
  2. Paste your key into API Key.
  3. Choose a Model. GPT-4o mini is marked as recommended, balancing speed, cost, and quality; GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo, o4-mini, and o3 are also selectable.
  4. Click Save Changes.

Once a key is saved, the field shows a masked placeholder and a green “API key is saved” confirmation. Pasting a new key and saving replaces it; there’s no separate “remove key” button, saving the field empty clears it.

Testing the connection#

Click Test connection. This makes a real request using your saved key and model, so you’ll know immediately if the key is invalid rather than finding out later when a reader tries Ask AI.

How your key is stored#

Your API key isn’t stored in plain text. It’s encoded using your site’s own AUTH_KEY (a security constant from your wp-config.php file) as the cipher, along with a verification hash. This means the same key looks different if your site’s AUTH_KEY ever changes, and WP Super Docs is specifically built to detect that: if your security keys are regenerated (common after a site migration or a security plugin resetting salts), you’ll see a warning telling you to re-enter your API key, rather than a confusing authentication error appearing later.

This encoding isn’t the same as strong encryption, it’s designed to keep the key out of plain sight in your database rather than to withstand a determined attacker with database access. Treat your wp-config.php file with the same care you’d give any other credential store.

Was this helpful?

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only