Skip to main content
The RAG PDF Highlighter API is a REST interface for the Callisto PDF Highlighter microservice (v0.1.1). You send it a publicly accessible PDF URL together with a list of text chunks from your RAG pipeline, and it returns a binary PDF with every chunk visually highlighted in place. This makes it straightforward to show end-users exactly which passages a retrieval system used to generate an answer.

Base URL

Every request is made to the host where you have deployed your own instance of the service:
http://your-host:8000
Replace your-host with the hostname or IP address of your deployment. There is no shared cloud endpoint — you run the service yourself.
No API key or authentication is required. The service is designed to run inside a trusted network or behind your own authentication layer. Do not expose it to the public internet without adding an authentication proxy.

Content-Type

All requests that include a body must set the Content-Type header to application/json:
Content-Type: application/json

Response Format

On success, the API returns a binary PDF file:
  • Content-Type: application/pdf
  • Content-Disposition: attachment; filename="highlighted.pdf"
  • Body: raw PDF bytes
On failure, the API returns a JSON object with a single detail field describing the error:
{"detail": "Failed to download PDF: HTTP 404"}
See the Errors page for a full list of error codes and their causes.

Endpoints

The API exposes two endpoints:
MethodPathDescription
GET/Health check — verify the service is running
POST/highlightHighlight text chunks in a PDF and return the annotated file

GET /

Verify your RAG PDF Highlighter instance is live and responding to requests.

POST /highlight

Submit a PDF URL and document chunks to receive an annotated, highlighted PDF.