If you would love to run AI Flows in bulk, you can use the API to do so easily.

Example

You have an application that generates 100 pack avatar images for users. You can use the bulk run API to run the AI Flow 100 times with different input data.

Steps

Prepare your workflow

First, you need to create a workflow that generates a pack avatar image. You can use the Templates workflow as an example.

Prepare your input data

You need to prepare the input data for the workflow. In this case, you need to prepare 100 different input data for the workflow.

Run the bulk run API

You can use the bulk run API to run the workflow 100 times with different input data.

curl --location 'https://flows.eachlabs.ai/api/v2/[WORKFLOWID]/bulk' \
--header 'X-API-Key: APIKEY' \
--header 'Content-Type: application/json' \
--data '{
    "parameters": [
        {
            "prompt": "a woman is running in a NYC"
        },
        {
            "prompt": "a woman is dancing"
        }
    ],
    "webhook_url": "https://webhook.site/xx"
}'

Check the result

You can check the result of the bulk run in the Flows dashboard, webhook, or API.