Skip to main content
POST
/
{workflowID}
/
bulk-trigger
Bulk trigger workflow
curl --request POST \
  --url https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "inputs": [
    {
      "prompt": "Generate image of a sunset",
      "style": "photorealistic"
    },
    {
      "prompt": "Generate image of mountains",
      "style": "artistic"
    },
    {
      "prompt": "Generate image of ocean",
      "style": "minimalist"
    }
  ],
  "version_id": "v1",
  "webhook_url": "https://your-api.com/webhooks/workflow-completed"
}
'
import requests

url = "https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger"

payload = {
    "inputs": [
        {
            "prompt": "Generate image of a sunset",
            "style": "photorealistic"
        },
        {
            "prompt": "Generate image of mountains",
            "style": "artistic"
        },
        {
            "prompt": "Generate image of ocean",
            "style": "minimalist"
        }
    ],
    "version_id": "v1",
    "webhook_url": "https://your-api.com/webhooks/workflow-completed"
}
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    inputs: [
      {prompt: 'Generate image of a sunset', style: 'photorealistic'},
      {prompt: 'Generate image of mountains', style: 'artistic'},
      {prompt: 'Generate image of ocean', style: 'minimalist'}
    ],
    version_id: 'v1',
    webhook_url: 'https://your-api.com/webhooks/workflow-completed'
  })
};

fetch('https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'prompt' => 'Generate image of a sunset',
                'style' => 'photorealistic'
        ],
        [
                'prompt' => 'Generate image of mountains',
                'style' => 'artistic'
        ],
        [
                'prompt' => 'Generate image of ocean',
                'style' => 'minimalist'
        ]
    ],
    'version_id' => 'v1',
    'webhook_url' => 'https://your-api.com/webhooks/workflow-completed'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"prompt\": \"Generate image of a sunset\",\n      \"style\": \"photorealistic\"\n    },\n    {\n      \"prompt\": \"Generate image of mountains\",\n      \"style\": \"artistic\"\n    },\n    {\n      \"prompt\": \"Generate image of ocean\",\n      \"style\": \"minimalist\"\n    }\n  ],\n  \"version_id\": \"v1\",\n  \"webhook_url\": \"https://your-api.com/webhooks/workflow-completed\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger")
  .header("X-API-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"prompt\": \"Generate image of a sunset\",\n      \"style\": \"photorealistic\"\n    },\n    {\n      \"prompt\": \"Generate image of mountains\",\n      \"style\": \"artistic\"\n    },\n    {\n      \"prompt\": \"Generate image of ocean\",\n      \"style\": \"minimalist\"\n    }\n  ],\n  \"version_id\": \"v1\",\n  \"webhook_url\": \"https://your-api.com/webhooks/workflow-completed\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://workflows.eachlabs.run/api/v1/{workflowID}/bulk-trigger")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"prompt\": \"Generate image of a sunset\",\n      \"style\": \"photorealistic\"\n    },\n    {\n      \"prompt\": \"Generate image of mountains\",\n      \"style\": \"artistic\"\n    },\n    {\n      \"prompt\": \"Generate image of ocean\",\n      \"style\": \"minimalist\"\n    }\n  ],\n  \"version_id\": \"v1\",\n  \"webhook_url\": \"https://your-api.com/webhooks/workflow-completed\"\n}"

response = http.request(request)
puts response.read_body
{
  "bulk_id": "550e8400-e29b-41d4-a716-446655440000",
  "executions": [
    {
      "execution_id": "exec-1",
      "status": "queued",
      "started_at": "2025-12-20T10:00:00Z"
    },
    {
      "execution_id": "exec-2",
      "status": "queued",
      "started_at": "2025-12-20T10:00:01Z"
    },
    {
      "status": "failed",
      "message": "invalid input: missing required field 'prompt'"
    }
  ]
}
{
  "error": "<string>"
}
{
  "error": "<string>"
}
{
  "error": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

workflowID
string
required

Unique workflow identifier

Example:

"wf_abc123"

Body

application/json
inputs
object[]
required

Array of input parameter objects. Each item in the array will result in a separate workflow execution.

Constraints:

  • Minimum 1 input required
  • Maximum 10 inputs per request

All inputs must conform to the workflow's input schema.

Required array length: 1 - 10 elements
Example:
[
  {
    "prompt": "Generate image of a sunset",
    "style": "photorealistic"
  },
  {
    "prompt": "Generate image of mountains",
    "style": "artistic"
  },
  {
    "prompt": "Generate image of ocean",
    "style": "minimalist"
  }
]
version_id
string

Optional: Specific version to trigger for all executions.

If not provided, triggers the latest version of the workflow.

Example:

"v1"

webhook_url
string<uri>

Optional webhook URL for execution completion notifications.

When provided, webhook notifications for all executions in this bulk operation will include a bulk_id field to help you correlate them.

Each execution sends its own webhook notification when it completes.

Example:

"https://your-api.com/webhooks/workflow-completed"

Response

Bulk workflow executions started

bulk_id
string<uuid>
required

Unique identifier for this bulk operation. All executions from this bulk trigger share this ID, which can be used to query and track them together.

Example:

"550e8400-e29b-41d4-a716-446655440000"

executions
object[]
required

Array of execution responses, one per input in the request. The order matches the order of inputs in the request.

Partial Failures: If some inputs fail validation, those entries will have status: "failed" with an error message, while successful triggers will have status: "queued".

Example:
[
  {
    "execution_id": "exec-1",
    "status": "queued",
    "started_at": "2025-12-20T10:00:00Z"
  },
  {
    "execution_id": "exec-2",
    "status": "queued",
    "started_at": "2025-12-20T10:00:01Z"
  },
  {
    "status": "failed",
    "message": "invalid input: missing required field 'prompt'"
  }
]
Last modified on May 28, 2026