Skip to content

Overview

AI / RAG / Embedding. Canonical namespace is {product}/{slug}/v1: wp2tutor/ai/v1, wp2tutor/embedding/v1, wp2tutor/rag/v1. GET /chat is public (permission_callback __return_true): health only, no secret and no LLM call. POST /chat takes a raw prompt body plus header X-Ai-Chat-Secret (not DualRest). Embedding and RAG DataTables require manage_options: cookie + X-WP-Nonce or Application Password (DualRest). Bot webhooks are documented in the wp2tutor-bot specification.

Information

  • OpenAPI version: 3.0.3

WordPress logged-in cookie session plus REST nonce header X-WP-Nonce.

Security scheme type: apiKey

Header parameter name: X-WP-Nonce

WordPress Application Password (DualRest).

Security scheme type: http

Shared secret from SecretKeyManager (option wp2lms_ai_chat_secret_key). Compared with hash_equals. Missing/mismatch → WP_Error rest_forbidden 401.

Security scheme type: apiKey

Header parameter name: X-Ai-Chat-Secret