Skip to content

REST API

The REST API lets your own apps and scripts use the AI connected to your site: write text, make images and embeddings, talk to a chatbot, add to a vector store, and read chat logs.

This is for developers. To manage your site from ChatGPT or Claude, use website management instead.

  1. Open Settings › For developers › REST API.
  2. Switch on Allow REST API requests. A key is made for you.
  3. Copy Your key. Anyone with it can use your AI and its credits; Make a new key replaces it.

Send the key with every request:

Authorization: Bearer your-key

The base address is https://your-site.com/wp-json/aipkit/v1.

Route What it does
POST /generate Write text with a provider and model of your choice.
POST /images/generate Make images.
POST /embeddings Make embeddings.
POST /chat/{bot_id}/message Get a reply from one of your chatbots, with its settings.
POST /vector-stores/upsert Add content to a Local, Pinecone, Qdrant or Chroma store.
GET /logs Read chat logs, 100 per page at most.
POST /automations/run Run due automations; uses the server cron secret, not the API key.
GET /chatbots/{bot_id}/embed-config A chatbot’s settings for embedding on another site (Pro).

Every route, as JSON in the panel lists each route with its parameters.

Terminal window
curl https://your-site.com/wp-json/aipkit/v1/generate \
-H "Authorization: Bearer your-key" \
-H "Content-Type: application/json" \
-d '{"provider":"openai","model":"gpt-5.6-luna","messages":[{"role":"user","content":"Three names for a linen shop"}]}'

The answer has content, usage, provider and model. Streaming isn’t supported.

For AI Puffer Cloud use "provider":"aipuffercloud" with a Cloud model; the request spends your Cloud credits. Cloud images need a model and "response_format":"b64_json".

POST /chat/123/message
{ "messages": [ { "role": "user", "content": "Do you ship to Norway?" } ] }

The chatbot answers with its own model and instructions. Send the earlier messages to continue a conversation; the last one must be from the user.

Errors use WordPress’s REST format: code, message and data.status. A switched-off API answers 403; a missing or wrong key, 401.

All requests appear in Usage. The REST API has no rate limit of its own, so keep the key secret.