aiProfilesListProviderModels
List aiProfilesListProviderModels(AiProfilesListProviderModelsRequest)
POST /api/2.0/ai/profiles/list-provider-models
List provider models
Lists the models an endpoint offers for credentials supplied in the request, before any profile exists - this is what a provider-setup form calls to fill its model picker. providerType and baseUrl are both required, and a 400 for either names the offending input in a field member so the form can highlight it; a baseUrl pointing at a private network address is refused as well, and so is an apiKey with characters that cannot travel in an HTTP header (anything outside printable ASCII), since no provider could ever accept it. For providerType: onlyoffice the answer comes from the portal gateway's catalogue, which carries richer capability data than the provider's own listing and matches what GET api/2.0/ai/profiles/list reports; a portal without that gateway falls back to asking the provider. A provider that is unreachable or broken is reported as 502, and one that rejects the key as 400.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiProfilesListProviderModelsRequest | body | AiProfilesListProviderModelsRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The models the endpoint offers for the supplied credentials. | List | - |
| 400 | baseUrl is missing, points at a private network address, apiKey holds characters that cannot travel in an HTTP header, or the provider rejected the supplied API key. | aiProfilesListProviderModels_400_response | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API. | AiErrorResponse | - |
| 413 | The request body is larger than 100 KB, the JSON parser's limit on this route. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
| 502 | The AI provider could not be reached, or answered with a failure of its own. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json