Skip to main content
POST
/
workflows
/
run
A valid request URL is required to generate request examples
{
  "task_id": "c3800678-a077-43df-a102-53f23ed20b88",
  "workflow_run_id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
  "data": {
    "id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
    "workflow_id": "7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345",
    "status": "succeeded",
    "outputs": {
      "result": "Bonjour le monde"
    },
    "error": null,
    "elapsed_time": 1.23,
    "total_tokens": 150,
    "total_steps": 3,
    "created_at": 1705407629,
    "finished_at": 1705407630
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Body

application/json
inputs
object
required

Key-value pairs for workflow input variables. Values for file-type variables should be arrays of file objects with type, transfer_method, and either url or upload_file_id. Refer to the user_input_form field in the Get App Parameters response to discover the variable names and types expected by your app.

user
string
required

User identifier, defined by the developer's rules, must be unique within the application. This identifier scopes data access — workflow runs and files are only visible when queried with the same user value.

response_mode
enum<string>

Response mode. Use blocking for synchronous responses (Cloudflare timeout is 100 s), or streaming for Server-Sent Events. When omitted, defaults to blocking behavior.

Available options:
streaming,
blocking
files
object[] | null

File list. Suitable when files need to be combined with text for input, available only when the model supports Vision capability. To attach a local file, first upload it via Upload File and use the returned id as upload_file_id with transfer_method: local_file.

Response

Successful response. The content type and structure depend on the response_mode parameter in the request.

  • If response_mode is blocking, returns application/json with a WorkflowBlockingResponse object.
  • If response_mode is streaming, returns text/event-stream with a stream of ChunkWorkflowEvent objects.
task_id
string<uuid>

Task ID for the in-progress execution. Use this with Stop Workflow Task to cancel a running workflow. Only valid during execution.

workflow_run_id
string<uuid>

Persistent identifier for this workflow run record. Use this with Get Workflow Run Detail to retrieve results after execution.

data
object