TheDocumentation 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.
/chat endpoint is the core of PDF Insight Pro. On each call, the server retrieves the top-matching document chunks from the session’s FAISS index, loads the conversation history into a ConversationBufferMemory, runs a LangChain tool-calling agent with the Groq-hosted LLM, and returns the generated answer alongside the context chunks that were used to produce it. Optionally, the agent can also perform live web searches via Tavily to supplement the document context.
Request
Method:POSTPath:
/chatContent-Type:
application/json
The UUID returned by
POST /upload-pdf. Identifies which document and conversation context to use.The natural-language question to ask about the document. Must be at least 3 non-whitespace characters.
When set to
true, the agent is given access to a Tavily web search tool and may query the web to supplement information from the document. Requires TAVILY_API_KEY to be set on the server.The Groq-hosted LLM to use for this specific request. Overrides the model that was set at upload time for this call only.
Example request body
curl example
Response
Status:200 OK
Always
"success" on a successful response.The LLM-generated answer to the submitted query, grounded in the retrieved document chunks and conversation history.
The list of document chunks retrieved from the FAISS index that were passed to the agent as context. Each element contains the chunk text, its similarity score, and its source metadata.
Errors
| Status | Detail |
|---|---|
| 400 | Query cannot be empty |
| 400 | Query must be at least 3 characters long |
| 404 | Session not found or expired. Please upload a document first. |
| 500 | Session data is incomplete. Please upload the document again. |
| 500 | Error processing query: {error} |