RAG PDF Highlighter exposes a minimal REST API with two endpoints — a health check and the highlight endpoint. All requests are JSON; the highlight response is a binary PDF.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MuhammadSalmanAhmad/rag-pdf-highlighter/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Endpoints
GET /
Health check. Returns
{"status": "ok the app is running"} with HTTP 200.POST /highlight
Accepts a PDF URL and a list of document chunks. Downloads the PDF, applies highlights using 3-tier text matching, and returns the annotated PDF as a binary file.
Request format
All requests toPOST /highlight must set Content-Type: application/json. The request body must be a JSON object conforming to the following schema:
pdf_url must be a publicly accessible URL from which the service can download the PDF. Each entry in documents represents one text chunk to locate and annotate. The metadata.page value is zero-indexed — page 0 is the first page of the document.
Both
pdf_url and documents are required. Omitting either field returns HTTP 422 Unprocessable Entity.Response format
Success
A successfulPOST /highlight request returns HTTP 200 with the following headers:
| Header | Value |
|---|---|
Content-Type | application/pdf |
Content-Disposition | attachment; filename="highlighted.pdf" |
Errors
All error responses return a JSON body with a singledetail field describing the failure:
| Status code | Cause |
|---|---|
400 Bad Request | PDF download failed, or an empty document list was passed |
422 Unprocessable Entity | Missing required fields in the request body |
500 Internal Server Error | Unexpected failure during highlighting |