Skip to content

Public REST API

OG AI Core uses several REST namespaces under /wp-json/. Each table below lists the method, the route and who may call it.

Who may call it:

  • Public: no login needed. Some of these still check something inside the callback (a page nonce, a token or the visitor's own data).
  • Nonce: needs a valid X-WP-Nonce header (wp_rest). Chatbot pages get one from start_session, so guests can use these routes too. The ogaie_rest_authorized filter can change the check.
  • Editor: an editor or administrator (ogaie_allow_usage).
  • Admin: a user who can manage_options (ogaie_allow_setup).
  • Key: a Bearer key, as described in each section.

Many routes only exist while their module is on, and the Pro routes need OG AI Core Pro.

ogaie-ui/v1: chatbots, forms and the front end

Method Route Who
POST /chats/submit Nonce
POST /forms/submit Public (Pro, Forms module). Model, environment and prompt come from the saved form, not from the request.
POST /discussions/list, /discussions/get, /discussions/edit, /discussions/truncate Signed-in user. The route is open, but the callback answers 401 to guests and only works on the user's own discussions.
POST /discussions/delete Signed-in user, own discussions only
POST /files/upload, /files/list, /files/delete Nonce
POST /editor/submit, /editor/feedback Editor (AI Copilot and Editor Assistant)
POST /openai/realtime/start, /call, /stats, /discussions, /image Nonce (Pro, realtime voice)
POST /search Admin (Search module)
GET /cross-site/config, /cross-site/theme-css Public (Pro, Cross-Site). The allowed domains are checked in the callback.
POST /cross-site/auth Public (Pro, Cross-Site)

Public routes ignore a model, environment, API key or instructions sent by the browser. Those come from the chatbot's or form's saved settings.

ogaie/v1: the admin app

These routes run the OG AI Core screens. They are not meant for visitors.

Method Route Who
POST /start_session Public. Returns a nonce for the chatbot.
GET, POST /settings/options, /settings/update, /settings/reset, /settings/chatbots, /settings/themes Admin
POST /ai/completions, /ai/images, /ai/image_edit, /ai/copilot, /ai/magic_wand, /ai/models Editor
POST /ai/test_connection, /ai/moderate, /ai/transcribe_audio, /ai/transcribe_image, /ai/json Admin
GET, POST /system/templates Editor
POST /system/logs/list, /delete, /meta, /activity, /activity_daily, /system/mcp_logs/top_tools Admin
GET, POST /helpers/* (posts, media, video, cron and similar helpers) Editor; /helpers/optimize_database is Admin
GET, POST /helpers/tasks_list, /task_run, /task_pause, /task_resume, /task_delete, /task_logs, /task_logs_delete, /tasks_reset Admin (Developer > Tasks)
POST /discussions/list, /discussions/delete; GET /discussions/stats Admin
GET, POST /forms/list, /forms/get, /forms/create, /forms/update, /forms/delete Admin
POST /vectors/*, /embeddings/test_pinecone, /test_chroma, /test_qdrant, /chroma_cloud_identity, /create_openai_vector_store Admin (Pro, Knowledge)
GET, POST /openai/files/*, /openai/finetunes/*, /openai/assistants/* Admin
GET, POST /mcp/status, /mcp/enable, /mcp/functions, /mcp/self_test Admin
GET, POST, DELETE /agents, /agents/<id>, /agents/<id>/runs, /agents/<id>/run Admin (Agents in the Workspace)
GET, POST /workspace/* Admin (Workspace module). /workspace/pair and /workspace/auth-check are public, for the phone app.
POST /models_api/setup Admin (Pro, Models API)
GET /get_logs, /clear_logs Editor

Public API module (off by default)

Turn on Public API in System > Modules (MCP and agents group) to add simple routes for your own apps:

Method Route
GET /simpleAuthCheck, /listChatbots
POST /simpleTextQuery, /simpleFastTextQuery, /simpleImageQuery, /simpleImageEditQuery, /simpleVisionQuery, /simpleJsonQuery, /moderationCheck, /simpleTranscribeAudio, /simpleFileUpload, /simpleChatbotQuery

By default these need a logged-in user. When a Bearer Token is set for the Public API (in System > Settings > REST API), a request with Authorization: Bearer <token> is accepted too. Change the rule with the ogaie_allow_public_api filter.

ogaie-openai/v1: Models API (Pro)

Method Route Who
GET /models Key
POST /chat/completions Key
POST /responses Key (OpenAI environments only)

The key is the Models API key from System > Modules > Models API, sent as Authorization: Bearer <key>. See Models API.

ogaie-public/v1: Public MCP

Method Route Who
POST /mcp Public, read-only, rate limited. GET and DELETE answer 405.

Only registered while the Public MCP module is switched on. See MCP.

mcp/v1: the admin MCP server

Method Route Who
GET, POST, DELETE /http Admin by default (ogaie_allow_mcp), or an editor when Editor Access is on. OAuth or bearer token.
GET /.well-known/oauth-authorization-server, /.well-known/oauth-protected-resource Public
GET, POST /oauth/authorize Public (shows the WordPress sign-in and approval)
POST /oauth/token, /oauth/register, /oauth/revoke Public
GET /oauth/apps Admin
DELETE /oauth/apps/<id> Admin
POST /upload/<token> Public. Accepts a file for a one-time upload token that an MCP tool created.

ogaie-labs/v1: provider balances and insights

Method Route Who
POST /balance-setup Admin. Saves a provider's Management API key and current balance (body: provider, ...).
GET /provider-insights?env=<environment id> Admin. The data for a provider's page under Insights: last 30 days on this site and what the provider reports.

Built-in modules and add-ons

These keep their own namespaces.

Namespace Used by
og-mailer/v1 CoreMail (settings, email logs, resend, test mail). Admin only.
og-contact-form-block/v1 Contact Form settings. Registered for administrators only.
og-workflow/v1 Workflow (Pro). /hook/<token> is a public webhook; every other route is for administrators.
ogaie-woo-basics/v1 Woo Basics (Pro) settings. Admin only.
image-copytrack/v1 Copytrack (Pro). Admin only.

Leads (Pro) has no REST route. Agents use ogaie/v1/agents (above). The Public MCP uses ogaie-public/v1 (above). | ogaie-websearch/v1 | Web Search add-on settings. Admin only. | | ogaie-user-memory/v1 | User Memory add-on settings. Admin only. |

Tips

  • Use X-WP-Nonce for same-site calls from logged-in users.
  • Use Application Passwords for server-to-server calls to admin routes.
  • Respect the limits you set under Insights and limits.
  • Some security plugins block /wp-json/ogaie-ui/v1/ and /wp-json/ogaie/v1/start_session for visitors. Public chatbots need both.