Skip to main content
POST
/
v1
/
workflows
curl -X POST https://api.lavendly.ai/v1/workflows \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer $LAVENDLY_API_KEY' \
  -H 'Idempotency-Key: 2026-05-16-first-fox' \
  -d '{
    "name": "Bookshop fox",
    "nodes": [
      { "id": "vid1", "type": "videoGenerator",
        "data": { "prompt": "a sleepy fox in a bookshop",
                  "videoModel": "cinematic", "duration": 5 } }
    ],
    "edges": []
  }'

Body

name
string
required
Display name.
description
string
Optional human description.
nodes
array
ReactFlow nodes. Defaults to empty.
edges
array
ReactFlow edges.
duration
number
Total duration in seconds.
thumbnail_url
string
Cover-image URL.

Response

The persisted workflow including its server-assigned id and version: 1.
curl -X POST https://api.lavendly.ai/v1/workflows \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer $LAVENDLY_API_KEY' \
  -H 'Idempotency-Key: 2026-05-16-first-fox' \
  -d '{
    "name": "Bookshop fox",
    "nodes": [
      { "id": "vid1", "type": "videoGenerator",
        "data": { "prompt": "a sleepy fox in a bookshop",
                  "videoModel": "cinematic", "duration": 5 } }
    ],
    "edges": []
  }'
Re-POSTing the same body with the same Idempotency-Key within 5 min returns the same id instead of creating a duplicate.