> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow App API

> API for Workflow apps, covering workflow execution, run control and streaming, Human Input pauses, and run history

[Workflow apps](/en/cloud/use-dify/build/workflow-chatflow) 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.

<Info>
  Authentication, the base URL, and the `user` field that scopes end-user data are covered in [Get Started](/en/api-reference/guides/get-started) and [End User Identity](/en/api-reference/guides/end-user-identity).
</Info>

## Run a Workflow

* **[Run Workflow](/en/api-reference/workflow-runs/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](/en/api-reference/workflow-runs/run-workflow-by-id)**: execute a specific published version instead, identified by the `workflow_id` from an earlier run response or run detail lookup.

## 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](/en/api-reference/workflow-runs/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.
* **[Stream Workflow Events](/en/api-reference/workflow-runs/stream-workflow-events)**: resume a run's event stream from its `workflow_run_id` after a dropped connection or a pause.

  Pass `include_state_snapshot=true` to replay the status of already-executed nodes first, or `continue_on_pause=true` to stay open across multiple Human Input pauses.

## Pause for Human Input

When a run reaches a [Human Input node](/en/cloud/use-dify/nodes/human-input) whose delivery method is WebApp, complete the pause over the API:

<Steps>
  <Step title="Listen for the pause">
    The run's event stream emits `human_input_required` carrying a `form_token` and the run's `workflow_run_id`, then ends with the `workflow_paused` event.
  </Step>

  <Step title="Fetch the form">
    Load the form's contents with [Get Human Input Form](/en/api-reference/human-input/get-human-input-form), using the `form_token`.
  </Step>

  <Step title="Submit the response">
    Send the recipient's input with [Submit Human Input Form](/en/api-reference/human-input/submit-human-input-form). Submitting resumes the run.
  </Step>

  <Step title="Resume the stream">
    Open a new stream with [Stream Workflow Events](/en/api-reference/workflow-runs/stream-workflow-events), using the `workflow_run_id` from the paused stream, and follow the remaining events through to the run's finish.
  </Step>
</Steps>

For file-attached submissions and the full event sequence, see the [Human Input Flow](/en/api-reference/guides/human-input-flow) guide.

## Inspect Past Runs

* **[Get Workflow Run Detail](/en/api-reference/workflow-runs/get-workflow-run-detail)**: a run's status and outputs, by its `workflow_run_id`.
* **[List Workflow Logs](/en/api-reference/workflow-runs/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, stream the run instead of listing its logs: call [Run Workflow](/en/api-reference/workflow-runs/run-workflow) in streaming mode for a run you're starting, or [Stream Workflow Events](/en/api-reference/workflow-runs/stream-workflow-events) for one already in progress.

## Work with Files

* **[Upload File](/en/api-reference/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.
* **[Get End User Info](/en/api-reference/end-users/get-end-user-info)**: look up an end user's details from an end-user ID, such as the `created_by` in the Upload File response.

## Transcribe and Synthesize Speech

* **[Convert Audio to Text](/en/api-reference/audio/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](/en/api-reference/audio/convert-text-to-audio)**: synthesize a workflow's text output back into speech.

## Retrieve App Info and Settings

* **[Get App Info](/en/api-reference/applications/get-app-info)**: the app's name, description, tags, and mode.
* **[Get App Parameters](/en/api-reference/applications/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](/en/api-reference/applications/get-app-meta)**: tool icons and other configuration metadata.
* **[Get App WebApp Settings](/en/api-reference/applications/get-app-webapp-settings)**: the WebApp's site configuration, theme, and customization options.
