GET /v1/batches/:id
Retrieve information about a specific batch, including its status and results.Authentication
Requires provider authentication headers:Request
Headers
The provider to route the request to (e.g.,
openai)Bearer token for the provider API
Path Parameters
The ID of the batch to retrieve
Response
The batch identifier
The object type, always “batch”
The endpoint used for the batch
Error information if any requests failed
The ID of the input file
The completion time frame
The current status of the batch:
validating- Checking the input file formatin_progress- Processing the requestsfinalizing- Generating output filescompleted- All requests processedfailed- Batch processing failedcancelled- Batch was cancelled
The ID of the file containing the outputs (available when status is
completed)The ID of the file containing errors (if any)
Unix timestamp of when the batch was created
Unix timestamp of when the batch started processing
Unix timestamp of when the batch completed
Statistics about the batch requests
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.
Related Endpoints
Create Batch
Create a new batch
Cancel Batch
Cancel a running batch
List Batches
View all batches