Skip to main content
Before you begin, make sure you have:
  1. A Datalab account with an API key (new accounts include $5 in free credits)
  2. Python 3.10+ installed
  3. The Datalab SDK: pip install datalab-python-sdk
  4. Your DATALAB_API_KEY environment variable set

Basic Execution

Run a pipeline on a document:
You can also pass a URL instead of a file:

Version Selection

The version parameter controls which pipeline configuration runs:
If you omit version and no version has been published, the draft runs. Publish a version before using a pipeline in production to avoid running unfinished drafts.

Run-Level Overrides

Override pipeline behavior per execution without changing the pipeline configuration:

Override Reference

Execution Status

Poll for status using get_pipeline_execution():

Status Values

Per-Processor Tracking

Each processor in the execution reports its own status:
Step status values: pending, dispatched, running, completed, failed, skipped.

Retrieve Processor Results

Fetch the output of a specific processor:
Results are deleted from Datalab servers one hour after processing completes. Retrieve your results promptly.

Webhooks

Get notified when a pipeline execution completes instead of polling:
Datalab sends a POST request to your webhook URL when the execution reaches a terminal status. See Webhooks for payload details.

List Executions

View recent executions for a pipeline:

Billing

Pipeline execution is billed per page, with rates additive across processors. Each processor type has its own per-page rate. Check a pipeline’s rate before running:

End-to-End Example

Create a pipeline, publish it, and run it in production:

Next Steps

Pipeline Overview

Processor types, composition rules, and when to use pipelines.

Pipeline Versioning

Manage drafts, versions, and production pinning.

Webhooks

Configure webhook notifications for pipeline executions.

SDK Reference

Full SDK reference for all pipeline methods.