Basic Usage
Conversion Options
UseConvertOptions to control the conversion:
All Options
Current
ConvertOptions supports the fields above. For the full wire contract and mode restrictions, see the Convert API guide.Processing Modes
Lite cannot use
extras, word_bboxes, merge_cross_page, exact_transcription
or save_checkpoint. For example:
Output Formats
Conversion Result
TheConversionResult object contains the converted content and metadata:
Result Fields
Saving Output
Save the conversion result to files:output/:
document.md(or.html,.json,.chunks.json, depending on the output format)document.metadata.json, when the result has metadatadocument_extraction_results.json, when the result has extracted fields- the extracted images, under their own file names, next to
document.md(ifsave_images=True). The markdown links to them by those names.
output/v1.2.report writes v1.2.report.md (SDK 0.15.0 or later). A path that ends in an extension the SDK writes or a document type the API reads, such as output/document.md or output/scan.jpg, has that extension replaced.
Async Usage
For high-throughput applications:Polling Configuration
Control polling behavior for long-running conversions:Special Features
Track Changes
Extract tracked changes and comments from DOCX, PDF, and image files:Chart Understanding
Extract data from charts and graphs:Block IDs for Citations
Add block IDs for tracking content back to source locations:Structured Extraction
For structured data extraction, use the dedicatedclient.extract() method.
Next Steps
Structured Extraction Recipe
Extract structured data from documents using JSON schemas.
Batch Processing
Process multiple documents efficiently in parallel.
Form Filling SDK
Programmatically fill PDF and image forms with field data.
CLI Reference
Convert documents from the command line.