Skip to main content

aiThreadsRegenerateTitle

aiThreadsRegenerateTitle_200_response aiThreadsRegenerateTitle(AiThreadsRegenerateTitleRequest)

POST /api/2.0/ai/threads/regenerate-title

Regenerate title

Asks the model to produce a title from the thread's first user message, stores it, and returns the new title. Both threadId and a resolved profile object are required; a thread with no user message yet has nothing to title and fails. This costs a model call, unlike POST api/2.0/ai/threads/rename, which just stores the string it is given. An entityMeta sent with the request is only read for its entityId hint - the source itself is resolved server-side under the caller's credentials, so a client cannot attribute the call to somebody else's room.

Parameters​

NameInTypeDescriptionNotes
AiThreadsRegenerateTitleRequestbodyAiThreadsRegenerateTitleRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200The newly generated title, already stored on the thread.aiThreadsRegenerateTitle_200_response-
400threadId 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-
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-

Return type​

aiThreadsRegenerateTitle_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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