POST Test AI Connection​
POST
/ai/test
Verify provider credentials by issuing a real, minimal completion request (15-second timeout).
If api_key is empty or still masked, the saved key is used instead — so the settings screen can test an existing configuration without re-entering the secret. Every provider except wordpress requires a key to be present.
Required capability: fcrm_manage_settings
Enforced by AiPolicy::testConnection().
Authorizations​
ApplicationPasswords
WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password
Type
API Key (header: Authorization)
Request Body​
application/json
JSON
{
"settings": {
"provider": "string",
"model": "auto",
"api_key": "string"
}
}
Responses​
The provider accepted the credentials.
application/json
JSON
{
"message": "string"
}