Install the package
Install RAG PDF Highlighter from PyPI using
pip. All runtime dependencies are pulled in automatically.Start the server
Launch the FastAPI service with Uvicorn. The server will be available at You should see Uvicorn report that it is running. You can confirm the service is healthy by visiting
http://localhost:8000 by default.http://localhost:8000/ in your browser or with curl — it returns {"status": "ok the app is running"}.Make your first request
Send a
POST request to /highlight with a PDF URL and the list of document chunks you want to highlight. Choose your preferred approach:Save the highlighted PDF
The
/highlight endpoint returns the annotated PDF as a raw binary response with content-type application/pdf. Write the response body directly to a file to save it.If you used curl, the --output highlighted.pdf flag already handled this for you. If you used the Python requests example above, the file is written via response.content. Open highlighted.pdf in any PDF viewer and you will see your text chunk highlighted in yellow on the page you specified.