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.
Turn it on
Section titled “Turn it on”- Open Settings › For developers › REST API.
- Switch on Allow REST API requests. A key is made for you.
- 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-keyThe base address is https://your-site.com/wp-json/aipkit/v1.
Routes
Section titled “Routes”| 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.
Write text
Section titled “Write text”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".
Chat with a chatbot
Section titled “Chat with a chatbot”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
Section titled “Errors”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.