Skip to content
View as Markdown
Enter your site to enable Send. Requests are sent from your browser, so the site must allow cross-origin calls (CORS).

POST List Models For Provider​

POST
/ai/models

List the model options FluentCRM offers for a provider, so the settings screen can populate its model dropdown after the provider changes.

This is a POST even though it only reads: the provider is sent inside the same settings envelope the other AI endpoints use.

For wordpress, open_ai, claude and gemini the model lists are maintained in FluentCRM, so no API key is needed and no outbound request is made. For openrouter the list is fetched live from OpenRouter using settings.api_key (or the saved key); a missing key or a failed fetch returns 422.

Required capability: manage_options

Enforced by AiPolicy::verifyRequest(), the policy default for this route group.

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",
"api_key": "string"
}
}

Responses​

Available models for the requested provider.

application/json
JSON
{
"models": [
{
"id": "string",
"title": "string"
}
]
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI