Class RawBatchWorkflowRunClient
- java.lang.Object
-
- ai.extend.resources.batchworkflowrun.RawBatchWorkflowRunClient
-
public class RawBatchWorkflowRunClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description RawBatchWorkflowRunClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtendClientHttpResponse<BatchWorkflowRunCreateResponse>create(BatchWorkflowRunCreateRequest request)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).ExtendClientHttpResponse<BatchWorkflowRunCreateResponse>create(BatchWorkflowRunCreateRequest request, RequestOptions requestOptions)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).
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
RawBatchWorkflowRunClient
public RawBatchWorkflowRunClient(ClientOptions clientOptions)
-
-
Method Detail
-
create
public ExtendClientHttpResponse<BatchWorkflowRunCreateResponse> create(BatchWorkflowRunCreateRequest request)
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
metadataandbatchIdto 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 correspondingbatchIdand themetadatayou provided for each input. - Fetching Results: You can also use the List Workflow Runs endpoint and filter using the
batchIdquery param.
- Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like
-
create
public ExtendClientHttpResponse<BatchWorkflowRunCreateResponse> create(BatchWorkflowRunCreateRequest request, RequestOptions requestOptions)
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
metadataandbatchIdto 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 correspondingbatchIdand themetadatayou provided for each input. - Fetching Results: You can also use the List Workflow Runs endpoint and filter using the
batchIdquery param.
- Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like
-
-