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:
Or sign in once with a device code:
datalab login saves the key to ~/.config/datalab/config.json, readable only by your user. Every datalab command uses it when DATALAB_API_KEY is not set and --api_key is not passed.
datalab login needs SDK 0.7.0 or newer.

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

To request phrase citations with SDK 0.9.2 or later (open beta; the format may change):

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 files, PDFs, and images. DOCX files use exact XML extraction; PDFs and images use a vision model.

Basic Usage

Track Changes Command Reference

Published Processor (Beta)

This feature is currently in beta. The API may change.
Run an existing published processor that your team can access:
The processor determines its task and output format. See Run a Published Processor for prerequisites and SDK examples.
The custom-pipeline command uses deprecated endpoints with an announced sunset of October 31, 2026. Replace it with agent --processor; see the migration guide.

Create Document

Create a DOCX document from markdown with track changes.

Basic Usage

Create Document Command Reference

Compare (Open Beta)

This feature is currently in beta. The API may change.
Compare 2 to 4 variants of a pipeline on the same files, and see which one reads them best. See Compare with the SDK and API for the request and response shapes. These commands need SDK 0.11.0 or later. datalab eval is the deprecated SDK 0.10.0 name of these commands.

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.