Flow Lifecycle

This page describes how a flow progresses from creation to completion (or failure) and what clients should do at each stage.

State Diagram

State Meanings

StateMeaningClient Action
createdFlow was created and queued or waiting.Start polling GET /flows/{flow_id}.
processingFlow is actively running.Continue polling. Do not request output asset data yet.
completedFlow finished successfully.List outputs, then fetch assets by asset_id.
failedFlow terminated with an error.Inspect flow details and troubleshooting guidance, then retry if needed.
abortedFlow was manually stopped.Treat as terminal; create a new flow if needed.

Terminal States

Terminal states are:

  • completed
  • failed
  • aborted

Stop polling when a terminal state is reached.

Output Availability

Outputs should be treated as ready only after the flow state is completed.

Recommended sequence:

  1. Poll until completed.
  2. Call GET /flows/{flow_id}/outputs.
  3. Fetch a specific output with GET /flows/{flow_id}/outputs/{asset_id}?include_data=true.

Polling Guidance

  • Use a fixed polling interval of 3 to 5 seconds for most clients.
  • Set a client-side timeout window to avoid infinite waiting.
  • Handle non-200 responses explicitly and retry only when appropriate.

Abort Guidance

If you abort a flow through the start/abort action endpoint, expect the flow to eventually settle in aborted. Use a new flow for subsequent attempts instead of reusing an aborted flow.

  1. Flow
  2. Quickstart
  3. Troubleshooting