Skip to main content
The Flow API allows you to test flows without saving them to a project and monitor the status of running flows.

Test a flow

This endpoint executes the flow immediately. Make sure your flow definition is valid before testing.
POST /api/v1/flow/test
Test a flow by providing the flow definition and node definitions. This executes the flow and returns a flow run object.

Request body

Flow
object
required
The flow definition object
NodeDefs
array
required
Array of node definition objects

Response

ID
string
Unique identifier for the flow run
Status
string
Current status of the flow run. Possible values:
  • STOPPED - Flow has stopped
  • WAITING - Flow is waiting for input
  • RUNNING - Flow is currently executing
  • COMPLETE - Flow completed successfully
  • ERROR - Flow encountered an error
NodeState
object
Map of node IDs to their current state
Artifacts
object
Map of edge IDs to artifact locations
WaitingURLs
array
Array of presigned URLs waiting for data upload
StartedAt
string
ISO 8601 timestamp of when the flow started

Example request

curl -X POST http://localhost:1234/api/v1/flow/test \
  -H "Content-Type: application/json" \
  -d '{
    "Flow": {
      "Name": "image-resize",
      "Nodes": [
        {
          "ID": "resize-1",
          "Uses": "pupload/resize",
          "Inputs": [{"Name": "image", "Edge": "input-image"}],
          "Outputs": [{"Name": "resized", "Edge": "output-image"}],
          "Flags": [{"Name": "width", "Value": "800"}]
        }
      ]
    },
    "NodeDefs": [
      {
        "Publisher": "pupload",
        "Name": "resize",
        "Image": "pupload/resize:latest",
        "Tier": "c-small",
        "MaxAttempts": 3
      }
    ]
  }'

Example response

{
  "ID": "run_abc123xyz",
  "Status": "RUNNING",
  "NodeState": {
    "resize-1": {
      "Status": "RUNNING",
      "Logs": [],
      "Error": "",
      "Attempt": 1,
      "MaxAttempts": 3
    }
  },
  "Artifacts": {},
  "WaitingURLs": [],
  "StartedAt": "2026-03-03T10:30:00Z"
}

Get flow run status

GET /api/v1/flow/status/{flowRunID}
Retrieve the current status of a flow run by its ID.

Path parameters

flowRunID
string
required
The unique identifier of the flow run

Response

Returns the same FlowRun object structure as the test flow endpoint (see above).

Example request

curl http://localhost:1234/api/v1/flow/status/run_abc123xyz

Example response

{
  "ID": "run_abc123xyz",
  "Status": "COMPLETE",
  "NodeState": {
    "resize-1": {
      "Status": "COMPLETE",
      "Logs": [
        {
          "timestamp": "2026-03-03T10:30:05Z",
          "message": "Image resized successfully"
        }
      ],
      "Error": "",
      "Attempt": 1,
      "MaxAttempts": 3
    }
  },
  "Artifacts": {
    "output-image": {
      "StoreName": "default",
      "ObjectName": "abc123.jpg",
      "EdgeName": "output-image"
    }
  },
  "WaitingURLs": [],
  "StartedAt": "2026-03-03T10:30:00Z"
}

Error responses

400
error
Flow run does not exist
"Flow run does not exist."

Build docs developers (and LLMs) love