PDF Insight Pro provides three session management endpoints that give clients full control over a conversation’s lifecycle. Use them to inspect the messages exchanged so far, reset the conversation without re-uploading the document, or permanently destroy the session and reclaim server storage once you are done.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Jatin-Mehra119/PDF-Insight-Beta/llms.txt
Use this file to discover all available pages before exploring further.
POST /chat-history
Retrieve the complete chat history for a session as an ordered list of user/assistant message pairs.Request
Method:POSTPath:
/chat-historyContent-Type:
application/json
The UUID returned by
POST /upload-pdf that identifies the session whose history you want to retrieve.curl example
Response
Status:200 OK
Always
"success" when the session is found.Ordered list of conversation turns. Each element is an object with two string fields.
Errors
| Status | Detail |
|---|---|
| 404 | Session not found |
POST /clear-history
Wipe the chat history for a session while keeping the uploaded PDF and its FAISS index intact. Subsequent/chat calls will start a fresh conversation against the same document.
Request
Method:POSTPath:
/clear-historyContent-Type:
application/json
The UUID of the session whose conversation history you want to clear.
curl example
Response
Status:200 OK
Always
"success" when the history is cleared.Always
"Chat history cleared".Errors
| Status | Detail |
|---|---|
| 404 | Session not found |
POST /remove-pdf
Permanently delete the PDF file and the entire session — including its FAISS index and chat history — from the server. Use this when you are finished with a document and want to free storage.Request
Method:POSTPath:
/remove-pdfContent-Type:
application/json
The UUID of the session to remove.
curl example
Response
Status:200 OK
Always
"success" when the session is removed.Always
"PDF file and session removed successfully".Errors
| Status | Detail |
|---|---|
| 404 | Session not found or could not be removed |