For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI ReferenceChangelogModel Versioning
GuidesAPI ReferenceChangelogModel Versioning
    • Getting Started
    • Authentication
    • API Versioning
    • SDKs
    • Deployments
    • Error Codes
    • Async Processing
  • Endpoints
      • POSTRun Workflow
      • POSTBatch Run Workflow
      • GETGet Workflow Run
      • POSTUpdate Workflow Run
      • POSTCancel Workflow Run
      • DELDelete Workflow Run
      • GETList Workflow Runs
      • POSTCreate Workflow
      • GETGet Workflow
      • POSTUpdate Workflow
      • GETList Workflows
      • POSTCreate Workflow Version
      • GETGet Workflow Version
      • GETList Workflow Versions
  • Webhook Events
LogoLogo
EndpointsWorkflows

Batch Run Workflow

POST
/workflow_runs/batch
POST
/workflow_runs/batch
1import { ExtendClient } from "extend-ai";
2
3const client = new ExtendClient({ token: "YOUR_TOKEN" });
4await client.workflowRuns.createBatch({
5 workflow: {
6 id: "wf_1234567890"
7 },
8 inputs: [{
9 file: {
10 url: "https://example.com/invoice1.pdf"
11 },
12 metadata: {
13 "customerId": "cust_abc123"
14 }
15 }, {
16 file: {
17 url: "https://example.com/invoice2.pdf"
18 },
19 metadata: {
20 "customerId": "cust_def456"
21 }
22 }]
23});
1{
2 "batchId": "batch_zyx987"
3}
This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint. Unlike the single [Run Workflow](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/workflow/create-workflow-run) endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a `batchId`. Our recommended usage pattern is to integrate with [Webhooks](https://docs.extend.ai/2026-02-09/product/webhooks/configuration) for consuming results, using the `metadata` and `batchId` to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the [List Workflow Runs](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/workflow/list-workflow-runs) endpoint to fetch all runs via a batch, and then [Get Workflow Run](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/workflow/get-workflow-run) to fetch the full outputs each run. **Priority:** All workflow runs created through this batch endpoint are automatically assigned a priority of 90. **Processing and Monitoring:** Upon successful submission, the endpoint returns a `batchId`. The individual workflow runs are then queued for processing. - **Monitoring:** Track the progress and consume results of individual runs using [Webhooks](https://docs.extend.ai/2026-02-09/product/webhooks/configuration). Subscribe to events like `workflow_run.completed`, `workflow_run.failed`, etc. The webhook payload for these events will include the corresponding `batchId` and the `metadata` you provided for each input. - **Fetching Results:** You can also use the [List Workflow Runs](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/workflow/list-workflow-runs) endpoint and filter using the `batchId` query param.
Was this page helpful?
Previous

Get Workflow Run

Next
Built with

This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint.

Unlike the single Run Workflow endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a batchId.

Our recommended usage pattern is to integrate with Webhooks for consuming results, using the metadata and batchId to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the List Workflow Runs endpoint to fetch all runs via a batch, and then Get Workflow Run to fetch the full outputs each run.

Priority: All workflow runs created through this batch endpoint are automatically assigned a priority of 90.

Processing and Monitoring: Upon successful submission, the endpoint returns a batchId. The individual workflow runs are then queued for processing.

  • Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like workflow_run.completed, workflow_run.failed, etc. The webhook payload for these events will include the corresponding batchId and the metadata you provided for each input.
  • Fetching Results: You can also use the List Workflow Runs endpoint and filter using the batchId query param.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-extend-api-version"2026-02-09"Optional
API version to use for the request. If you're using an SDK, you can ignore this parameter. If you are not using an SDK and do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2026-02-09/developers/api-versioning) for more details.

Request

This endpoint expects an object.
workflowobjectRequired
The workflow to run.
inputslist of objectsRequired
An array of input objects to be processed by the workflow. Each object represents a single workflow run to be created. The array must contain at least 1 input and at most 1000 inputs.

Response

Successfully queued batch workflow run
batchIdstring

A unique identifier for the submitted batch. This ID can be used to correlate the workflow runs created by this request. You can find this batchId associated with individual runs when listing workflow runs or in webhook payloads.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error

API version to use for the request. If you’re using an SDK, you can ignore this parameter. If you are not using an SDK and do not specify a version, you will either receive a 400 Bad Request or be set to a previous legacy version. See API Versioning for more details.