Batch
Data models for batch operations
The Batch type represents a batch job returned by the Batch API functions.
Batch
Re-exported from openai.types.Batch.
Import: from any_llm.types.batch import Batch
id
str
Unique batch identifier.
object
str
Always "batch".
endpoint
str
The API endpoint used for all requests in the batch.
input_file_id
str
ID of the uploaded input file.
completion_window
str
Time frame for batch processing (e.g., "24h").
status
str
Current status: "validating", "in_progress", "finalizing", "completed", "failed", "expired", "cancelling", or "cancelled".
output_file_id
str | None
ID of the output file (available when status is "completed").
error_file_id
str | None
ID of the error file (if any requests failed).
created_at
int
Unix timestamp of batch creation.
in_progress_at
int | None
Unix timestamp of when processing started.
expires_at
int | None
Unix timestamp of when the batch expires.
finalizing_at
int | None
Unix timestamp of when finalization started.
completed_at
int | None
Unix timestamp of completion.
failed_at
int | None
Unix timestamp of failure.
expired_at
int | None
Unix timestamp of expiration.
cancelling_at
int | None
Unix timestamp of cancellation request.
cancelled_at
int | None
Unix timestamp of cancellation completion.
request_counts
BatchRequestCounts | None
Counts of total, completed, and failed requests.
metadata
dict[str, str] | None
Custom metadata attached to the batch.
BatchRequestCounts
Re-exported from openai.types.batch_request_counts.BatchRequestCounts.
Import: from any_llm.types.batch import BatchRequestCounts
total
int
Total number of requests in the batch.
completed
int
Number of completed requests.
failed
int
Number of failed requests.
Usage
Last updated