Skip to main content

Parameters

  • document_id (str): ID of the document to extract pages from
  • start_page (int): Starting page number (1-indexed)
  • end_page (int): Ending page number (1-indexed)

Returns

  • DocumentPagesResponse: Object containing extracted pages with metadata

Examples

DocumentPagesResponse Properties

The DocumentPagesResponse object has the following properties:
  • document_id (str): ID of the document
  • pages (List[str]): List of page contents as base64 encoded strings
  • start_page (int): Start page number (1-indexed)
  • end_page (int): End page number (1-indexed)
  • total_pages (int): Total number of pages in the document

Notes

  • Page numbers are 1-indexed (first page is 1, not 0).
  • The pages list contains base64 encoded representations of each page.
  • Useful for extracting specific sections of large documents.