Query documents
Requires authentication.
POST /api/v1/chat/completions
Sends a message to the retrieval-augmented generation pipeline and returns an answer grounded in the documents associated with the session.
Request body
The user’s question or prompt.
The session to query against. Documents ingested into this session are used as the retrieval source.
Optional filter to restrict retrieval to documents tagged with a specific institution.
Response
200 OK
Always
true on a successful response.The generated answer text.
500 Internal Server Error
Always
false.Always
"Internal Server Error".Example
Response
Get chat history
GET /api/v1/chat/history/:sessionId
Returns paginated chat messages for a session, ordered from oldest to newest. Each page contains up to 20 messages.
Path parameters
The session whose history you want to retrieve.
Query parameters
Zero-based page index. Defaults to
0 (the first page). Values below 0 are clamped to 0.Response
200 OK
Always
true.Array of chat message objects for the requested page.
Example
Response
Delete chat
DELETE /api/v1/chat/:sessionId
Deletes all chat messages associated with a session.
Path parameters
The session whose chat history you want to delete.
Response
204 No Content
Returned on success. The response body is empty.400 Bad Request
"Session deletion failed" — returned when the delete operation could not be completed.