Public AI chat probe
GET
/wp-json/wp2tutor/ai/v1/chat
const url = 'https://example.com/wp-json/wp2tutor/ai/v1/chat';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/wp-json/wp2tutor/ai/v1/chatHealth check for wp2tutor/ai/v1/chat. PHP AiChatController::get_items always returns JSON { status: ok, service: ai-chat } with HTTP 200. The secret is not checked and the model is not called.
CORS on /wp2tutor/ai/v1 routes: Access-Control-Allow-Origin: *, methods GET, POST, OPTIONS, headers Content-Type and X-Ai-Chat-Secret. When AI settings provider_connection is this_server, the rest_authentication_errors filter bypasses cookie-auth for URIs containing /wp2tutor/ai/v1.
Responses
Section titled “Responses”Route is up. Body is fixed: status ok, service ai-chat.
Media typeapplication/json
object
status
PHP always the literal ok — the route responded, not a license/build status.
string
service
PHP always the literal ai-chat (REST service name).
string
Example
{ "status": "ok", "service": "ai-chat"}