Create batch
POST
This feature is in Private Preview. For access or more information, contact us or reach out to your account representative.
Request
string
required
The ID of an uploaded file that contains requests for the batch job.The file must follow these constraints:
- Max size of 200 MB
- Uploaded with
purpose: "batch" - Max 50,000 requests
string
required
The API endpoint for batch processing. Currently only
/v1/chat/completions is supported.string
required
The time window for batch completion. Currently, only
24h is supported.object
Key-value pairs that can be attached to an object. Optional custom metadata for the batch job. Useful for organizing and tracking batch jobs.
Response
string
A unique identifier for the batch job.
string
The object type, which is always
batch.string
The API endpoint used for batch processing.
object | null
Information about any errors that occurred during batch processing.
string
The ID of the input file containing batch requests.
string
The time window for batch completion. Always
24h.string
The current status of the batch job. Possible values:
queued, in_progress, finalizing, completed, expired, failed, cancelled, cancelling.string | null
The ID of the file containing batch results (available once processing is complete).
string | null
The ID of the file containing errors (if any errors occurred).
integer
The Unix timestamp (in seconds) of when the batch job was created.
integer | null
The Unix timestamp (in seconds) of when the batch job started processing.
integer | null
The Unix timestamp (in seconds) of when the batch job will expire.
integer | null
The Unix timestamp (in seconds) of when the batch job started finalizing.
integer | null
The Unix timestamp (in seconds) of when the batch job completed.
integer | null
The Unix timestamp (in seconds) of when the batch job failed.
integer | null
The Unix timestamp (in seconds) of when the batch job expired.
integer | null
The Unix timestamp (in seconds) of when the batch job started cancelling.
integer | null
The Unix timestamp (in seconds) of when the batch job was cancelled.
object
Statistics about the requests in the batch.
object | null
Custom metadata associated with the batch job.

