Skip to main content

Get Your API Key

Sign up at datalab.to/auth/sign_up — new accounts include a free monthly usage allowance (no credit card required), enough to run a full proof of concept on your own documents. Then grab your API key from the API Keys dashboard.
Want to try before writing code? Upload a document to the Forge Playground to see results instantly — no API key required.

Installation

Install the Datalab SDK:
Set your API key as an environment variable:

Convert a Document

The SDK provides a simple interface to convert documents to Markdown, HTML, JSON, or chunks.
Common mistakes:
  • Forgetting to set the DATALAB_API_KEY environment variable
  • Using file_url with a private/authenticated URL (must be publicly accessible)
  • Not polling for results — the initial response only contains a request_id, not the actual output

Conversion Options

Control the conversion with options:

Processing Modes

Fill PDF Forms

Fill forms in PDFs or images with structured data:

Upload and Manage Files

Upload files to Datalab for use in pipelines:

CLI

The SDK includes a command-line interface:

Run a Pipeline

Pipelines chain processors (convert, extract, segment) into a single reusable call. Create them in Forge or via the SDK:
See Pipelines for creating, versioning, and running pipelines.

Async Support

For high-throughput applications, use the async client:

Next Steps

SDK Reference

Full Python SDK documentation with typed clients and async support.

API Reference

REST API reference for document conversion, form filling, and file management.

Pipelines

Chain processors into versioned, reusable pipelines.

Document Conversion

Detailed guide to converting PDFs and documents to Markdown, HTML, or JSON.