Skip to main content

Batches

List Batches

Lists the batches in the caller’s projects, most recent first. Filter by status and endpoint, or page with after and before; the two cursors are exclusive. Results are scoped to the projects the API key can reach.

Create a Batche

Creates a batch from an uploaded JSONL file whose purpose is batch. Each line is sent to endpoint with its own request body, without the throughput limits of real-time traffic. Provider batches run through the provider’s batch service at its batch rates; /v3/router/decisions batches run on the deployment’s workers. See the Batches guide for input file format, supported endpoints, and result files.

Retrieve a Batche

Retrieves one batch, including its status, per-line request counts, and the output and error file IDs once they exist.

Cancel a Batche

Requests cancellation of a running batch and returns it with the status it holds at that moment. A batch that already reached a terminal status is returned unchanged. Poll the batch until the status is cancelled.

Download Results

Downloads the JSONL result file of a batch that reached a terminal status. file=output returns the successful responses, file=errors the per-line failures that have an error file. Each line follows the OpenAI batch result format.