Getting started

Upload your first PDF and get a cited answer in under five minutes.

Sample docs page. Replace with your real documentation.

Get from a file to a cited answer in a few minutes.

Install

npm i @pdfloveai/sdk

Upload a document

import { PDFLove } from "@pdfloveai/sdk";
const client = new PDFLove({ apiKey: process.env.PDFLOVE_KEY });

const doc = await client.documents.upload({ file });

Ask a question

const { answer, citations } = await client.ask({
  documentId: doc.id,
  question: "What is the termination notice period?",
});

answer is grounded in the document and citations points to the exact pages — show them in your UI so users can verify in one click.