Installation
Authentication
Set your API key as an environment variable (recommended):Quick Example
Client Options
Both sync and async clients accept the same configuration options:Async Support
For high-throughput applications, useAsyncDatalabClient:
Error Handling
The SDK raises specific exceptions for different error types:Automatic Retries
The SDK automatically retries requests for:408Request Timeout429Rate Limit Exceeded5xxServer Errors
max_polls and poll_interval parameters on individual methods.
SDK Features
Document Conversion
Convert PDFs, images, and documents to Markdown, HTML, JSON, or chunks.
Structured Extraction
Extract structured data from documents using JSON schemas.
Document Segmentation
Segment documents into logical sections.
Form Filling
Fill PDF and image forms with structured field data.
Pipelines
Chain processors into versioned, reusable pipelines.
File Management
Upload, list, and manage files in Datalab storage.
CLI
Command-line interface for document conversion.
Method Summary
Next Steps
Document Conversion
Convert PDFs, images, and documents to Markdown, HTML, JSON, or chunks.
Structured Extraction
Extract structured data from documents using JSON schemas.
Document Segmentation
Segment documents into logical sections.
Form Filling
Fill PDF and image forms with structured field data.
Pipelines
Chain processors into versioned, reusable pipelines.
File Management
Upload, list, and manage files in Datalab storage.