Skip to main content

GET /v1/batches/:id

Retrieve information about a specific batch, including its status and results.

Authentication

Requires provider authentication headers:

Request

Headers

string
required
The provider to route the request to (e.g., openai)
string
required
Bearer token for the provider API

Path Parameters

string
required
The ID of the batch to retrieve

Response

string
The batch identifier
string
The object type, always “batch”
string
The endpoint used for the batch
object
Error information if any requests failed
string
The ID of the input file
string
The completion time frame
string
The current status of the batch:
  • validating - Checking the input file format
  • in_progress - Processing the requests
  • finalizing - Generating output files
  • completed - All requests processed
  • failed - Batch processing failed
  • cancelled - Batch was cancelled
string
The ID of the file containing the outputs (available when status is completed)
string
The ID of the file containing errors (if any)
integer
Unix timestamp of when the batch was created
integer
Unix timestamp of when the batch started processing
integer
Unix timestamp of when the batch completed
object
Statistics about the batch requests
object
Custom metadata attached to the batch

Example

Response Example

Output File Format

Once the batch is completed, download the output file:

Best Practices

Batch processing typically takes several hours. Implement polling logic with appropriate intervals (1-5 minutes) rather than continuous polling.
Use webhooks (if supported by your provider) to get notified when batches complete instead of polling.

Create Batch

Create a new batch

Cancel Batch

Cancel a running batch

List Batches

View all batches