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_idfrom 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: 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: resume a run’s event stream from its
workflow_run_idafter a dropped connection or a pause. Passinclude_state_snapshot=trueto replay the status of already-executed nodes first, orcontinue_on_pause=trueto stay open across multiple Human Input pauses.
Pause for Human Input
When a run reaches a Human Input node whose delivery method is WebApp, complete the pause over the API: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.Fetch the form
Load the form’s contents with Get Human Input Form, using the
form_token.Submit the response
Send the recipient’s input with Submit Human Input Form. Submitting resumes the run.
Resume the stream
Open a new stream with Stream Workflow Events, using the
workflow_run_id from the paused stream, and follow the remaining events through to the run’s finish.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.
Work with Files
- Upload File: upload an image, document, audio, or video file, then pass the returned
idasupload_file_idin a file-type input variable when you run the workflow. Files are scoped to the uploading end user. - Get End User Info: look up an end user’s details from an end-user ID, such as the
created_byin the Upload File response.
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 WebApp’s site configuration, theme, and customization options.