---
title: Generate your SEO and social metadata with OpenAI and SEOPress PRO
url: "https://www.seopress.org/support/guides/generate-your-seo-metadata-with-openai/"
lang: en-US
updated: 2026-01-28
---

# Generate your SEO and social metadata with OpenAI and SEOPress PRO

You can automagically generate your SEO title, meta description, Open Graph and X cards tags based on your post content.

To do this, an OpenAI account is required.

## Register to OpenAI

The first step is to sign in for free at [OpenAI.com website](https://openai.com/api/login/).

Once done, go to your **Dashboard** > [**API Keys page**](https://platform.openai.com/api-keys) to generate your first **OpenAI API key** by clicking **Create new secret key** button.

[![OpenAI keys - SEOPress](https://www.seopress.org/wp-content/uploads/2023/01/open-ai-keys-scaled.png)](https://www.seopress.org/wp-content/uploads/2023/01/open-ai-keys-scaled.png)

*OpenAI keys – SEOPress*

From the modal, enter a **Name** to quickly identify your key from the keys list. Select a **Project** and click **Create secret key** button.

[![Create new OpenAI key](https://www.seopress.org/wp-content/uploads/2023/01/openai-create-new-key.png)](https://www.seopress.org/wp-content/uploads/2023/01/openai-create-new-key.png)

*Create new OpenAI key*

**Copy** the key.

## What information is sent to OpenAI?

To get better results and maximize our chance to have a relevant answer from the AI, we send:

- your **post content **(if not possible your post URL),
- your **post language**,
- your **target keywords** (and we ask to put at least one of them in the SEO metadata in return).

For alt text, we send the **image file URL** only.

Note that we can’t fully control the provided answers by OpenAI.

## Enable AI in SEOPress

**Login** to your **WordPress admin**.

Go to **SEO**, **PRO**, **AI** tab.

If it’s not the case, **activate** the **AI** feature by clicking the** iOS toggle**.

Then **paste** the **OpenAI key** in the dedicated field.

**Save changes**.

### Add my OpenAI key to wp-config.php

SEOPress PRO 6.9 is required for this.

By adding this code below:

`define( 'SEOPRESS_OPENAI_KEY', 'XXXXXXX' );`

You will store your OpenAI key in your **wp-config.php** file instead of your database. This is more efficient on a multisite network for example but also more secured.

[![SEOPress OpenAI settings](https://www.seopress.org/wp-content/uploads/2023/08/seopress-open-ai-settings.png)](https://www.seopress.org/wp-content/uploads/2023/08/seopress-open-ai-settings.png)

*SEOPress OpenAI settings*

## Generate your title and meta description with AI

Now let’s try to make our first call to the **AI**. Edit the post, page or post type of your choice with **Classic Editor** or the **Block Editor** (Gutenberg).

Scroll down to the **SEO metabox**.

You will see two new buttons from the **Titles settings** tab called “**Generate meta title with AI**” and “**Generate meta description with AI**“.

Click on it.

Wait a few seconds and boom your title and meta description are automatically generated based on your post content.

Adjust the values if necessary, and that’s it!

[![Generate SEO metadata with AI and SEOPress](https://www.seopress.org/wp-content/uploads/2023/09/generate-seo-metadata-with-ai-seopress.png)](https://www.seopress.org/wp-content/uploads/2023/09/generate-seo-metadata-with-ai-seopress.png)

*Generate SEO metadata with AI and SEOPress*

## Generate SEO metadata in bulk

Go to your post types list, select a few posts, then from the bulk actions select, choose **Generate meta title with AI** and click **Apply**.

Wait some seconds, the page refresh and voilà!

Do the same for meta description.

Note that depending on the amount of posts selected it can take a certain amount of time to get your metadata generated. Be patient!

[![SEOPress AI bulk actions](https://www.seopress.org/wp-content/uploads/2023/01/seopress-ai-bulk-actions.jpg)](https://www.seopress.org/wp-content/uploads/2023/01/seopress-ai-bulk-actions.jpg)

*SEOPress AI bulk actions*

## Use WP CLI & AI to generate SEO metadata

If you’re a developer, you will love this feature! Learn more about this in [our dedicated guide to CLI & AI](https://www.seopress.org/support/guides/seopress-wp-cli/#generate-seo-metadata-title-meta-description-with-ai-and-cli).

## Generate alternative texts for your images files

Follow this [guide to automatically create alt texts when you upload images](https://www.seopress.org/support/guides/generate-alternative-texts-for-your-images-with-openai-and-seopress-pro/) to the WordPress library.

## Common errors

Go to **SEO**, **PRO**, **AI** tab, and click **Check OpenAI key** button to check the status of your key. It will help you understand any issue.  

There is also a log error section from **SEO**, **PRO**, **AI** tab to better understand any issue encountered.

### 400 error – Firewall?

If you use a firewall, make sure to **whitelist openai.com domain name** from your settings.

Using 6G/7G/8G firewall can block OpenAI website. Disable it or whitelist the domain name.

### 401 error

- Make sure you have entered an **OpenAI API key (NOT a Chat-GPT key) ** to **SEO**, **PRO**, **AI** tab, **OpenAI API key** field.
- Make sure your key is correctly entered.

### 429 error

- Make sure your OpenAI API key has not expired from your [OpenAI account](https://platform.openai.com/account/api-keys).
- You’re using a ChatGPT subscription instead of an OpenAI key.
- OpenAI is temporary down.
- You’re sending too much requests, just slow down.
- Your key has not been replaced by your web-browser with **autocompletion** feature when saving other options from **SEO**, **PRO**.
- **Your free trial has expired, check the [Usage page](https://platform.openai.com/account/usage) to see if it’s the case.**

Using the OpenAI key requires that you have a credit balance in your account. This might come from a free trial, or you may have to purchase credit to add to your account. If you do not have a balance, the API will generate an error when trying to verify the key or use the key to generate metadata.

Learn more from the [official website](https://platform.openai.com/docs/guides/error-codes/api-errors).

### Invalid image?

Make sure your site is accessible, it means, OpenAI must be able to read/request your media files to analyze them:

- no IP restriction;
- no authentification (like htpasswd);
- not a local website.

### Requirements for GPT-4/5 Vision

If you have selected this model, make sure to have at least made a **$5 payment** to OpenAI platform before using it.
