Run Pipeline
Runs the full knowledge pipeline over one or more datasources. response_mode selects a streaming or blocking response.
Authorizations
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
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.
Body
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 begannode_started/node_finished: per-node progress withnode_id,node_type,status,inputs,outputsworkflow_finished: final result withstatus,outputs,total_tokens,elapsed_timeping: keepalive