Batches
Create large batches of API requests to run asynchronously.
ModelsExpand Collapse
class Batch: …
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.
class BatchUsage: …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: InputTokensDetailsA 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.