Skip to content

Flows API

Create, read, update, and delete saved pipelines. A flow stores a React Flow-compatible graph (nodes and edges).

MethodPathDescription
GET/api/flowsList flows (optionally ?project_id=)
POST/api/flowsCreate a flow
POST/api/flows/importImport a portable .flow document; environment bindings are stripped
POST/api/flows/migrate-documentValidate/migrate a raw .flow document to the current schema version without persisting it
GET/api/flows/{flow_id}Get one flow
PUT/api/flows/{flow_id}Update a flow
DELETE/api/flows/{flow_id}Delete a flow; also deletes its run history and schedules
POST/api/flows/{flow_id}/duplicateDuplicate a flow (optional ?name=); copies the graph into a new flow with no run history
POST/api/flows/{flow_id}/previewPreview the flow output without saving a run; body accepts node_id, limit, profile, and parameter overrides
POST/api/flows/{flow_id}/export/pythonExport the flow as code; ?free_intermediates=true also releases intermediate frames in generated code; ?include_notebooks=true also returns Jupyter notebooks

The export response carries code (pandas), polars, polars_lazy, and a portable flow_document. It also has notebook, notebook_polars, and notebook_polars_lazy: each is the matching script as Jupyter notebook JSON (nbformat 4, save it as .ipynb) when you pass ?include_notebooks=true, and null otherwise. See Engines → Code export.

PUT /api/flows/{flow_id} accepts an optional expected_revision (the flow's updated_at): when the saved flow has changed since you read it, the update is refused with 409 instead of overwriting the newer version. The same field is accepted by POST /api/flows/{flow_id}/runs. Clients that omit it keep the unconditional save and latest-version run. The editor sends it on Save and before Run.

Previews run against the saved flow graph, not unsaved canvas edits. The preview path uses the same graph validation and ML feature gate as a full run, so invalid graphs return 400 and flows with ML nodes return 501 if ML support isn't enabled on the server.

A flow can also be built in the editor by describing it to the Flow assistant, which saves through the same PUT /api/flows/{flow_id} rules only after you confirm a proposal.

See also