The batch object
⚠️
Preview — this feature is being built; the design below is the spec.
The batch object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.
Example
{
"id": "batch_01JBXF3P8K",
"object": "batch",
"status": "in_progress",
"input_file_id": "file_01JBXF1Z",
"output_file_id": null,
"error_file_id": null,
"request_counts": {
"total": 5000,
"succeeded": 3120,
"failed": 4,
"canceled": 0
},
"created_at": 1791820800,
"started_at": 1791820860,
"ends_by": 1791907200,
"completed_at": null,
"metadata": {
"job": "october-tickets"
}
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Starts with batch_. |
object | string | Always batch. |
status | string | validating, in_progress, canceling, completed, expired, canceled or failed. |
input_file_id | string or null | The input file, or null for an inline batch. |
output_file_id | string or null | Results file, set once the batch reaches a final state with any finished lines. |
error_file_id | string or null | Set when validation found problems; lists them by line. |
request_counts | object | total, succeeded, failed and canceled. |
created_at | integer | Unix seconds. |
started_at | integer or null | When the first request started. |
ends_by | integer | The end of the 24-hour window. |
completed_at | integer or null | When the batch reached a final state. |
metadata | object | Your string pairs, returned unchanged. |
Returned by
Was this page helpful?