Skip to main content

aiProfilesListModels

List aiProfilesListModels(profileId)

GET /api/2.0/ai/profiles/list-models

List models

Lists the models a stored profile's provider currently offers, asking the provider itself rather than reading a cached list. profileId is required and is read from the query. A failure is reported with the provider's own verdict: an unusable key comes back as 400 and a provider that is unreachable or broken as 502, while a missing profile or a caller without access keeps the status the portal gave it. Use POST api/2.0/ai/profiles/list-provider-models to probe an endpoint that has no profile yet.

Parameters​

NameInTypeDescriptionNotes
profileIdqueryStringThe AI provider profile identifier.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The models the profile's provider currently offers.List-
400profileId is missing, or the provider rejected the profile's API key.AiErrorResponse-
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-
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: Not defined
  • Accept: application/json