---
title: "Run several capabilities over one set of files"
---

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

# Run several capabilities over one set of files

Path: CloudRaker Paperwork API › Capabilities

`POST /v1/pipeline`

Runs several capabilities over one set of files in a single call.

Every file is parsed once, then each step runs over the parsed set — **in parallel, not chained**. A step never consumes another step's output.

**A step is one of:**

- `{ "extract": {…} }`, `{ "redact": {…} }`, `{ "fill": {…} }`, `{ "sign": {…} }` — the same inline config the matching verb takes.
- `{ "action": "act_… | slug", "params": {…} }` — a [saved action](https://docs.cloudraker.com/paperwork/api/actions/get-action).

There is no `parse` step: parsing is automatic.

**Always asynchronous.** The response is `202` carrying the run id and one `{id, capability}` per step. Poll [the run](https://docs.cloudraker.com/paperwork/api/runs/get-run) — its `steps[]` reports each step's status and result under the id you were handed at create.

```json
{
  "files": [{ "id": "a04d6597-4e34-4a99-94ea-964c289a4c68" }],
  "steps": [
    { "extract": { "schema": { "type": "object", "properties": { "business_name": { "type": ["string", "null"] } } } } },
    { "redact": { "mode": "targeted" } }
  ]
}
```

**Learn more:** [Pipeline guide](https://docs.cloudraker.com/paperwork/capabilities/pipeline)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `files` (`pipeline.files`; array<any of>, required) — The input files, up to 100. They are parsed once and every step sees the same parsed set.
  - any of:
    - `object`
      - `url` (`pipeline.files.1.url`; string, required)
        - format `uri`
      - `name` (`pipeline.files.1.name`; string, optional)
        - minLength 1
      - `processing` (`pipeline.files.1.processing`; string, optional)
        - one of `"auto"`, `"ocr"`, `"simple"`, `"transcribe"`, `"transcribe_diarize"`
    - `object`
      - `id` (`pipeline.files.2.id`; string, required)
        - minLength 1
      - `ephemeral` (`pipeline.files.2.ephemeral`; boolean, optional) — Purge this file with the run (TTL expiry or `DELETE /v1/runs/{id}`), unless you `keep` the run. API workspace only: ignored under `/v1/spaces/{spaceId}/…`.
- `steps` (`pipeline.steps`; array<V1PipelineStep>, required) — What to run over the files — up to 20 steps, executed in parallel rather than chained. Each step is either an inline capability config (`{ "extract": {…} }`, `{ "redact": {…} }`, `{ "fill": {…} }`, `{ "sign": {…} }`) or a saved action (`{ "action": "…", "params": {…} }`). There is no `parse` step: parsing is automatic. A step never consumes another step's output.
  - any of:
    - `object`
      - `extract` (`pipeline.steps.1.extract`; object, required)
        - `schema` (`pipeline.steps.1.extract.schema`; map<unknown>, optional) — The shape to extract, as a JSON Schema object. Send `action` instead to use a saved shape, or neither to have one inferred. The root must be `{"type": "object"}`. The dialect is deliberately narrow — no `$ref`, `$defs`, `oneOf`, `anyOf`, `allOf`, `const` or `pattern` — with a maximum nesting depth of 5 and a 64 KB size limit. Make primitives nullable (`{"type": ["string", "null"]}`) so a missing value reads as `null` rather than a hallucination.
        - `action` (`pipeline.steps.1.extract.action`; string, optional) — A saved action to run, by id or slug. An alternative to `schema`. The action carries the output shape and any saved settings. Config you send inline on the same call is merged over it, so `action` plus `instructions` refines a saved action for one run without redefining it.
          - minLength 1; example `"act_01JQ8ZKMRT4V6WXYZ0ABCDEFGH"`
        - `hints` (`pipeline.steps.1.extract.hints`; string, optional) — Prose guidance for **schema inference** — only valid when you send neither `schema` nor `action`. Say what the documents are and what matters in them ("freight bills of lading; I care about the load number, the shipper and the total") and the shape is inferred from the document itself. Sending `hints` alongside `schema` or `action` is a `400`: the shape is already decided.
          - maxLength 2000
        - `instructions` (`pipeline.steps.1.extract.instructions`; string, optional) — Free-form guidance for the extraction, applied on top of the schema — house rules, formatting preferences, how to handle ambiguity.
        - `citations` (`pipeline.steps.1.extract.citations`; boolean, optional) — Whether to ground each extracted value in the source document. Off by default — grounding is an explicit add-on, so send `citations: true` to ask for it. When on, `output.citations` maps every extracted field to where it came from — `fileId` plus page and bounding box for documents, or `timecodeStart`/`timecodeEnd` for audio. A field the documents simply do not contain comes back as an entry with `notFound: true` and no location.
        - `unit` (`pipeline.steps.1.extract.unit`; string, optional) — What one extraction result covers. - `per_document`: one result object per file (the default). - `across_documents`: one result object for the whole set. The files are read together as one source, in the order you list them, so a recording split into parts reads as one recording. Audio mixed with documents cannot be read as one source: each file is then extracted on its own and the results are merged. - `rows_per_document`: a list of results per file, for documents that hold repeated records.
          - one of `"per_document"`, `"across_documents"`, `"rows_per_document"`
        - `judge` (`pipeline.steps.1.extract.judge`; boolean, optional) — Run a second review pass that scores each extracted value against the evidence it cites, adding a `confidence` (0–5) and leaving the values themselves alone. **It is the only pass that scores**: grounding cites without grading, so an unjudged run returns citations with no `confidence`. Slower and more thorough; worth it on documents where an error is expensive. **The judge audits citations, so it needs `citations: true`.** It scores cited evidence and never re-extracts, so with grounding off there is nothing for it to audit. Sending `judge: true` with `citations: false` is a `400`. When you name an `action`, the saved config's `citations` setting counts — a judge on a saved action that does not ground does nothing.
    - `object`
      - `redact` (`pipeline.steps.2.redact`; object, required)
        - `categories` (`pipeline.steps.2.redact.categories`; array<string>, optional) — What counts as sensitive, as free text, not an enum. Each hit reports back under the label you asked for, copied exactly. **This list replaces the [defaults](https://docs.cloudraker.com/paperwork/capabilities/redact#what-counts-as-sensitive); it does not extend them.** Sending a shorter list leaves everything outside it in the file. To keep the defaults and add to them, repeat the defaults next to your own entries.
          - minLength 1
        - `instructions` (`pipeline.steps.2.redact.instructions`; string, optional)
          - maxLength 4000
        - `mode` (`pipeline.steps.2.redact.mode`; string, optional)
          - one of `"targeted"`, `"lines"`
        - `style` (`pipeline.steps.2.redact.style`; string, optional)
          - one of `"beep"`, `"silence"`
        - `action` (`pipeline.steps.2.redact.action`; string, optional)
          - minLength 1
    - `object`
      - `fill` (`pipeline.steps.3.fill`; object, required)
        - `template` (`pipeline.steps.3.fill.template`; any of, optional) — The blank form to fill, given one of two ways. - `{ "id": "…" }` — a saved template from `POST /v1/templates`, or any file you own. - `{ "url": "…", "name"?: "…" }` — fetched for this run only and purged with it. Optional when `action` names a saved config that carries one — sending it inline still wins.
          - any of:
            - `object`
              - `id` (`pipeline.steps.3.fill.template.1.id`; string, required)
                - minLength 1
            - `object`
              - `url` (`pipeline.steps.3.fill.template.2.url`; string, required)
                - format `uri`
              - `name` (`pipeline.steps.3.fill.template.2.name`; string, optional)
                - minLength 1
        - `instructions` (`pipeline.steps.3.fill.instructions`; string, optional) — Free-form guidance for the drafting pass — which source document wins a conflict, how to format dates, which fields to leave blank.
          - maxLength 4000
        - `output` (`pipeline.steps.3.fill.output`; string, optional) — What the produced PDF looks like. `flattened` (the default) bakes the values in so nothing can be changed; `editable` leaves the form fillable.
          - one of `"flattened"`, `"editable"`
        - `action` (`pipeline.steps.3.fill.action`; string, optional) — A saved fill action to run, by id or slug. Config you send inline is merged over the saved config.
          - minLength 1
    - `object`
      - `sign` (`pipeline.steps.4.sign`; object, required)
        - `signers` (`pipeline.steps.4.sign.signers`; array<object>, required) — Who can sign — up to 50 people, each with a `name` and an `email`. Omitted `routingOrder` means everyone signs in parallel. Set increasing steps for ordered signing; use a shared `signingGroup` for any-one signing. Every signer verifies their email with a one-time code, then signs by typing their name. Track them individually at `GET /v1/runs/{id}/envelope`.
          - `name` (`pipeline.steps.4.sign.signers.name`; string, required)
            - minLength 1; maxLength 200
          - `email` (`pipeline.steps.4.sign.signers.email`; string, required)
            - format `email`; pattern `^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
          - `delegated` (`pipeline.steps.4.sign.signers.delegated`; boolean, optional) — True if your organization signs on this person’s behalf instead of them signing directly. Requires the e-signature-delegation entitlement and `templateId`. Ignored on `cc`.
            - default `false`
          - `routingOrder` (`pipeline.steps.4.sign.signers.routingOrder`; integer, optional) — Signing step. People in the same step sign in parallel; later steps wait.
            - max 9007199254740991; default `1`
          - `signingGroup` (`pipeline.steps.4.sign.signers.signingGroup`; string, optional) — People with the same group share one signing slot. The first to sign completes it.
            - minLength 1; maxLength 100
          - `fieldIndex` (`pipeline.steps.4.sign.signers.fieldIndex`; integer, optional) — Document tag number. A group shares one number; otherwise defaults to roster position.
            - max 9007199254740991
        - `expiresInDays` (`pipeline.steps.4.sign.expiresInDays`; integer, optional) — Days recipients have to complete signing, measured from dispatch. From 1 to 90; defaults to 7.
          - min 1; max 90; default `7`
        - `templateId` (`pipeline.steps.4.sign.templateId`; string, optional) — Identifies the template your org signs delegated envelopes from. Consent is granted per template, so this is the scope the signer agrees to. A document produced by `POST /v1/compose` or `POST /v1/fill` carries its template sealed inside it and that value is used; this field is then ignored. Send it only for a delegated envelope whose document has no sealed template. Ignored when no signer is `delegated`.
          - minLength 1
        - `templateName` (`pipeline.steps.4.sign.templateName`; string, optional) — Human-readable name of that template. Shown to the signer when their consent is requested, and printed on the audit page of every document signed under it. Like `templateId`, the value sealed into a composed or filled document wins. Required when any `signers[]` entry has `delegated: true` and the document carries no sealed template name: either the document has no seal, or its seal has no name. In the second case, also send the sealed `templateId`, or the run fails. Ignored otherwise.
          - minLength 1; maxLength 200
        - `message` (`pipeline.steps.4.sign.message`; string, optional) — A note included in the invitation email each signer receives.
          - maxLength 2000
        - `placement` (`pipeline.steps.4.sign.placement`; string, optional) — Where signatures land in the document. `page` appends a signature certificate page. `tags` replaces `[Signature N]` placeholders for each required signing slot. Optional `[Initials N]` and `[Date N]` tags add initials and signing dates. Any-one groups share their `fieldIndex` slot.
          - one of `"page"`, `"tags"`; default `"page"`
        - `cc` (`pipeline.steps.4.sign.cc`; array<object>, optional) — Informed-only recipients. CC parties do not sign, receive no OTP or signature tag, and are emailed the sealed document when the envelope completes.
          - `name` (`pipeline.steps.4.sign.cc.name`; string, required)
            - minLength 1; maxLength 200
          - `email` (`pipeline.steps.4.sign.cc.email`; string, required)
            - format `email`; pattern `^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
          - `delegated` (`pipeline.steps.4.sign.cc.delegated`; boolean, optional) — True if your organization signs on this person’s behalf instead of them signing directly. Requires the e-signature-delegation entitlement and `templateId`. Ignored on `cc`.
            - default `false`
        - `language` (`pipeline.steps.4.sign.language`; string, optional) — Language of every recipient-facing asset — invitation and code emails, the signing page, and the audit certificate. Applies to all signers and CC parties. Defaults to en.
          - one of `"en"`, `"fr"`; default `"en"`; example `"fr"`
    - `object`
      - `parse` (`pipeline.steps.5.parse`; map<unknown>, required)
    - `object`
      - `action` (`pipeline.steps.6.action`; string, required)
        - minLength 1
      - `config` (`pipeline.steps.6.config`; map<unknown>, optional)
      - `params` (`pipeline.steps.6.params`; map<unknown>, optional)
- `metadata` (`pipeline.metadata`; map<unknown>, optional) — Arbitrary JSON you attach to the run and get back on every read of it. Use it to carry your own identifiers — an order number, a customer id — so a webhook or a polled run reconciles without a lookup table. Capped at 10 KB serialized.
- `webhook` (`pipeline.webhook`; any of, optional) — Where to deliver this run's events, given one of two ways. - `{ "url": "…" }` — a one-off https endpoint for this run only. - `{ "id": "whe_…" }` — a saved endpoint from `POST /v1/webhooks`. Runs hold the reference, so pausing or re-pointing that endpoint applies to this run too. Deliveries are at-least-once and signed — dedupe on `eventId` and verify against `GET /v1/webhooks/jwks.json`.
  - any of:
    - `object`
      - `url` (`pipeline.webhook.1.url`; string, required)
        - format `uri`
    - `object`
      - `id` (`pipeline.webhook.2.id`; string, required)
        - minLength 1
- `ttl` (`pipeline.ttl`; integer, optional) — How long, in seconds, to keep this run and its files before purging them automatically. The maximum is 604800 (7 days). The deadline comes back as `expiresAt` on every read of the run. Call `POST /v1/runs/{id}/keep` before then to clear the TTL and move the results into a space permanently. E-signature runs are exempt — an envelope waits for its signers however long that takes.
  - min 1; max 604800; default `86400`

## Example request

```json
{
  "files": [
    {
      "url": "http://example.com",
      "name": "string",
      "processing": "auto"
    }
  ],
  "steps": [
    {
      "extract": {
        "schema": {
          "property1": null,
          "property2": null
        },
        "action": "act_01JQ8ZKMRT4V6WXYZ0ABCDEFGH",
        "hints": "string",
        "instructions": "string",
        "citations": true,
        "unit": "per_document",
        "judge": true
      }
    }
  ],
  "metadata": {
    "property1": null,
    "property2": null
  },
  "webhook": {
    "url": "http://example.com"
  },
  "ttl": 86400
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/v1/pipeline \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "files": [
    {
      "url": "http://example.com",
      "name": "string",
      "processing": "auto"
    }
  ],
  "steps": [
    {
      "extract": {
        "schema": {
          "property1": null,
          "property2": null
        },
        "action": "act_01JQ8ZKMRT4V6WXYZ0ABCDEFGH",
        "hints": "string",
        "instructions": "string",
        "citations": true,
        "unit": "per_document",
        "judge": true
      }
    }
  ],
  "metadata": {
    "property1": null,
    "property2": null
  },
  "webhook": {
    "url": "http://example.com"
  },
  "ttl": 86400
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/pipeline';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    files: [{url: 'http://example.com', name: 'string', processing: 'auto'}],
    steps: [
      {
        extract: {
          schema: {property1: null, property2: null},
          action: 'act_01JQ8ZKMRT4V6WXYZ0ABCDEFGH',
          hints: 'string',
          instructions: 'string',
          citations: true,
          unit: 'per_document',
          judge: true
        }
      }
    ],
    metadata: {property1: null, property2: null},
    webhook: {url: 'http://example.com'},
    ttl: 86400
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/pipeline"

payload = {
    "files": [
        {
            "url": "http://example.com",
            "name": "string",
            "processing": "auto"
        }
    ],
    "steps": [{ "extract": {
                "schema": {
                    "property1": None,
                    "property2": None
                },
                "action": "act_01JQ8ZKMRT4V6WXYZ0ABCDEFGH",
                "hints": "string",
                "instructions": "string",
                "citations": True,
                "unit": "per_document",
                "judge": True
            } }],
    "metadata": {
        "property1": None,
        "property2": None
    },
    "webhook": { "url": "http://example.com" },
    "ttl": 86400
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 202

Accepted.

#### Example

```json
{
  "object": "pipeline_run",
  "id": "string",
  "status": "queued",
  "statusUrl": "string",
  "steps": [
    {
      "id": "string",
      "capability": "extract"
    }
  ]
}
```

- `object` (`pipeline.response.202.object`; string, required)
- `id` (`pipeline.response.202.id`; string, required)
- `status` (`pipeline.response.202.status`; string, required) — Where the run is in its life. | Status | Meaning | | --- | --- | | `queued` | Accepted, not started | | `processing` | Work in flight | | `needs_input` | Waiting for an external action, such as an e-signature | | `processed` | Finished; `output` is populated | | `failed` | Finished unsuccessfully | | `cancelled` | Stopped on request | | `expired` | TTL elapsed and the data was purged | The last four are terminal.
  - one of `"queued"`, `"processing"`, `"processed"`, `"failed"`, `"cancelled"`, `"expired"`, `"needs_input"`
- `statusUrl` (`pipeline.response.202.statusUrl`; string, required)
- `steps` (`pipeline.response.202.steps`; array<object>, required)
  - `id` (`pipeline.response.202.steps.id`; string | null, required)
  - `capability` (`pipeline.response.202.steps.capability`; string, required)
    - one of `"extract"`, `"parse"`, `"redact"`, `"fill"`, `"sign"`, `"classify"`, `"split"`, `"action"`

### 400

Invalid request (`invalid_request` / `invalid_schema`).

### 422

Unusable input file or webhook endpoint.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`pipeline.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`pipeline.response.429.message`; string, required)
- `retryable` (`pipeline.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`pipeline.response.429.requestId`; string, required)
- `docUrl` (`pipeline.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/capabilities/pipeline/index.md
