Documents

Extract Document Pages

Changed on

Extract specific pages from a document (PDF, PowerPoint, or Word) as base64-encoded images or URLs. When output_format="url", pages that fail URL generation fall back to base64 data URIs (mixed output possible).

post/documents/pages

Request

  • Base URL
    https://api.morphik.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.morphik.ai/documents/pages
  • Auth
    none declared

Headers

authorizationstring nullable

Request body

document_idstring required

ID of the document to extract pages from

start_pageinteger required

Starting page number (1-indexed)

end_pageinteger required

Ending page number (1-indexed)

output_format'base64' | 'url' nullable

How to return page images: base64 (default) or url

Response

Successful Response

document_idstring required
pagesstring[] required
start_pageinteger required
end_pageinteger required
total_pagesinteger required

Changes

    • info

      header request parameter authorization list-of-types was widened by adding types null

    • info

      for the header request parameter authorization, the type was generalized from string to no type

    • info

      added the new optional request property