> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eachlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk trigger workflow executions

> Queue several asynchronous executions of one workflow version in a single call
(maximum 10 inputs per request). Each entry in `inputs` becomes its own execution;
all executions share a single `bulk_id` for grouped tracking and consolidated
webhook delivery. This route forwards to workflows-engine and requires callers to
pin the workflow version in the path.

The immediate response only confirms the executions were queued. A per-input failure
is reported inline on its `executions` entry (`status: failed` + `message`) — the
bulk call still returns 202 so partial failures don't lose the queued executions.




## OpenAPI

````yaml /openapi_specs/models.json post /v1/workflows/bulk-trigger/{workflowID}/{versionID}
openapi: 3.0.3
info:
  title: each::labs Official API v1
  description: >
    Official each::labs API V1.

    This API provides access to our comprehensive AI model catalog and other
    resources.


    ## Public contract notes


    - Public API routes handled by request logging include `X-Request-Id` for
      support and log correlation. Clients may send `X-Request-Id`; otherwise
      api-service generates one. Root, health, and metrics endpoints are excluded.
    - REST error bodies keep the backward-compatible JSON shape used by existing
      clients. Most errors include at least `error`; some shared error paths also
      include `status` and `details`. Use the HTTP status code as the primary
      programmatic signal unless an endpoint documents a richer envelope.
    - Rate-limit and retry headers are endpoint-dependent. If a response
    includes
      `Retry-After`, honor it before retrying; otherwise use bounded exponential
      backoff for retryable 429/5xx responses.
  version: 1.0.0
  contact:
    name: API Support
    email: support@eachlabs.ai
  x-logo:
    url: ./logo-white.svg
    altText: each::labs
servers:
  - url: https://api.eachlabs.ai
    description: Production server
security: []
tags:
  - name: AI Models
    description: Endpoints for listing and retrieving AI models and other resources.
  - name: AI Models Prediction
    description: Endpoints for managing model predictions
  - name: Uploads
    description: Endpoints for uploading files that can be used as model inputs.
  - name: Executions
    description: Endpoints for listing execution history.
  - name: Workflows
    description: >-
      Endpoints for creating workflows and triggering workflow executions
      through api-service.
  - name: OpenAI Compatibility
    description: OpenAI-compatible endpoints for LLM Router requests.
  - name: Webhooks
    description: >
      Endpoints for retrieving webhook information and delivery history.


      **Note:** Currently, webhooks are only supported for Workflows V2. We are
      actively expanding webhook support to other services and will update this
      documentation as new integrations become available.
paths:
  /v1/workflows/bulk-trigger/{workflowID}/{versionID}:
    post:
      tags:
        - Workflows
      summary: Bulk trigger workflow executions
      description: >
        Queue several asynchronous executions of one workflow version in a
        single call

        (maximum 10 inputs per request). Each entry in `inputs` becomes its own
        execution;

        all executions share a single `bulk_id` for grouped tracking and
        consolidated

        webhook delivery. This route forwards to workflows-engine and requires
        callers to

        pin the workflow version in the path.


        The immediate response only confirms the executions were queued. A
        per-input failure

        is reported inline on its `executions` entry (`status: failed` +
        `message`) — the

        bulk call still returns 202 so partial failures don't lose the queued
        executions.
      operationId: bulkTriggerWorkflowExecutions
      parameters:
        - name: workflowID
          in: path
          required: true
          schema:
            type: string
          description: Workflow ID or slug to execute.
          example: wf_abc123
        - name: versionID
          in: path
          required: true
          schema:
            type: string
          description: Workflow version ID to execute.
          example: v1
        - name: webhook_url
          in: query
          required: false
          schema:
            type: string
            format: uri
          description: >-
            Optional compatibility query parameter for execution completion
            webhooks. The request body field takes precedence when both are
            present.
          example: https://your-app.com/webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowBulkTriggerRequest'
            example:
              inputs:
                - prompt: A cinematic establishing shot of a mountain lake
                - prompt: A close-up of dew on a spider web at sunrise
              webhook_url: https://your-app.com/webhook
              webhook_secret: your-secret-key
      responses:
        '202':
          description: Workflow executions queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowBulkTriggerResponse'
              example:
                bulk_id: bulk_abc123
                executions:
                  - execution_id: exec_xyz789
                    status: queued
                  - status: failed
                    message: invalid input value
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkflowBulkTriggerRequest:
      type: object
      required:
        - inputs
      properties:
        inputs:
          type: array
          minItems: 1
          maxItems: 10
          description: >-
            One input object per execution (1–10), each validated against the
            workflow version's input schema. Every entry must be a JSON object;
            a non-object entry (array, string, number) rejects the whole request
            with 400 rather than failing only that item.
          items:
            type: object
            additionalProperties: true
          example:
            - prompt: A cinematic establishing shot of a mountain lake
            - prompt: A close-up of dew on a spider web at sunrise
        webhook_url:
          type: string
          format: uri
          description: Optional webhook URL applied to every execution in the batch.
          example: https://your-app.com/webhook
        webhook_secret:
          type: string
          description: Optional secret used to sign workflow webhook requests.
          example: your-secret-key
    WorkflowBulkTriggerResponse:
      type: object
      properties:
        bulk_id:
          type: string
          description: Identifier grouping every execution queued by this request.
          example: bulk_abc123
        executions:
          type: array
          description: One acknowledgment per input, in request order.
          items:
            type: object
            properties:
              execution_id:
                type: string
                description: Queued execution identifier. Absent on a per-input failure.
                example: exec_xyz789
              status:
                type: string
                description: >-
                  Per-execution queue status (`queued`) or `failed` for an input
                  that could not be queued.
                example: queued
              message:
                type: string
                description: Failure reason, present only when status is `failed`.
                example: invalid input value
    Error:
      type: object
      description: >
        Backward-compatible REST error body. Endpoint-specific handlers may
        return only

        `error`; shared error paths may also include `status` and `details`.
      properties:
        status:
          type: integer
          description: HTTP status code, when returned by the shared error handler.
          example: 400
        error:
          type: string
          description: Safe user-facing error message.
          example: error message
        details:
          nullable: true
          description: Optional validation or request details for client errors.
      required:
        - error
  responses:
    BadRequest:
      description: Bad request
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: slug parameter is required
    Unauthorized:
      description: Authentication required or invalid credentials
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid or missing API key
    PaymentRequired:
      description: Insufficient balance
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient balance
    Forbidden:
      description: Forbidden
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: forbidden
    NotFound:
      description: Resource not found
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Failed to fetch model: model not found'
    RequestTimeout:
      description: Upstream request timed out
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Request timeout
    Conflict:
      description: Conflict with current resource state
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: conflict
    InternalServerError:
      description: Internal server error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Failed to fetch models: internal error'
    BadGateway:
      description: Upstream service unavailable
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: workflows-engine unavailable
  headers:
    RequestId:
      description: >-
        Request correlation ID. Echoes the incoming `X-Request-Id` header or a
        generated ID.
      schema:
        type: string
      example: 123e4567-e89b-12d3-a456-426614174000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as an Authorization Bearer token: `Authorization: Bearer
        YOUR_API_KEY`

````