Skip to main content

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. 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​

NameInTypeDescriptionNotes
AiProfilesListProviderModelsRequestbodyAiProfilesListProviderModelsRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200The models the endpoint offers for the supplied credentials.List-
400baseUrl is missing, points at a private network address, or the provider rejected the supplied API key.aiProfilesListProviderModels_400_response-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI 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-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json