Basic Usage
Segment Options
UseSegmentOptions to configure segmentation behavior:
| Option | Type | Default | Description |
|---|---|---|---|
segmentation_schema | str | Required | JSON schema defining segment names and descriptions |
checkpoint_id | str | None | Checkpoint ID from a previous convert() call |
mode | str | "fast" | Processing mode: "fast", "balanced", "accurate" |
save_checkpoint | bool | False | Save checkpoint for reuse with subsequent calls |
max_pages | int | None | Maximum number of pages to process |
page_range | str | None | Specific pages to process (e.g., "0-5,10"). For spreadsheets, filters by sheet index. |
skip_cache | bool | False | Skip cached results, force reprocessing |
webhook_url | str | None | Webhook URL for completion notification |
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 the segmentation data alongside standard conversion fields: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.