> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipeline

> Run parse and extract in a single request using the JavaScript SDK

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:

```javascript theme={null}
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

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

### Asynchronous Pipeline

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

***

## Creating Pipelines

Pipelines are created in [Reducto Studio](https://studio.reducto.ai/). 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

* Learn about [parse configuration](/sdk/javascript/parse) options
* Explore [extract configuration](/sdk/javascript/extract) options
