Basic Usage
Segment Options
UseSegmentOptions to configure segmentation behavior:
Page-Only Segmentation
To find document boundaries without parsing text, set bothsegmentation_strategy="document_boundary" and granularity="page" inside segmentation_schema. This returns page ranges without Markdown, HTML, or other parsed content. Omitting granularity retains parsing and its charge. Use granularity="block" for boundaries within a page.
See the segmentation recipe for complete examples and pricing. These settings belong inside segmentation_schema, not as top-level SegmentOptions fields.
Checkpoint Reuse
Use checkpoints to avoid re-parsing a document when running segmentation after conversion. First convert withsave_checkpoint=True, then segment using the returned checkpoint_id:
Segmentation Result
The result object contains asegmentation_results object with a segments list. Each segment has name, pages (original, 0-indexed page numbers), and confidence. Block segmentation also provides start_block, end_block, and blocks. Parsed content is available when parsing ran or a parsed checkpoint was reused.
Async Usage
Next Steps
Segmentation Recipe
Learn more about document segmentation patterns and use cases.
Structured Extraction
Extract structured data from documents using JSON schemas.
Document Conversion
Convert documents to Markdown, HTML, JSON, or chunks.