Batches
Create large batches of API requests to run asynchronously.
Create batch
Retrieve batch
Cancel batch
List batches
ModelsExpand Collapse
Batch = object { id, completion_window, created_at, 19 more }
The Unix timestamp (in seconds) for when the batch started cancelling.
errors: optional object { data, object }
The Unix timestamp (in seconds) for when the batch started finalizing.
The Unix timestamp (in seconds) for when the batch started processing.
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
Model ID used to process the batch, like gpt-5-2025-08-07. OpenAI
offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the model
guide to browse and compare available models.
The ID of the file containing the outputs of successfully executed requests.
request_counts: optional object { completed, failed, total } The request counts for different statuses within the batch.
The request counts for different statuses within the batch.
BatchUsage = object { input_tokens, input_tokens_details, output_tokens, 2 more } Represents token usage details including input tokens, output tokens, a
breakdown of output tokens, and the total tokens used. Only populated on
batches created after September 7, 2025.
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. Only populated on batches created after September 7, 2025.
input_tokens_details: object { cached_tokens } A detailed breakdown of the input tokens.
A detailed breakdown of the input tokens.
The number of tokens that were retrieved from the cache. More on prompt caching.