Agentic Editor
Agentic Editor · Setup

Connect an AI provider

AI Chat needs an AI provider to think with. You create a key on the provider's website, paste it into WordPress once, and you're done. This page walks through it click by click for each provider.

  • WordPress 7.0 or later
  • An administrator account
  • About 5 minutes

1How it fits together

An API key is a long password that lets your site use a provider's AI on your behalf. The provider bills (or counts free usage) against the account that made the key.

Create a key On the provider's website

Sign up, add credit if the provider needs it, and create an API key.

Paste it into WordPress Settings → Connectors

Save the key once. Every plugin that uses WordPress's AI features can share it.

Start chatting Block editor → AI Chat

Open any post and ask AI Chat for a change. There's nothing to set up in the plugin itself.

Treat the key like a password. Anyone who has it can spend your credit. Only paste it into your own site, and never into an email, chat or support forum.

2Choose a provider

Any one of these is enough. If you're not sure, start with Google Gemini: it takes the fewest steps and needs no credit card.

A ChatGPT, Claude or Gemini subscription is not the same as API access.

Paying $20 a month for ChatGPT Plus or Claude Pro doesn't give your website any credit. The API is billed separately, on the provider's developer site, even if you sign in with the same account.

3Google Gemini

  • Free tier
  • No card needed
  • About 2 minutes
  • Can generate images
  1. Sign in with Google
  2. Create API key
  3. Copy
  4. Install & paste in WordPress
  1. Open Google AI Studio.Go to aistudio.google.com/apikey and sign in with any Google account, such as your Gmail.
  2. Accept the terms.The first time, Google asks you to agree to its terms of service. Tick the boxes and continue.
  3. Click Create API key.Google may already have made one for you. If a key is listed, you can use that one.
  4. Copy the key.Click the copy button next to it. Keep this tab open until you've pasted it into WordPress.
  5. Connect it in WordPress.Under Settings → Connectors, click Install next to Google, then paste the key. This installs the official AI Provider for Google plugin. See how.
Illustration. The page may look a little different for you, but the button names are the same.

On the free tier Google may use what you send to improve its products, and there are daily usage limits. For client sites, or for heavier use, set up billing in AI Studio to move to the paid tier, which lifts the limits and keeps your content out of Google's training.

4OpenAI

  • Card and $5 minimum
  • About 5 minutes
  • Can generate images
  1. Sign up
  2. Add $5 credit
  3. Create secret key
  4. Copy
  5. Install & paste in WordPress
  1. Open the OpenAI Platform.Go to platform.openai.com and sign up or log in. Your ChatGPT login works here, but the billing is separate.
  2. Add credit.Open Settings → Billing, click Add payment details, enter a card and buy credit. The minimum is $5, which covers a lot of chatting.
  3. Decide on auto recharge.OpenAI offers to top up automatically when credit runs low. Leave it off if you'd rather have a hard ceiling on spending.
  4. Create a key.Go to platform.openai.com/api-keys, click Create new secret key, name it after your site, and click Create secret key.
  5. Copy it now.The key starts with sk- and is shown only once. If you close the window first, just delete it and make another.
  6. Connect it in WordPress.Under Settings → Connectors, click Install next to OpenAI, then paste the key. This installs the official AI Provider for OpenAI plugin. See how.
Step 2: buy a small amount of credit first. Keys won't answer until there's a balance.
Step 5: copy before you click Done.

5Anthropic (Claude)

  • Prepaid credit required
  • About 6 minutes
  1. Sign up
  2. Name your organization
  3. Buy credits
  4. Create key
  5. Copy
  6. Install & paste in WordPress
  1. Open the Claude Console.Go to platform.claude.com and sign up. This is the developer side of Claude, separate from a Claude.ai subscription.
  2. Answer the welcome questions.You'll be asked for an organization name and how you plan to use the API. Your business or site name is fine, and “Just me” is a fine answer.
  3. Buy credits.Open Settings → Billing, add a card and buy a small amount of credit. Keys won't work until there's a balance.
  4. Create a key.Open Settings → API keys and click Create key. Name it after your site. Leave the other options as they are unless you know you need them.
  5. Copy it now.The key starts with sk-ant- and is shown only once.
  6. Connect it in WordPress.Under Settings → Connectors, click Install next to Anthropic, then paste the key. This installs the official AI Provider for Anthropic plugin. See how.
Step 4: a name you'll recognize later is all it needs.
Step 5: copy it before closing.

Anthropic doesn't make images, so AI Chat's image generation isn't offered with this provider alone. Everything else works.

6OpenRouter

  • Free models available
  • No card to start
  • Needs a plugin

OpenRouter is a go-between. One OpenRouter key reaches models from OpenAI, Anthropic, Google, Mistral and many others, with one bill. It's handy if you want to try different models without opening several accounts.

  1. Sign up
  2. Create key
  3. Copy
  4. Install plugin
  5. Paste in WordPress
  1. Create an account.Go to openrouter.ai and sign up with Google, GitHub or email.
  2. Create a key.Open openrouter.ai/settings/keys and click Create key. Give it a name. You can also set a credit limit for this key, which is a good safety net.
  3. Copy it now.The key starts with sk-or- and is shown only once.
  4. Add credit when you're ready.Free models work without paying, but they're slower and have tight daily limits. For everyday use, add a few dollars under Credits.
  5. Install the OpenRouter plugin.OpenRouter isn't on the Connectors screen until you add it. In Plugins → Add New Plugin, search for AI Provider for OpenRouter by Jonathan Bossenger, then install and activate it.
  6. Paste the key into WordPress.Under Settings → Connectors, choose OpenRouter. See how.
Step 2: a per-key credit limit caps what this site can ever spend.

AI Chat does its work by calling editor tools, and not every model on OpenRouter supports tools well, especially free ones. If the chat replies but never changes the post, add credit so a stronger model can be used.

7Mistral

  • Free mode
  • No card needed
  • Needs a plugin
  1. Sign up
  2. Choose Free mode
  3. Create key
  4. Copy
  5. Install plugin
  6. Paste in WordPress
  1. Open Mistral Studio.Go to console.mistral.ai and create an account.
  2. Choose Free mode.When asked for a plan, pick the free option. No card is needed. You can upgrade later if you hit the limits.
  3. Create a key.In the left sidebar choose API Keys, then Create new key. Name it, pick an expiration date, and for connector access choose Shared connectors only. Click Create new key.
  4. Copy it now.The full key appears only once.
  5. Install the Mistral plugin.Mistral isn't on the Connectors screen until you add it. In Plugins → Add New Plugin, search for AI Provider for Mistral by Lauri Saarni, then install and activate it.
  6. Paste the key into WordPress.Under Settings → Connectors, choose Mistral. See how.
Step 3: WordPress doesn't need Mistral's connectors, so the narrower choice is safer.

When the key expires, AI Chat stops answering. Put a reminder in your calendar, or create a new key and paste it in before the date.

8Add the key to WordPress

This part is the same for every provider, and you only do it once per site.

  1. Go to Settings → Connectorsin wp-admin. You need to be an administrator to see it.
  2. Click Install next to your provider.Google, OpenAI and Anthropic are always listed, and Install adds their official plugin in one click. OpenRouter and Mistral show up here once you've installed their plugin from the table below.
  3. Paste the key and save.Paste into the API key field and save. Once saved, WordPress hides the key so it can't be read back from the screen.
  4. Check it worked.Open any post, click AI Chat in the top toolbar, and ask “Summarize the blocks in this post.” A reply means you're set.
Illustration. Each provider also links to its own key page, in case you skipped ahead.

Provider plugins

Each provider needs its own small plugin. The first three are made by WordPress.org and appear on the Connectors screen automatically. The others come from community developers and are installed from Plugins → Add New Plugin.

ProviderPluginWhere to install it
GoogleAI Provider for Google
by WordPress.org
Install on Settings → Connectors
OpenAIAI Provider for OpenAI
by WordPress.org
Install on Settings → Connectors
AnthropicAI Provider for Anthropic
by WordPress.org
Install on Settings → Connectors
OpenRouterAI Provider for OpenRouter
by Jonathan Bossenger
Plugins → Add New Plugin
MistralAI Provider for Mistral
by Lauri Saarni
Plugins → Add New Plugin

The Connectors screen may also offer to install the AI plugin, WordPress's own set of AI features such as generated excerpts and alt text. Agentic Editor doesn't need it, but both can share the same connection.

You can connect more than one provider. AI Chat picks a capable model from whichever are connected. Image generation is offered when one of them can make images, such as Google or OpenAI.

9Keep costs in check

You pay the provider for what you use, not a monthly fee. A typical AI Chat request costs a fraction of a cent to a few cents, and one message can take several requests while the assistant works. Most sites spend very little, but a spending cap costs nothing to set up.

Google GeminiThe free tier can't charge you. On the paid tier, set a budget alert in your Google Cloud billing account.
OpenAIPrepaid, so you can't spend more than your balance. Keep auto recharge off, or set a monthly limit under Limits.
AnthropicPrepaid credits, so spending stops at your balance. Auto-reload is optional; leave it off for a hard ceiling.
OpenRouterPrepaid credits, plus an optional credit limit on each key.
MistralFree mode can't charge you. Paid plans let you set usage limits in the console.
AI Chat itselfEach person is rate-limited, and a reply stops after a fixed number of steps, so a runaway tab can't run up a bill.

10When it doesn't work

“Invalid API key” or “unauthorized”A character was probably missed. Copy the key again with the provider's copy button rather than selecting it by hand. If the key was only shown once and it's gone, delete it at the provider and create a new one.
Saved fine, but the chat says it can't answerOpenAI and Anthropic keys don't work until the account has credit. Check the billing page and add some.
“Quota exceeded” or “rate limit”You've hit a free tier's daily limit, or a new paid account's starting limit. Wait and try again, add credit, or upgrade the plan.
I pay for ChatGPT Plus or Claude Pro. Why is it asking me to pay?Those subscriptions cover the chat apps only. The API behind this plugin is billed separately on the provider's developer site.
There's no Connectors screenIt arrived in WordPress 7.0. Update WordPress, and make sure you're logged in as an administrator.
OpenRouter or Mistral isn't listedThey need their plugin first: AI Provider for OpenRouter or AI Provider for Mistral. Install and activate it, then reload Settings → Connectors.
The chat answers but never edits the postThe model in use may not support tools well. Try Gemini, OpenAI or Anthropic, or add credit on OpenRouter so a stronger model is used.
I think my key leakedDelete it on the provider's key page right away. It stops working immediately. Create a new one and paste it into Settings → Connectors.

Provider websites change their layouts from time to time. If a button has moved, look for “API keys” in the account or settings menu. Once you're connected, the user guide shows what to do next.