Read a document
Read a PDF or an image and return every page as Markdown: text in reading order, headings, lists, tables, math, headers and footers, and the position of every image region on the page.
Send the document as document_url (a PDF) or image_url (an image),
each a public URL or a base64 data URI, up to 50 MB. pages chooses
zero-based pages; a request reads at most 1,000 pages. Billed per page
read, with the per-request minimum shown on the model page.
A request answers when its pages are read. One still running after
about four and a half minutes answers 202 with a job_id; poll
GET /v1/jobs/{job_id} for the result. Send Prefer: respond-async to
get the job id at once.
Authentication
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Headers
respond-async answers 202 with a job_id at once instead of waiting for the pages.
Request
The PDF (document_url) or image (image_url) to read.
Zero-based pages to read, as a list or a string such as "0,2-4". Every page when omitted. At most 1,000 pages per request.
Return each image region as a JPEG data URI in images[].image_base64.
Move each table into tables[] in this format and leave a link such as [tbl-0.html](tbl-0.html) in markdown. Tables stay in markdown as HTML when omitted.
Move the header text out of markdown into header.
Include blocks, every region of each page in reading order.
