Run pipeline
run_pipelineRun multiple string transformations in a single call, where each step's output feeds the next. Supports branches, macros, and per-item processing.
Instructions
Run several transformations on input in one call: an ordered list of steps (string-utility-belt v3 schema), each step's output feeding the next. Besides utility steps, a pipeline can hold branches (parallel forks merged back together), macros (named sub-pipelines) and "run on each" steps (a sub-pipeline run on every line, delimited piece, JSON array element or JSON object value). Prefer this to chaining run_utility calls; for a single transformation, run_utility is simpler. Returns {output, outputEncoding?, errors, timings, skipped, halted}: errors maps step id to its error message, timings maps step id to milliseconds. Provide exactly one of steps or share (a #/p/<payload> share link, a full URL containing one, or the bare payload). Untrusted step data is sanitized first, so malformed entries are dropped rather than rejected. Refused outright: pipelines with more than 100 steps (nested steps counted), unknown utility ids, enabled steps with invalid params, and any step that would run arbitrary user JavaScript (e.g. "custom_js") — LLM-driven code execution is out of scope. Input is capped at 1,000,000 bytes, output text past 1,000,000 characters is cut off (flagged truncated, with fullLength), and the call is stopped after 20s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The pipeline's source input. | |
| share | No | A share link (or its bare payload) for a previously built pipeline; used instead of `steps`. | |
| steps | No | Pipeline steps (v3 schema). Each entry is either a utility step {id, utilityId, params?, enabled?, condition?, onError?}, a fork {type:"branch", id, branches:[[...steps], [...steps]], merge:{mode:"concat"|"zip"|"json"|"pick", ...}}, a sub-pipeline {type:"macro", id, name, steps:[...steps]}, or a map {type:"each", id, split:{mode:"lines"|"json-array"|"json-values"} or {mode:"delimiter", separator}, steps:[...steps], skipEmpty?} that runs `steps` on every item and puts the results back in place (on an each step, `onError` also decides what a failed item becomes). `condition` gates a step on its input ({kind:"always"|"nonEmpty"|"regex"|"type", ...}); `onError` is "passthrough" (default: record the error, pass the input on), "stop" or "empty". Use [] for the identity pipeline; omit when using `share`. | |
| inputEncoding | No | How to decode `input`. Default "text". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | Step id -> error message, for steps that failed. | |
| halted | Yes | True when a step with onError "stop" failed and ended the pipeline. | |
| output | Yes | The result: text as-is, JSON pretty-printed, bytes as base64. | |
| skipped | Yes | Step id -> why it did not run (disabled, condition, halted, aborted). | |
| timings | Yes | Step id -> milliseconds it took. | |
| truncated | No | True when `output` was cut off at the output limit. | |
| fullLength | No | Length `output` would have had untruncated, when `truncated`. | |
| outputEncoding | No | Present when `output` is base64-encoded bytes. |