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.
Sign up, add credit if the provider needs it, and create an API key.
Save the key once. Every plugin that uses WordPress's AI features can share it.
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.
- Ease
- Card
- Not needed
- Time
- ~2 min
- WordPress
- One-click
- Ease
- Card
- $5 min.
- Time
- ~5 min
- WordPress
- One-click
- Ease
- Card
- Prepaid
- Time
- ~6 min
- WordPress
- One-click
- Ease
- Card
- Not needed
- Time
- ~3 min
- WordPress
- Community
- Ease
- Card
- Not needed
- Time
- ~5 min
- WordPress
- Community
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
- Sign in with Google
- Create API key
- Copy
- Install & paste in WordPress
- Open Google AI Studio.Go to aistudio.google.com/apikey and sign in with any Google account, such as your Gmail.
- Accept the terms.The first time, Google asks you to agree to its terms of service. Tick the boxes and continue.
- Click Create API key.Google may already have made one for you. If a key is listed, you can use that one.
- Copy the key.Click the copy button next to it. Keep this tab open until you've pasted it into WordPress.
- 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.
••••••••••••••••••••Xa9QCopyOn 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
- Sign up
- Add $5 credit
- Create secret key
- Copy
- Install & paste in WordPress
- 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.
- 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.
- 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.
- 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.
- 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. - 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.
sk-proj-4fG7••••••••••••••••••••Copy5Anthropic (Claude)
- Prepaid credit required
- About 6 minutes
- Sign up
- Name your organization
- Buy credits
- Create key
- Copy
- Install & paste in WordPress
- 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.
- 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.
- Buy credits.Open Settings → Billing, add a card and buy a small amount of credit. Keys won't work until there's a balance.
- 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.
- Copy it now.The key starts with
sk-ant-and is shown only once. - 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.
sk-ant-api03-Qm2••••••••••••••••CopyAnthropic 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.
- Sign up
- Create key
- Copy
- Install plugin
- Paste in WordPress
- Create an account.Go to openrouter.ai and sign up with Google, GitHub or email.
- 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.
- Copy it now.The key starts with
sk-or-and is shown only once. - 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.
- 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.
- Paste the key into WordPress.Under Settings → Connectors, choose OpenRouter. See how.
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
- Sign up
- Choose Free mode
- Create key
- Copy
- Install plugin
- Paste in WordPress
- Open Mistral Studio.Go to console.mistral.ai and create an account.
- 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.
- 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.
- Copy it now.The full key appears only once.
- 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.
- Paste the key into WordPress.Under Settings → Connectors, choose Mistral. See how.
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.
- Go to Settings → Connectorsin wp-admin. You need to be an administrator to see it.
- 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.
- 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.
- 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.
Connectors
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.
| Provider | Plugin | Where to install it |
|---|---|---|
| AI Provider for Google by WordPress.org | Install on Settings → Connectors | |
| OpenAI | AI Provider for OpenAI by WordPress.org | Install on Settings → Connectors |
| Anthropic | AI Provider for Anthropic by WordPress.org | Install on Settings → Connectors |
| OpenRouter | AI Provider for OpenRouter by Jonathan Bossenger | Plugins → Add New Plugin |
| Mistral | AI 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.
10When it doesn't work
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.