---
title: "Create Pipeline"
method: POST
path: "/api/v1/pipelines"
tags: ["pipelines"]
---

# Create Pipeline

`POST /api/v1/pipelines`

Create a new pipeline for the team.

With reuse_draft=true this is find-or-create: the team's most recent
unsaved, unarchived pipeline with an identical ordered step-TYPE chain
(types only — configs are not compared) is reused instead of minting a
duplicate. The reused draft's steps are overwritten with the request's
steps and the response carries reused=true. Saved pipelines are never
reused.

## Cookies

- `wos-session` string
- `datalab_active_team` string

## Request body

- CreatePipelineRequest
  - `steps` PipelineStep[], required — Ordered list of pipeline steps
    - `type` 'convert' | 'extract' | 'segment' | 'custom' | 'fill', required — The type of processing step
    - `settings` object — Step-specific executor settings. For extract steps, includes 'page_schema' (JSON string, same format as the /extract endpoint's page_schema). For segment steps, includes 'segmentation_schema' (JSON string, same format as the /segment endpoint's segmentation_schema). These flow directly to the executor via config.update(settings).
    - `custom_processor_id` string, nullable — Custom processor ID (cp_XXXXX) for custom steps
    - `eval_rubric_id` integer, nullable — Eval rubric ID to score this step's output against
    - `pending_check_url` string, nullable — URL to poll for processor creation status (temporary, cleared on completion)
    - `pending_name` string, nullable — Display name while processor is generating (temporary, cleared on completion)
  - `reuse_draft` boolean — Find-or-create: when true, reuse the team's most recent unsaved, unarchived draft with an identical ordered step-type chain instead of creating a duplicate. Saved pipelines are never reused.

## Response `200`

Successful Response

- PipelineResponse
  - `id` integer, required
  - `pipeline_id` string, required
  - `name` string, nullable, required
  - `steps` unknown[], required
    - unknown
  - `is_saved` boolean, required
  - `archived` boolean, required
  - `active_version` integer, required
  - `created` string, date-time, nullable, required
  - `updated` string, date-time, nullable, required
  - `reused` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/datalab/apis/datalab-api.md) · [All operations](https://skmtc.dev/datalab/apis/datalab-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/datalab/datalab-api/revisions/aa9f8ee18efb/schema)
