Skip to main content
Datalab provides REST APIs for document conversion, structured extraction, form filling, and file management. All APIs use the same authentication and follow similar patterns.
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 the X-API-Key header:
Get your API key from the API Keys dashboard.

Request Pattern

All processing endpoints follow this pattern:
  1. Submit a document for processing (returns immediately with a request_id)
  2. Poll the status endpoint until processing completes
  3. Retrieve results from the completed response

Submit Request

Response:

Poll for Results

Response while processing:
Response when complete:
Results are deleted from Datalab servers one hour after processing completes. Retrieve your results promptly.

Document Conversion

Convert documents to Markdown, HTML, JSON, or chunks. Endpoint: POST /api/v1/convert

Request

Parameters

Processing Modes

Response

Poll request_check_url until status is complete:
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. Endpoint: POST /api/v1/track-changes
See Track Changes for detailed examples.

Custom Processor

Execute custom AI-powered processors on documents. Endpoint: POST /api/v1/custom-processor
POST /api/v1/custom-pipeline is deprecated (sunset: September 30, 2026). Migrate to POST /api/v1/custom-processor.

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 URL
Response:
Step 2: Upload directly to the presigned URL
Step 3: Confirm upload

List Files

Get File Metadata

Get Download URL

Delete File

See File Management for detailed examples.

Thumbnails

Generate page thumbnails from a previously processed document:
Response:
Thumbnails are returned as base64-encoded JPG images.

Create Document

Generate DOCX files from markdown with track changes support:
See Create Document for detailed examples.

Webhooks

Configure webhooks to receive notifications when processing completes instead of polling. Set a default webhook URL in your account settings, or override per-request with the webhook_url parameter. See Webhooks for configuration details.

Rate Limits

Default rate limits apply per API key. If you exceed limits, you’ll receive a 429 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.