Skip to main content
post/datasets/{dataset_id}/pipeline/run
Request example
Response
post/datasets/{dataset_id}/pipeline/run

Authorization

Authorizationstringheaderrequired#

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_idstringrequired#
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.

Body

application/json
datasource_info_listobject[]required#
List of datasource objects to process. The expected item structure depends on datasource_type.
datasource_typeenum<string>required#
Type of the datasource. Determines which fields are expected in datasource_info_list items.
Options:local_fileonline_documentwebsite_crawlonline_drive
inputsobjectrequired#
Key-value pairs for pipeline input variables defined in the workflow. Pass {} if the pipeline has no input variables.
is_publishedbooleanrequired#
Whether to run the published version of the pipeline instead of the current draft. Run the draft to test unpublished changes.
response_modeenum<string>required#
Response mode for the pipeline execution. streaming returns a Server-Sent Events stream, blocking waits and returns the complete result.
Options:streamingblocking
start_node_idstringrequired#
ID of the node to start execution from, from List Datasource Plugins.

Responses

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