Skip to content Skip to navigation

Generate SEO and social metadata with Google Gemini AI

SEOPress PRO 9.5 is required.

Register to Google Gemini

The first step is to create an account on Google AI Studio website.

We strongly invite you to register a credit card to avoid any errors from your Google Cloud Console account.

Go to this link to check your usage.

Create your API key

From Google AI Studio left panel, click on Dashboard, API keys link.

Click Create API key button.

Enter a name for your API key and assigned a project.

Modal to create a new Google Gemini API key
Modal to create a new Google Gemini API key

Click Create key button.

From the API keys list, click the Copy icon.

What information is sent to Google Gemini AI?

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).
Note that we can’t fully control the provided answers by Google Gemini AI.

Enable Gemini in SEOPress

Go to SEO, PRO, AI tab.

Select Gemini from AI provider option.

Paste the key to Gemini API key field.

Save changes.

AI settings - SEOPress PRO
AI settings – SEOPress PRO

Add my Google Gemini AI key to wp-config.php

By adding this code below:

define( 'SEOPRESS_GEMINI_KEY', 'XXXXXXX' );

You will store your Gemini API 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.

Generate SEO and social metadata with AI

Now you have linked your Google Gemini AI account with your WordPress site, you can use AI to:

Common errors

Quickly test your Gemini API key by going to SEO, PRO, AI tab.

Then from Gemini section, click Test API key button.

Wait a few seconds to get a positive or negative answer from Google Gemini server.

From the AI Logs section (SEO, PRO, AI tab), you will see the messages returned by the AI used.

401 – Invalid API Key

  • What it means: Your Google API key isn’t working
  • How to fix: Check that you’ve entered the correct API key in SEOPress settings

403 – Permission Denied

  • What it means: Your API key doesn’t have access to this feature
  • How to fix: Verify your Google Cloud project has Gemini API enabled and your key has the right permissions

429 – Too Many Requests

  • What it means: You’ve made too many requests too quickly
  • How to fix: Wait a minute and try again. Check your quota limits in Google Cloud Console

400 – Bad Request

  • What it means: There’s something wrong with your request format
  • How to fix: This is usually a plugin issue. Contact SEOPress support if you see this error

500 – Server Error

  • What it means: Something went wrong on Google’s end
  • How to fix: Wait a few moments and try again

503 – Service Unavailable

  • What it means: Gemini’s servers are temporarily unavailable
  • How to fix: Wait 30-60 seconds and retry your request

404 – Model Not Found

  • What it means: The Gemini model you’re trying to use doesn’t exist or isn’t available
  • How to fix: Check that you’re using a valid model name (like gemini-pro or gemini-pro-vision)