Skip to main content
The pipeline.run() method combines parse and extract operations in a single request.

Basic Usage

The pipeline endpoint runs a pre-configured pipeline (created in Studio) that combines parse and extract operations:
import Reducto from 'reductoai';
import fs from 'fs';

const client = new Reducto();

// Upload
const upload = await client.upload({ 
  file: fs.createReadStream("invoice.pdf") 
});

// Run pipeline using a pipeline ID from Studio
const result = await client.pipeline.run({
  input: upload.file_id,
  pipeline_id: "your-pipeline-id-here"
});

// Access results (structure depends on pipeline configuration)
console.log("Pipeline result:", result);

Method Signatures

Synchronous Pipeline

pipeline.run(params: {
  input: string | Upload;
  pipeline_id: string;
}, options?: RequestOptions): Promise<PipelineResponse>

Asynchronous Pipeline

pipeline.runJob(params: {
  input: string | Upload;
  pipeline_id: string;
  async?: ConfigV3AsyncConfig;
}, options?: RequestOptions): Promise<PipelineRunJobResponse>

Creating Pipelines

Pipelines are created in Reducto Studio. A pipeline combines:
  • Parse configuration (chunking, formatting, etc.)
  • Extract configuration (schema, citations, etc.)
Once created, you get a pipeline_id that you can use in your code.

Next Steps