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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiThreadsRegenerateTitleRequest | body | AiThreadsRegenerateTitleRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The newly generated title, already stored on the thread. | aiThreadsRegenerateTitle_200_response | - |
| 400 | threadId is missing. | AiErrorResponse | - |
| 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 | - |
Return type
aiThreadsRegenerateTitle_200_response
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json