Create a workflow
Create a new workflow owned by the authenticated user.
Authentication: Required.
Common Use Cases:
- Save a newly built workflow
- Programmatically provision workflows
Note: Workflow names must be unique within your namespace. Creating a workflow with a name you already use returns a 400 validation error.
Authorizations
API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_API_KEY
Body
Request body for creating a new workflow
Unique workflow name/slug within the user's namespace
128^[a-zA-Z0-9_-]+$"my-image-workflow"
Human-readable workflow title
1 - 256"My Image Generation Workflow"
The workflow definition/configuration object
{
"name": "my-image-workflow",
"version": "1.0.0",
"nodes": {
"node_a1b2c3": {
"id": "node_a1b2c3",
"type": "run",
"app": "fal-ai/flux/dev",
"depends": [],
"input": { "prompt": "$input.prompt" },
"metadata": { "position": { "x": 300, "y": 100 } }
}
},
"output": { "image": "$node_a1b2c3.images.0.url" },
"schema": {
"input": { "prompt": { "type": "string" } },
"output": { "image": { "type": "string" } }
}
}Whether the workflow is publicly visible
false
Response
Successfully created workflow
Response containing a single workflow's details
The workflow details
{
"name": "my-image-workflow",
"title": "My Image Generation Workflow",
"user_nickname": "johndoe",
"created_at": "2024-01-15T10:30:00Z",
"is_public": true,
"contents": {
"nodes": {
"node_a1b2c3": {
"id": "node_a1b2c3",
"type": "model",
"app": "fal-ai/flux/dev",
"depends": [],
"input": { "prompt": "$input.prompt" },
"metadata": { "position": { "x": 300, "y": 100 } }
},
"output": {
"id": "output",
"type": "output",
"depends": ["node_a1b2c3"],
"fields": { "image": "$node_a1b2c3.images.0.url" },
"metadata": { "position": { "x": 600, "y": 100 } }
}
}
}
}