跳到主要内容

aiProfilesGetById

aiProfilesGetById_200_response aiProfilesGetById(id)

GET /api/2.0/ai/profiles/get-by-id

Get a provider profile

Returns one AI provider profile by its ID, with its secrets stripped: neither the API key nor the custom headers are ever sent back, on any portal. The ID is required and is read from the query, and an unknown one answers 404. The baseUrl in the answer is the one that was stored, not the internal gateway address a round actually dials, so it cannot be used to reach the provider directly. Use GET api/2.0/ai/profiles/list to enumerate profiles instead of reading them one by one.

Parameters​

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

Responses​

Status codeDescriptionTypeResponse headers
200The profile, with its key and headers stripped.aiProfilesGetById_200_response-
400The profile ID is missing.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-
404No profile has this ID.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiProfilesGetById_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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