API reference · Chat
POST/api/chat/stream/title
Product availabilityAlgaPSA

Generate chat title stream

Enterprise-only AI endpoint that generates a short title from conversation messages. Requires a valid Auth.js session and the aiAssistant experimental feature enabled for the tenant. The handler sends the messages to OpenRouter and returns Server-Sent Events; the implementation emits a generated title event and a completion event rather than a conventional JSON response.

Request body

Content type: application/json · schema ChatTitleStreamRequest

inputsarray of ChatMessageRequired
Conversation messages used as context for generating a short chat title.
min items 1
itemsobject
rolestringRequired
Role of the message author in the conversation.
Enum: userassistant
contentstringRequired
Message text sent to the chat model.

Response codes

200
SSE stream of title-generation events.
403
AI Assistant feature is not enabled for the tenant.
404
Chat streaming is not available in this edition.
500
Malformed request, missing model credentials, or another internal streaming failure.