Convert a PDF, image, or document to markdown, HTML, JSON, or chunks. Use save_checkpoint=true to save parsed state for later /extract or /segment calls.
Optional file URL (http/https). If provided, the server will download and process it.
Which output mode to use. Valid values: 'fast' (lowest latency), 'balanced' (balanced accuracy and latency), 'accurate' (highest accuracy).
The maximum number of pages in the document to convert.
The page range to convert, comma separated like 0,5-10,20. Overrides max_pages if provided.
Whether to paginate the output. Each page will be separated by a horizontal rule with the page number.
Add data-block-id attributes to HTML elements for citation tracking. Only applies when output_format includes 'html'.
Include markdown field in chunks and JSON output.
Disable image extraction from the document.
Disable synthetic image captions/descriptions in output.
Wrap synthetic image captions with HTML comment markers for easy identification/removal.
The output format. Can be 'json', 'html', 'markdown', or 'chunks'. Defaults to 'markdown'. Comma separate multiple formats.
Optimize markdown for LLM token usage (compact tables, single-space indents).
Skip the cache and re-run the conversion.
Save a checkpoint after conversion. The checkpoint_id in the response can be used with /extract or /segment to skip re-parsing.
Additional configuration as a JSON string. Supported keys: 'keep_pageheader_in_output', 'keep_pagefooter_in_output', 'keep_spreadsheet_formatting'.
Optional workflow step data ID to associate with this request.
Comma-separated list of extra features: 'track_changes', 'chart_understanding', 'table_row_bboxes', 'extract_links', 'infographic', 'new_block_types'.
Optional webhook URL to call when the request is complete.
Internal: force Modal backend.
Input PDF, word document, powerpoint, or image file, uploaded as multipart form data. Images must be png, jpg, or webp format.
Successful Response
The ID of the request. This ID can be used to check the status of the request.
The URL to check the status of the request and get results.
Whether the request was successful.
If the request was not successful, this will contain an error message.
A dictionary of the versions of the libraries used in the request.