Skip to main content
All AI chat and conversation endpoints are mounted under /conversation and require an authenticated session (authMiddleware).

Endpoints

1. Stream AI Chat & Tool Calls

POST /conversation/chat Initiates an interactive streaming conversation session. The backend streams line-delimited JSON (NDJSON) events using Transfer-Encoding: chunked.

Request Body

Request Body

Stream Protocol (NDJSON)

The response stream sends chunked JSON lines separated by \n:
Response Stream (200 OK)

Stream Event Types


2. Get Conversation Message History

POST /conversation/chat/:id Retrieves up to 100 historical messages from a conversation thread, ordered chronologically.

Path Parameters

Request Body

Response (200 OK)

3. List Recent Conversations

GET /conversation Returns a cursor-paginated list of up to 20 conversation threads for the user, ordered by updatedAt desc.

Query Parameters

Response (200 OK)

4. Submit Message Feedback

PATCH /conversation/feedback Records positive or negative user feedback on an individual model response message.

Request Body

Request Body
Response (202 Accepted)