POST /v1/pipeline takes one file set and a list of steps. CloudRaker parses each file once. Each step then runs over the parsed set. This JSON, inline-config API replaces the multipart /process API.
How it works
- You send files (URLs or file ids) and steps.
- Each step is one of
{"extract": {…}},{"redact": {…}},{"fill": {…}}, or{"sign": {…}}. Each takes the same inline config as the matching verb. A step can also be{"action": "<id or slug>", "params": {…}}for a saved config. There is noparsestep. Parsing is automatic. - The response is
202. It contains the pipeline id (plr_…) and one typed id per step, in the order you sent them. GET /v1/runs/plr_…returnssteps[]. Each step has its ownid,capability,status, and result.
Quickstart
curl -X POST https://api.cloudraker.com/v1/pipeline \
-H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [{ "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "name": "w9.pdf" }],
"steps": [
{ "extract": { "citations": true, "schema": { "type": "object", "properties": { "form_number": { "type": ["string", "null"] } } } } },
{ "redact": { "categories": ["ein"], "mode": "targeted" } }
],
"ttl": 86400
}'const res = await fetch("https://api.cloudraker.com/v1/pipeline", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAKER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
files: [{ url: "https://www.irs.gov/pub/irs-pdf/fw9.pdf", name: "w9.pdf" }],
steps: [
{ extract: { citations: true, schema: { type: "object", properties: { form_number: { type: ["string", "null"] } } } } },
{ redact: { categories: ["ein"], mode: "targeted" } },
],
}),
});
const { id, steps } = await res.json(); // 202
console.log(id, steps.map((s) => `${s.capability} ${s.id}`));import os, requests
res = requests.post(
"https://api.cloudraker.com/v1/pipeline",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAKER_API_KEY']}"},
json={
"files": [{"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "name": "w9.pdf"}],
"steps": [
{"extract": {"citations": True, "schema": {"type": "object", "properties": {"form_number": {"type": ["string", "null"]}}}}},
{"redact": {"categories": ["ein"], "mode": "targeted"}},
],
},
)
run = res.json() # 202
print(run["id"], [s["capability"] for s in run["steps"]])Example response
The create call returns the handle and the step ids:
{
"object": "pipeline_run",
"id": "plr_01KYD7F40BGQA7WXB50ENSQEK1",
"status": "queued",
"statusUrl": "/v1/runs/plr_01KYD7F40BGQA7WXB50ENSQEK1",
"steps": [
{ "id": "exr_01KYD7F40B35TT7XR1KPMFZXJ6", "capability": "extract" },
{ "id": "rdr_01KYD7F40BDN07JRKXRERJYTRE", "capability": "redact" }
]
}Poll GET /v1/runs/plr_…. The response returns the same step ids with attached results:
{
"object": "pipeline_run",
"id": "plr_01KYD7F40BGQA7WXB50ENSQEK1",
"status": "processed",
"expiresAt": "2026-07-26T18:09:16.204Z",
"statusUrl": "/v1/runs/plr_01KYD7F40BGQA7WXB50ENSQEK1",
"files": [
{ "id": "39c1759c-5f47-425a-9ef2-6b9efe51fb7a", "name": "w9.pdf", "status": "processed" }
],
"steps": [
{
"id": "exr_01KYD7F40B35TT7XR1KPMFZXJ6",
"capability": "extract",
"status": "processed",
"output": {
"value": { "form_number": "W-9" },
"citations": {
"form_number": [
{
"fileId": "39c1759c-5f47-425a-9ef2-6b9efe51fb7a",
"page": 0,
"bbox": { "x": 0.0918, "y": 0.0376, "width": 0.0653, "height": 0.0364 },
"text": "Form W-9",
"confidence": 5
}
]
},
"documents": [ /* one entry per input document */ ]
}
},
{
"id": "rdr_01KYD7F40BDN07JRKXRERJYTRE",
"capability": "redact",
"status": "processed",
"output": {
"file": { "id": "e130ad59-6309-44c7-bb27-1106a1c32621", "name": "w9 (redacted).pdf", "url": "https://cdn.cloudraker.com/…/latest?token=…" },
"files": [ /* one redacted file per input document */ ],
"entities": { "ein": 11 },
"skipped": 0
}
}
]
}Key fields
| Field | What it is |
|---|---|
object |
Always pipeline_run. |
id |
The pipeline id (plr_…). |
status |
The status of the pipeline: queued, processing, needs_input, processed, failed, cancelled, or expired. |
files[] |
The shared, parsed-once input set. |
steps[].id |
The typed step id: exr_, rdr_, flr_, sgr_. null for a bare {"action": …} step. |
steps[].capability |
extract, redact, fill, sign, or action. |
steps[].status |
The status of that step. A failed step does not erase the results of the other steps. |
steps[].output |
Exactly the output the matching verb returns. |
Some sub-routes address the sign step: /envelope, /void, /audit, and /signers/:id/resend. A pipeline without a sign step answers 404 not_found.
Configuration
| Field | Type | What it does |
|---|---|---|
files[] |
array of {url, name?, processing?} or {id}, 1–100 |
Required. Parsed once, shared by every step. |
steps[] |
array, 1–20 | Required. The capabilities to run. |
metadata |
object | Your own key/values. The API echoes them back on the run body, not on webhook deliveries. Max 10 KB. |
webhook |
{url} or {id} |
Where to deliver events. See Webhooks. |
ttl |
integer seconds, 1–604800 | How long the pipeline and its files live. Default 24 hours, max 7 days. A pipeline with a sign step is exempt while the envelope is open. |
The API validates step configs the same way as the standalone verbs. An extract step without schema or action fails with 400 invalid_request. A schema that breaks the schema dialect fails with 400 invalid_schema. The codes and messages match POST /v1/extract. Defaults also match. An extract step is ungrounded unless it carries "citations": true. Without that flag, output.citations is absent.
Sync vs async
Pipelines are always asynchronous. POST /v1/pipeline returns 202 and takes no ?wait=. Poll GET /v1/runs/plr_…?wait=<seconds> (0–120) to long-poll for a terminal state. Or subscribe a webhook and wait for processing.completed.
Send an idempotency-key to make retries safe. A replay returns the original pipeline: its id, its current status, and its original step ids. The response carries an idempotent-replay: true header. The API does not start a second run.
Save as an action
Each step accepts a saved config instead of inline config. You can combine the two. Inline fields win:
{
"files": [{ "id": "a04d6597-4e34-4a99-94ea-964c289a4c68" }],
"steps": [
{ "extract": { "action": "medical-intake" } },
{ "action": "hr-offboarding" }
]
}{"extract": {"action": …}} keeps the step typed, so its id is exr_…. It also lets you override fields inline. A bare {"action": …} step runs the saved config with no changes. Its step id is null. See Saved configs.