Skip to main content
POST
/
api
/
v1
/
pipelines
/
{pipeline_id}
/
run
Run Pipeline
import requests

url = "https://www.datalab.to/api/v1/pipelines/{pipeline_id}/run"

files = { "file.0": ("example-file", open("example-file", "rb")) }
payload = {
    "file_url": "<string>",
    "page_range": "<string>",
    "output_format": "<string>",
    "run_evals": "false",
    "skip_cache": "false",
    "webhook_url": "<string>",
    "version": "1",
    "file": "<string>"
}
headers = {"X-API-Key": "<api-key>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
{
  "execution_id": "<string>",
  "pipeline_id": "<string>",
  "pipeline_version": 123,
  "status": "<string>",
  "steps": [
    {
      "step_index": 123,
      "step_type": "<string>",
      "status": "<string>",
      "lookup_key": "<string>",
      "result_url": "<string>",
      "started_at": "2023-11-07T05:31:56Z",
      "finished_at": "2023-11-07T05:31:56Z",
      "error_message": "<string>",
      "source_step_type": "<string>",
      "checkpoint_id": "<string>"
    }
  ],
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "created": "2023-11-07T05:31:56Z",
  "config_snapshot": {},
  "input_config": {},
  "rate_breakdown": {}
}

Authorizations

X-API-Key
string
header
required

Path Parameters

pipeline_id
string
required

Cookies

wos-session
string
datalab_active_team
string

Body

multipart/form-data
file_url
string | null

Optional file URL (http/https). If provided, the server will download and process it.

page_range
string | null

Page range to process, e.g. '0,2-4'.

output_format
string | null

Output format: json, html, markdown, or chunks.

run_evals
boolean
default:false

Whether to run evaluation steps.

skip_cache
boolean
default:false

Skip the executor cache and re-run all steps.

webhook_url
string | null

URL to POST when the execution completes.

version
integer | null

Pipeline version to execute. 0 = use draft steps. Omit to use the active published version (or draft if unpublished).

Required range: x >= 0
file
file | null

Input PDF, word document, powerpoint, or image file, uploaded as multipart form data. Images must be png, jpg, or webp format.

Response

Successful Response

execution_id
string
required
pipeline_id
string
required
pipeline_version
integer
required
status
string
required
steps
PipelineExecutionStepResponse · object[]
required
started_at
string<date-time> | null
completed_at
string<date-time> | null
created
string<date-time> | null
config_snapshot
Config Snapshot · object
input_config
Input Config · object
rate_breakdown
Rate Breakdown · object