For the simplest integration, use the Python SDK. The SDK handles authentication, polling, and provides typed responses.
Authentication
All requests require an API key in theX-API-Key header:
Request Pattern
All processing endpoints follow this pattern:- Submit a document for processing (returns immediately with a
request_id) - Poll the status endpoint until processing completes
- Retrieve results from the completed response
Submit Request
Poll for Results
Progress percentages
Hosted API polling responses can includeprogress_percent, an integer from 0 to 100 estimating overall work completed. Use it to display a progress bar.
- The percentage can pause or jump. It is not an estimate of time remaining.
- Treat a missing or
nullvalue as unavailable and show an indeterminate indicator. - A successful result reports 100 when it is ready to retrieve. A failed request may retain its last percentage or have no percentage.
- Keep checking
statusandsuccessto decide whether processing finished. A percentage is not a completion signal.
on_progress to document-processing helpers such as convert() and extract() to receive increasing integer percentages while they poll. Missing values and duplicates are skipped. Async clients also accept async callbacks. Callbacks run inline; keep them short. Callback exceptions stop local polling and propagate to your call, without cancelling the server request. Existing polling intervals and request counts are unchanged. Earlier SDK versions can use REST polling.
Document Conversion
Convert documents to Markdown, HTML, JSON, or chunks. Endpoint:POST /api/v1/convert
Request
Parameters
Processing Modes
Response
Pollrequest_check_url until status is complete, checking success and error on each response. Completed responses can contain the output inline or a signed result_url for downloading the result JSON. Download signed URLs without an API key header. See the complete Python requests example for bounded polling, HTTP error handling, and downloading results.
Response fields:
For structured data extraction, see the Extract endpoint. For document segmentation, see the Segment endpoint.
Structured Extraction
Extract structured data from documents using a JSON schema. Endpoint:POST /api/v1/extract
Request
Parameters
The extracted data is returned in
extraction_schema_json in the poll response.
See Structured Extraction for detailed examples.
Document Segmentation
Segment documents into structured sections using a JSON schema. Endpoint:POST /api/v1/segment
Parameters
See Document Segmentation for detailed examples.
Track Changes
Extract tracked changes (insertions and deletions) from DOCX files, PDFs, and images. Endpoint:POST /api/v1/track-changes
DOCX files use exact pandoc-based change extraction. PDFs and images are processed by a vision model.
Custom Processor (Agent, Beta)
This feature is currently in open beta. The API may change.
POST /api/v1/agent
Parameters
Form Filling
Fill forms in PDFs and images. Endpoint:POST /api/v1/fill
Request
Parameters
Field Data Format
Response
See Form Filling for more examples.
File Management
Upload and manage files for use in pipelines.Upload File
Step 1: Request an upload URLList Files
Get File Metadata
Get Download URL
Delete File
Create Document
Generate DOCX files from markdown with track changes support:Webhooks
Configure webhooks to receive notifications when processing completes instead of polling. Set a default webhook URL in your webhook settings, or override per-request with thewebhook_url parameter.
See Webhooks for configuration details.
Rate Limits
Default rate limits apply per API key. If you exceed limits, you’ll receive a429 response.
See Rate Limits for details and how to request higher limits.
Next Steps
SDK Reference
Use the Python SDK for a simpler integration with typed responses.
Webhooks
Receive notifications when processing completes instead of polling.
API Limits
Understand file size limits, page limits, and rate limiting.
Document Conversion
Detailed guide to converting documents to Markdown, HTML, or JSON.