Workflow

Execute Workflow (v2 sync or stream)

Changed on
post/api/v2/workflows

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body

dataobject nullable

Optional live-canvas override of the flow's nodes/edges; takes priority over the saved flow data.

expose_graph_stateboolean nullable

Whether the stream may carry the flow's graph state: the events naming every component that will run and carrying each component's own output (STATE_SNAPSHOT/STATE_DELTA, STEP_STARTED/STEP_FINISHED and langflow.log on agui; vertices_sorted, per-vertex build_start, end_vertex and log on langflow). Unset defaults to False for agui, whose consumers are usually third-party clients, and True for langflow, whose passthrough shape existing callers already parse. The terminal output event is the flow's answer and is never suppressed. Not accepted by /workflows/public, which always forces it off.

filesstring[] nullable

Optional list of pre-uploaded file paths to attach to the run.

flow_idstring required

UUID of the flow to run.

globalsobject

Request-level global variables made available to workflow components. Keys may use any printable string up to 256 chars; values are capped at 65536 chars. Body globals always win over the legacy X-LANGFLOW-GLOBAL-VAR-* headers. Honored in sync mode; ignored for stream/background modes.

idempotency_keystring nullable

Optional client-supplied key that dedupes background submits. Two background runs with the same key return the same job_id instead of queuing duplicate work. Ignored for sync/stream modes.

input_valuestring

Chat-style input value.

mode'sync' | 'stream' | 'background'

Execution mode for a v2 workflow run.

output_idsstring[] nullable

Component ids of the outputs you want as the answer (sync mode). When set, output.text resolves among only these, so naming one text output makes output.reason deterministic on multi-output flows. The full outputs map is still returned. Ids must be outputs of this flow or the request is rejected before the flow runs. Ignored for stream/background modes.

session_idstring nullable

When set, message memory and chat history scope to this session.

start_component_idstring nullable

Partial-run start component id.

stop_component_idstring nullable

Partial-run stop component id.

stream_protocolstring

Wire protocol for streaming events. Defaults to langflow (raw EventManager payloads). agui emits AG-UI events. Unknown values return 422 with the available list. Ignored when mode=sync.

tweaksobject

Per-component parameter overrides keyed by component id.

Example request

{
  "flow_id": "67ccd2be-17f0-8190-81ff-3bb2cf6508e6",
  "input_value": "Hello, how can you help me today?"
}

Response

Workflow execution response

OR

Changes

    • breaking

      added to the response body oneOf list for the response status

    • info

      added the new optional request property

    • info

      removed subschema #1: WorkflowExecutionResponse from the response body oneOf list for the response status

    • breaking

      the /// response's property type changed from no type to string for status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      added the new cancelled enum value to the /// response property for the response status

    • warning

      added the new completed enum value to the /// response property for the response status

    • warning

      added the new failed enum value to the /// response property for the response status

    • warning

      added the new in_progress enum value to the /// response property for the response status

    • warning

      added the new queued enum value to the /// response property for the response status

    • warning

      added the new suspended enum value to the /// response property for the response status

    • warning

      added the new suspended enum value to the / response property for the response status

    • warning

      added the new suspended enum value to the / response property for the response status

    • warning

      added the new timed_out enum value to the /// response property for the response status

    • info

      the endpoint scheme security API key header was removed from the API

    • info

      the endpoint scheme security API key query was removed from the API

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property / to the response with the status