Skip to main content

Document Processing Pipelines

A pipeline is a sequence of API calls that process a document from raw file to structured data. You define each step in the Pulse Playground, test it interactively, then deploy it at scale using the generated SDK code.

Supported Pipelines

The most common valid pipeline configurations are:

How It Works

Step 0 (optional): Classify

When you process mixed document types (invoices, bank statements, contracts, …), each type usually needs different extraction settings. Call /classify with the raw document and a set of candidate classifications — each optionally carrying a pipeline_id — and it returns which classification matched, so you can route the document to the right pipeline before extracting. By default, it evaluates the first five pages and costs half the /extract rate.
Classify always returns one of the classifications you supplied — it never reports “no match” on its own. Always include a catch-all class and leave off its pipeline_id, then branch on the null. See Always include a catch-all classification.
If all your documents are the same type, skip this step and start at extract.

Step 1: Extract

Every pipeline’s processing starts with /extract (classify, if used, only decides which pipeline runs). This processes your document and returns markdown content, bounding boxes, and optional figures.
Storage is enabled by default. The extraction_id returned in the response is used to reference the saved extraction in subsequent pipeline steps. If you explicitly disable storage (storage.enabled: false), the extraction won’t be available for split or schema steps.

Step 2 (Option A): Schema Extraction

For documents where you need structured data from the entire document, call /schema with the extraction_id:

Step 2 (Option B): Split Document

For multi-section documents (annual reports, contracts, medical records), call /split to identify which pages contain each topic:

Step 3: Schema on Split Results

After splitting, call /schema with the split_id to apply different schemas to each topic’s pages:

Saved Configurations

Each step’s configuration can be saved to a config library for reuse:
  • Extraction configs — page ranges, figure settings, chunking options
  • Split configs — topic definitions with names and descriptions
  • Schema configs — JSON schemas with prompts and effort settings
When a step uses a saved config, you reference it by ID instead of passing the full configuration inline:
This makes your pipeline code cleaner and ensures consistency when processing many documents with the same configuration.

From Playground to Production

The Pulse Platform lets you build and test pipelines interactively:
  1. Configure each step using the visual pipeline builder
  2. Run the pipeline on a test document to verify results
  3. Save the pipeline — each step’s config is saved to your library
  4. Export — click the Show Code button in the top-right corner of the extraction results panel
The Show Code feature generates ready-to-use SDK code (Python, TypeScript, or cURL) that replicates your exact pipeline configuration. If your steps use saved presets, the generated code references their config IDs directly — no need to copy-paste JSON schemas.

Deploying at Scale

Once you have the generated code, you can deploy it in production to process documents at scale:
For high-throughput processing, use async: true on each step and poll for results:
See Polling for Results for details on async processing.

Pipeline Steps Reference

Classify

Step 0 (optional) — Route a raw document to the right pipeline by type

Extract

Step 1 — Parse documents into markdown, tables, and figures

Split

Step 2 — Split document into topic-based page groups

Schema

Step 2/3 — Apply schemas to extract structured data

Tables

Step 2 (terminal) — Extract structured tables with span detection and cross-page merging

Batch Processing

Run any pipeline step across many documents in parallel