Skip to main content

Overview

Pipelines let you chain multiple Aifano operations into a single API call. Instead of calling /parse, then /extract separately, define a pipeline once and run it with one request.

How Pipelines Work

A pipeline is a sequence of processors that execute in order:
1

Define Processors

Choose which operations to include: Parse, Extract, Split, or Edit. Each processor has its own configuration.
2

Upload Documents

Add documents to the pipeline via the Studio UI or the API.
3

Execute

Call /pipeline (sync) or /pipeline_async (async) to run all processors in sequence on your document.
4

Get Results

Receive combined results from all processors in a single response.

Pipeline Types

Pipelines are defined by the combination of processors they include:
TypeProcessorsDescription
parseParseParse documents into structured JSON
extractParse → ExtractParse and extract structured data
splitSplitSplit documents into sections
parse_extractParse → ExtractFull parsing with data extraction
parse_splitParse → SplitParse and split into sections
split_extractSplit → ExtractSplit sections and extract data
parse_split_extractParse → Split → ExtractFull pipeline with all operations

Basic Usage

curl -X POST "https://platform.aifano.com/pipeline" \
  -H "Authorization: Bearer $AIFANO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "aifano://invoice-bundle.pdf",
    "pipeline_id": "pipe_abc123"
  }'

Creating Pipelines in Studio

The easiest way to create and manage pipelines is through the Aifano Studio:
  1. Navigate to Pipelines in the sidebar
  2. Click Create Pipeline
  3. Choose a name, description, and pipeline type
  4. Configure each processor’s settings
  5. Upload documents and run the pipeline

Processor Configuration

Each processor in a pipeline can be individually configured:

Parse Processor

Controls how documents are parsed into structured content.
{
  "parser_provider": "reducto",
  "enhance": {
    "agentic": [{ "scope": "table" }],
    "summarize_figures": true
  },
  "settings": {
    "ocr_system": "standard",
    "extraction_mode": "hybrid"
  }
}

Extract Processor

Defines the schema for structured data extraction.
{
  "schema": {
    "type": "object",
    "properties": {
      "invoice_number": { "type": "string" },
      "total": { "type": "number" }
    }
  },
  "system_prompt": "Extract all monetary values in EUR."
}

Split Processor

Configures how documents are divided into sections.
{
  "split_description": [
    { "title": "Invoice", "description": "The main invoice document" },
    { "title": "Receipt", "description": "Payment receipt or confirmation" }
  ]
}

Async Pipelines

For large documents or batch processing, use the async variant:
curl -X POST "https://platform.aifano.com/pipeline_async" \
  -H "Authorization: Bearer $AIFANO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "aifano://large-document.pdf",
    "pipeline_id": "pipe_abc123"
  }'
See Async Processing for details on polling and webhooks.

Common Use Cases

Invoice Processing

Parse invoices, extract line items and totals, and split bundled documents — all in one call.

Contract Review

Split contract packages into sections, parse each section, and extract key terms and dates.

Claims Processing

Split claim packages, extract policyholder data, and route sections to the right department.

Document Intake

Automatically classify, split, and extract data from mixed document uploads.