Skip to main content

Installation

The CLI is included with the SDK:

Authentication

Set your API key as an environment variable:
Or pass it with each command:

Convert Documents

Convert documents to markdown, HTML, JSON, or chunks.

Basic Usage

Output Options

Processing Options

Advanced Options

Directory Processing

Convert all documents in a directory:

Convert Command Reference

Extract Structured Data

Extract structured data from documents using a JSON schema.

Basic Usage

Extract Command Reference

Segment Documents

Segment documents into logical sections using a schema.

Basic Usage

Segment Command Reference

Track Changes

Extract tracked changes from DOCX documents.

Basic Usage

Track Changes Command Reference

Custom Processor

The custom-pipeline CLI command is deprecated. It continues to work and calls the new /api/v1/custom-processor endpoint internally, but the command name itself will be updated in a future SDK release.
Execute a custom processor on a document.

Basic Usage

Custom Processor Command Reference

Create Document

Create a DOCX document from markdown with track changes.

Basic Usage

Create Document Command Reference

Examples

Batch Convert PDFs

Extract Data from Documents

High-Throughput Processing

Getting Help

Next Steps

Quickstart

Get up and running with Datalab in minutes.

Batch Processing

Process multiple documents efficiently in parallel.

SDK Reference

Explore the full Python SDK for advanced usage.

Supported File Types

See all document formats supported by Datalab.