Skip to main content
Workflow apps run in workflow mode, executing the published workflow once per call and returning its outputs. There’s no conversation state between calls, so each run is independent of any previous one.
Authentication, the base URL, and the user field that scopes end-user data are covered in Get Started and End User Identity.

Run a Workflow

  • Run Workflow: execute the app’s currently published workflow with the input variables you provide. Streaming mode delivers events live as nodes execute; blocking mode returns once the run finishes.
  • Run Workflow by ID: execute a specific published version instead, identified by the workflow_id from an earlier run response or run detail lookup. Available since Dify Enterprise 3.4.1.

Follow and Control a Run

Whichever mode you run in, the response carries two IDs: task_id controls the run while it’s active, and workflow_run_id identifies the persisted record afterward.
  • Stop Workflow Task: cancel an active run by its task_id. Works in streaming mode only; a blocking call has already finished by the time it returns.

Inspect Past Runs

  • Get Workflow Run Detail: a run’s status and outputs, by its workflow_run_id.
  • List Workflow Logs: run-level summaries covering status, token usage, step count, and timing, rather than a node-by-node execution log; filter by keyword, status, date range, or who triggered the run.
For node-level events, call Run Workflow in streaming mode for a run you’re starting instead of listing its logs.

Work with Files

  • Upload File: upload an image, document, audio, or video file, then pass the returned id as upload_file_id in a file-type input variable when you run the workflow. Files are scoped to the uploading end user.

Transcribe and Synthesize Speech

  • Convert Audio to Text: transcribe an uploaded audio file (MP3, M4A, WAV, AMR, or MPGA, up to 30 MB) so end users can speak an input value instead of typing it.
  • Convert Text to Audio: synthesize a workflow’s text output back into speech.

Retrieve App Info and Settings

  • Get App Info: the app’s name, description, tags, and mode.
  • Get App Parameters: the fields your calls send in inputs (names, types, defaults) plus the app’s feature switches—the basis for building requests or a client UI.
  • Get App Meta: tool icons and other configuration metadata.
  • Get App WebApp Settings: the web app’s site configuration, theme, and customization options.