Use this file to discover all available pages before exploring further.
Parse a document into normalized text and persist the result as a Parse resource that can later be retrieved via GET /v1/parses/{parse_id} or listed via GET /v1/parses.
from retab import Retabclient = Retab()parse = client.parses.create( document="document.pdf", model="retab-small", table_parsing_format="markdown", image_resolution_dpi=192,)print(f"Parse ID: {parse.id}")print(f"Filename: {parse.file.filename}")print(f"Full text: {parse.output.text}")for i, page in enumerate(parse.output.pages): print(f"Page {i + 1}: {page}")
{ "id": "parse_01G34H8J2K", "file": { "id": "file_6dd6eb00688ad8d1", "filename": "document.pdf", "mime_type": "application/pdf" }, "model": "retab-small", "table_parsing_format": "markdown", "image_resolution_dpi": 192, "output": { "pages": [ "# Document Title\n\nFirst page content with a markdown table...", "Second page content continues here...", "Third and final page content..." ], "text": "# Document Title\n\nFirst page content with a markdown table...\n\nSecond page content continues here...\n\nThird and final page content..." }, "usage": { "page_count": 3, "credits": 1.5 }, "created_at": "2024-03-15T10:30:00Z", "updated_at": "2024-03-15T10:30:00Z"}
The document to parse. HTTP callers must pass a MIMEData object with filename and url (a data URL or an https URL). The Python and Node SDKs also accept file paths, file-like objects, images, buffers, and URLs and convert them for you.