Docs

POST /v1/pdf/data

Use POST /v1/pdf/data to pull fields that match a JSON Schema, with page citations. Omit schema to get Markdown per page. Uses the text layer; set ocr true or send a scan and the API processes selected scanned pages in vision batches, up to the 500-page document limit. Use /v1/pdf/ocr for a searchable PDF output. Billed at the AI rate. Failures are not billed.

PDF + optional JSON Schema → structured JSON and citations. Omit schema for Markdown. AI rate; failed jobs are free.

Schema extract

data matches your schema. citations[].path is a JSON path into data (for example items[0].amount).

POST /v1/pdf/data
{
  "url": "https://example.com/invoice.pdf",
  "schema": {
    "type": "object",
    "properties": {
      "vendor": { "type": "string" },
      "total": { "type": "number" }
    },
    "required": ["total"]
  }
}

Markdown (no schema)

Returns markdown plus pages[].markdown. Good for agents that already have an LLM.

POST /v1/pdf/data
{ "url": "https://example.com/report.pdf" }

Vision

ocr: true, or an empty text layer, processes selected scanned pages in bounded vision batches. Large jobs may require multiple provider calls; excessive text or consolidation context returns an explicit error. engine in the response is text or vision.