> ## 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 ID

> Reference your Studio pipelines with a single ID that keeps your code lightweight, maintainable, and always in sync.

## Overview

Pipeline IDs let you turn any pipeline configuration created in Studio into a stable, unique identifier that you can reference directly in your code. Instead of embedding long API calls or large schema JSON blocks in your codebase, you can simply use a short, three-line snippet that calls the pipeline endpoint. When you update the pipeline in Studio, those changes are automatically reflected wherever the Pipeline ID is used—no code updates required.

## How It Works

A Pipeline ID points directly to a specific pipeline instance in Studio. This ensures your API calls always stay in sync with the configuration you see in Studio, guaranteeing identical behavior between the Studio interface and your production environment.

Because the Pipeline ID keeps your code linked to the latest version of your pipeline, you no longer need to manually update schemas, parameters, or configuration details in your code. Any updates made in Studio automatically propagate after deployment, reducing maintenance overhead and significantly minimizing the amount of code needed in production.

## How to Enable Pipeline ID

Once your Studio configurations have been finalized, select **Deploy**, then choose **Pipeline**. You may optionally provide a version name for the new pipeline before clicking **Deploy**.

After deployment, pipeline updates take effect immediately. Any changes made **before** deploying will **not** be reflected when using your Pipeline ID.

Invocations are then provided in Python, TypeScript, and REST.

## Usage Examples

<CodeGroup>
  ```python Python theme={null}
  # pip install reductoai
  from pathlib import Path
  from reducto import Reducto

  client = Reducto()
  # Replace with your file path
  upload = client.upload(file=Path("sample.pdf"))

  result = client.pipeline.run(
      input=upload,
      pipeline_id="your_pipeline_id_here"
  )
  ```

  ```typescript TypeScript theme={null}
  // npm install reductoai
  import Reducto from 'reductoai';
  import fs from 'fs';

  const client = new Reducto();
  const upload = await client.upload({
      // Replace with your file path
      file: fs.createReadStream("sample.pdf")
  });

  const result = await client.pipeline.run({
      input: upload,
      pipeline_id: "your_pipeline_id_here"
  });
  ```

  ```bash REST theme={null}
  # Upload a file
  curl -X POST "https://platform.reducto.ai/upload" \
    -H "Authorization: Bearer api_key" \
    -F "file=@/path/to/sample.pdf"

  # Example response: {"file_id":"reducto://abc123.pdf"}

  # Run the pipeline
  curl -X POST "https://platform.reducto.ai/pipeline" \
    -H "Authorization: Bearer api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "input": "reducto://abc123.pdf",
      "pipeline_id": "your_pipeline_id_here"
    }'
  ```
</CodeGroup>

## How to Update Pipeline

After all updates are made, select **Deploy** and then **Pipeline**. Update the version name of the revised pipeline and click **Redeploy**. All of your changes will go live in production immediately and update the active pipeline.
