Skip to main content
POST
/
datasets
/
{dataset_id}
/
pipeline
/
run
curl --request POST \ --url https://{api_base_url}/datasets/{dataset_id}/pipeline/run \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "inputs": {}, "datasource_type": "local_file", "datasource_info_list": [ { "reference": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "quarterly-report.pdf" } ], "start_node_id": "1719288585006", "is_published": true, "response_mode": "blocking" } '
"<string>"
{
  "status": 400,
  "code": "invalid_param",
  "message": "Pipeline not found"
}
{
  "status": 403,
  "code": "forbidden",
  "message": "Dataset api access is not enabled."
}
{
  "status": 404,
  "code": "not_found",
  "message": "Dataset not found."
}
{
  "status": 500,
  "code": "pipeline_run_error",
  "message": "Pipeline execution failed: connection timeout"
}

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

dataset_id
string<uuid>
required

Knowledge base ID, from List Knowledge Bases.

Body

application/json
inputs
object
required

Key-value pairs for pipeline input variables defined in the workflow. Pass {} if the pipeline has no input variables.

datasource_type
enum<string>
required

Type of the datasource. Determines which fields are expected in datasource_info_list items.

Available options:
local_file,
online_document,
website_crawl,
online_drive
datasource_info_list
(Local File · object | Online Document · object | Website Crawl · object | Online Drive · object)[]
required

List of datasource objects to process. The expected item structure depends on datasource_type.

start_node_id
string
required

ID of the node to start execution from, from List Datasource Plugins.

is_published
boolean
required

Whether to run the published version of the pipeline instead of the current draft. Run the draft to test unpublished changes.

response_mode
enum<string>
required

Response mode for the pipeline execution. streaming returns a Server-Sent Events stream, blocking waits and returns the complete result.

Available options:
streaming,
blocking

Response

Pipeline execution result. Format depends on response_mode: streaming returns a text/event-stream, blocking returns a JSON object.

Server-Sent Events stream. Returned when response_mode is streaming; see SSE Streaming for the wire format.

Key events:

  • workflow_started: execution began
  • node_started / node_finished: per-node progress with node_id, node_type, status, inputs, outputs
  • workflow_finished: final result with status, outputs, total_tokens, elapsed_time
  • ping: keepalive