Create batch
Batch
Create batch
POST
Create batch
After successfully uploading the input file, initiate a batch by using the ID of the uploaded file. Note that the completion window is set to a fixed duration of 48 hours and cannot be modified.
Request Headers
string
必須
Enum:
application/jsonstring
必須
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
string
必須
ID of the uploaded input file containing batch requests
string
必須
The endpoint to use for batch processing. Available endpoints are
/v1/chat/completions and /v1/completions.string
Time window for batch completion. The completion window is fixed at
48h and is currently non-adjustable.Response
string
必須
A unique identifier for the batch job.
string
必須
The object type, which is always
batch.string
必須
The API endpoint that the batch job is using for processing requests.
string
必須
The ID of the input file containing the batch requests.
string
必須
The ID of the output file containing the batch results. Empty until the batch is completed.
string
必須
The ID of the error file containing any errors that occurred during batch processing. Empty until errors occur.
string
必須
The time window for batch completion. Currently fixed at
48h.string | null
The timestamp when the batch started processing. Null if not yet started.
string | null
The timestamp when the batch will expire. Null if not set.
string | null
The timestamp when the batch started finalizing. Null if not yet finalizing.
string | null
The timestamp when the batch was completed. Null if not yet completed.
string | null
The timestamp when the batch failed. Null if not failed.
string | null
The timestamp when the batch expired. Null if not expired.
string | null
The timestamp when the batch started cancelling. Null if not cancelling.
string | null
The timestamp when the batch was cancelled. Null if not cancelled.
string
必須
The current status of the batch job.Available statuses:
VALIDATING- The input file is being validated before the batch can beginPROGRESS- Batch is in progressCOMPLETED- Batch processing completed successfullyFAILED- Batch processing failedEXPIRED- Batch exceeded deadlineCANCELLING- Batch is being cancelledCANCELLED- Batch was cancelled
string
Error messages if any errors occurred during batch processing.
integer
必須
The version number of the batch job.
string
必須
The timestamp when the batch job was created.
string | null
The timestamp when the batch job was last updated. Null if never updated.
string
必須
The unique identifier of the user who created the batch job.
string
必須
The API key ID used to create the batch job.
string
Optional remark or note for the batch job.
integer
必須
The total number of requests in the batch.
integer
必須
The number of completed requests in the batch.
integer
必須
The number of failed requests in the batch.
object | null
Additional metadata associated with the batch job. Null if no metadata is provided.
object
必須
Detailed request count information.
最終更新日 2026年5月15日