POST
/
api
/
v1
/
{workflowID}
Update AI Workflow
curl --request POST \
  --url https://flows.eachlabs.ai/api/v1/{workflowID} \
  --header 'Content-Type: application/json' \
  --data '{
  "workspace_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "thumbnail_url": "<string>",
  "inputs": [
    {
      "name": "<string>",
      "type": "<string>",
      "default_value": "<string>"
    }
  ],
  "outputs": [
    {
      "name": "<string>",
      "type": "<string>",
      "value": "<string>"
    }
  ],
  "steps": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "<string>",
      "model_slug": "<string>",
      "model_version": "<string>",
      "params": {
        "key": {}
      }
    }
  ],
  "nodes_json": "<string>",
  "edges_json": "<string>"
}'
{
  "workspace_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "thumbnail_url": "<string>",
  "inputs": [
    {
      "name": "<string>",
      "type": "<string>",
      "default_value": "<string>"
    }
  ],
  "outputs": [
    {
      "name": "<string>",
      "type": "<string>",
      "value": "<string>"
    }
  ],
  "steps": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "<string>",
      "model_slug": "<string>",
      "model_version": "<string>",
      "params": {
        "key": {}
      }
    }
  ],
  "nodes_json": "<string>",
  "edges_json": "<string>"
}

Authentication

Every request must include your X-API-KEY header:
curl --request POST \
  --url https://flows.eachlabs.ai/api/v1/{workflowID} \
  --header "X-API-KEY: YOUR_API_KEY_HERE" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Updated Workflow Name",
    "description": "Updated workflow description",
    "steps": [
      {
        "id": "step1",
        "name": "Updated Step Name",
        "type": "1019Model",
        "model_slug": "text-to-image",
        "model_version": "1.0",
        "params": {
          "prompt": "{{prompt}}"
        }
      }
    ],
    "inputs": [
      {
        "name": "prompt",
        "type": "string",
        "default_value": "Updated default prompt"
      }
    ],
    "outputs": [
      {
        "name": "generated_image",
        "type": "image",
        "value": "{{step1.output}}"
      }
    ],
    "nodes_json": "{\"nodes\":[{\"id\":\"step1\",\"type\":\"1019Model\",\"position\":{\"x\":100,\"y\":100}}]}",
    "edges_json": "{\"edges\":[]}"
  }'

Path Parameters

workflowID
string<string>
required

Workflow ID

Body

application/json

Response

200
application/json

Update Flow Request JSON

The response is of type object.