Workflows API
CRUD operations, execution, and run history for workflows.
List workflows
GET /api/v1/workflows
Response: [
{ "id": "uuid", "name": "My Workflow", "created_at": "...", "node_count": 5 }
]Create a workflow
POST /api/v1/workflows
{
"name": "Social Media Pipeline",
"graph_json": {
"nodes": [ ... ],
"edges": [ ... ],
"viewport": { "x": 0, "y": 0, "zoom": 1 }
}
}Execute a workflow
POST /api/v1/workflows/:id/execute
Response: {
"run_id": "uuid",
"status": "running",
"estimated_credits": 12
}After starting execution, poll the run status or listen to WebSocket events for real-time updates.
Check run status
GET /api/v1/workflows/:id/runs/:run_id
Response: {
"id": "uuid",
"status": "completed", // running | completed | failed
"credits_used": 11,
"duration_ms": 4520,
"node_runs": [
{ "node_id": "...", "status": "completed", "artifact_id": "..." }
]
}Download artifact
GET /api/v1/artifacts/:id
Response: binary file (image/png, video/mp4, audio/mpeg, text/plain)Error responses
| Code | Meaning |
|---|---|
| 400 | Invalid graph or missing required fields |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
| 404 | Workflow or run not found |
| 429 | Rate limit exceeded |
Last updated: 2026-03-27