AI Providers
Connect OpenAI, Anthropic, Gemini, Grok, Hugging Face or a local model to Cornerstone with the Cornerstone MCP plugin.
With the Cornerstone MCP plugin you can run Studio's chat, images, speech and video on your own provider account, or on a model running on your own computer. Your provider bills you for these requests, and they use no credits. Building and editing pages always run on Themeco and use your AI Credits. See Themeco or Your Own Keys.
Before You Start
You need the Cornerstone MCP plugin, active, and a WordPress administrator account. See the Cornerstone MCP Overview.
To open My Keys, click the sparkle icon at the top of the builder's side panel, click the gear in the CSAI panel, then click My Keys. Each provider has its own group there.
| Provider | What you enter | Actions |
|---|---|---|
| OpenAI | API Key | Chat, Image, Image Editing, Speech |
| Anthropic | API Key | Chat |
| Gemini | API Key | Chat, Image |
| Grok | API Key | Chat |
| Hugging Face | Access Token | Image, Video |
| GPT4All | Server address | Chat |
| LM Studio | Endpoint address | Chat |
| Stable Diffusion | Endpoint address | Image, Image Editing |
For a provider with a key, paste the key into its group. It saves as soon as you paste it. Then click Test connection. When it says Connected, the key works.
For a local provider, start the app's local server, then type its address into the group. There is no Test connection button, so try a chat or an image to check it. Your WordPress server sends these requests, not your browser, so http://localhost only works when WordPress runs on the same computer as the app, like a local development site. Local models need a capable computer, usually with a good GPU, and our support for them is limited.
To pick which provider an action uses, see Choosing a Provider.
OpenAI
OpenAI runs Chat, Image, Image Editing and Speech.
To get a key, log in to the OpenAI Platform and open the API keys page. Click Create new secret key and copy the key. It is shown only once. OpenAI's quickstart walks through it.
In My Keys, paste the key into the OpenAI group's API Key field, then click Test connection.
Anthropic
Anthropic makes the Claude family of models. It runs Chat.
To get a key, log in to the Claude Console and open the API keys page. Click Create key, give it a name, and copy the key. It is shown only once. Anthropic's guide, Get your Claude API key, walks through it.
In My Keys, paste the key into the Anthropic group's API Key field, then click Test connection.
Gemini
Gemini is Google's family of AI models. It runs Chat and Image.
To get a key, log in to Google AI Studio. On the API Keys page, click Create API key and copy the key. Google's guide, Using Gemini API keys, walks through it.
In My Keys, paste the key into the Gemini group's API Key field, then click Test connection.
Grok
Grok is made by xAI. It runs Chat.
To get a key, log in to the xAI console and click API Keys in the sidebar. Click Create API key and copy the key. xAI's quickstart walks through it.
In My Keys, paste the key into the Grok group's API Key field, then click Test connection.
CSAI doesn't use Grok for images, because its images carry a watermark and come in only one aspect ratio.
Hugging Face
Hugging Face is a platform for sharing and running AI models. It runs Image and Video. You pick the model in the Models panel.
Video is made in your browser, and only administrators can make it. Images are made by your server like the other providers.
To get a token, log in to Hugging Face and open Access Tokens in your settings. Click New token, pick a role and a name, and copy the token. Hugging Face's guide, User access tokens, walks through it.
In My Keys, paste the token into the Hugging Face group's Access Token field, then click Test connection.
GPT4All
GPT4All is an app that runs a model on your own computer. It runs Chat and needs no key.
In GPT4All, open Settings > Application and, under Advanced, turn on Enable Local API Server. Note the API Server Port. The default is 4891. GPT4All's guide, GPT4All API Server, walks through it.
In My Keys, type the address into the GPT4All group's Server field, for example http://localhost:4891. Then pick a model in the Models panel and send a chat message to check it.
LM Studio
LM Studio is an app that runs models on your own computer. It runs Chat and needs no key.
In LM Studio, open the Developer tab and make sure the Status switch reads Running. Its Settings button shows the server port. The default is 1234. LM Studio's guide, LM Studio as a Local LLM API Server, walks through it.
If you don't see the Developer tab, open App Settings with the gear at the bottom right and set User Interface Complexity Level to Power User or Developer.
In My Keys, type the address into the LMStudio group's Endpoint field, for example http://localhost:1234. Then pick a model in the Models panel, where your own models are listed too, and send a chat message to check it.
Stable Diffusion WebUI
Stable Diffusion WebUI by AUTOMATIC1111 is an app that runs image generation on your own computer. It runs Image and Image Editing and needs no key.
Start the WebUI with the --api argument:
./webui.sh --apiWhen the API is on, you see an API link at the very bottom of the WebUI. Note the port. The default is 7860.
In My Keys, type the address into the Endpoint field of the Stable Diffusion (AUTOMATIC1111) group, for example http://localhost:7860. Then generate an image to check it.
The Stable Diffusion provider loads by default. If you never use it, you can remove it from the site by setting the cs_ai_sdlocal_enabled option to false. With WP-CLI:
wp option update cs_ai_sdlocal_enabled 0To only hide it, turn off its switch in My Keys instead.
Troubleshooting
A Key Doesn't Connect
Click Test connection and read the message under the buttons. Adding a Key explains what each failed test means. Billing, model access and limits are set by your provider, not by CSAI.
A Local Provider Doesn't Answer
- Make sure the app is running and its local server is on.
- Check the address and port in My Keys.
- Remember that your WordPress server makes the request. A live site can't reach
localhoston your computer.
See something inaccurate? Let us know