curl --request POST \
--url https://flows.eachlabs.ai/api/v1/{workflowID}/import \
--header 'Content-Type: application/json' \
--data '{
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"nodes_json": "<string>",
"edges_json": "<string>",
"inputs": [
{
"name": "<string>",
"type": "<string>",
"default_value": "<string>"
}
],
"steps": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"model_slug": "<string>",
"model_version": "<string>",
"params": {
"key": {}
}
}
]
}'
{
"status": "<string>",
"message": "<string>"
}
Import an AI Workflow
curl --request POST \
--url https://flows.eachlabs.ai/api/v1/{workflowID}/import \
--header 'Content-Type: application/json' \
--data '{
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"nodes_json": "<string>",
"edges_json": "<string>",
"inputs": [
{
"name": "<string>",
"type": "<string>",
"default_value": "<string>"
}
],
"steps": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"model_slug": "<string>",
"model_version": "<string>",
"params": {
"key": {}
}
}
]
}'
{
"status": "<string>",
"message": "<string>"
}
curl --request POST \
--url https://flows.eachlabs.ai/api/v1/{workflowID}/import \
--header "X-API-KEY: YOUR_API_KEY_HERE" \
--header "Content-Type: application/json" \
--data '{
"name": "Imported Workflow",
"description": "Workflow imported from export",
"nodes_json": "{\"nodes\":[{\"id\":\"node1\",\"type\":\"input\",\"position\":{\"x\":100,\"y\":100}}]}",
"edges_json": "{\"edges\":[]}",
"inputs": [
{
"name": "prompt",
"type": "string",
"default_value": "Default prompt text"
}
],
"steps": [
{
"id": "node1",
"name": "Input Node",
"type": "input",
"model_slug": "text-to-image",
"model_version": "1.0"
}
]
}'
Import Flow Response JSON
The response is of type object
.
Was this page helpful?