To upload medical record PDFs to the Puppilot system for processing and summarization, use the timeline/upload-pdf API endpoint.

This endpoint uploads the PDF file to the Puppilot system and initiates our internal process to create summaries at all four detail levels.

Note: Some PDF documents may take a while (up to a few hours) to process, depending on the size and complexity of the document.

Calling the Endpoint

To upload a PDF, send a POST request to the /timeline/upload-pdf endpoint with the following form data:

  • file: (required) The PDF file to upload.

Headers:

Content-Type: multipart/form-data

Example: Upload a PDF using cURL

curl -X POST https://agents.puppilot.co/timeline/upload-pdf \
  -F "file=@./path/to/file.pdf"

Example: Upload a PDF using Node.js (Axios)

import axios from "axios";
import FormData from "form-data";
import fs from "fs";

const formData = new FormData();
formData.append("file", fs.createReadStream("./file.pdf"));

axios.post("https://agents.puppilot.co/timeline/upload-pdf", formData, {
  headers: formData.getHeaders(),
});

Response

Upon a successful POST request, the endpoint will return:

{
  "message": "Successfully uploaded file and added to the processing queue."
}

This response indicates that your PDF has been successfully uploaded and queued for processing. The system will automatically generate all four summary levels (Brief, Focused, Detailed, and Deep Dive) once processing is complete.