Create batch
Creates and executes a batch.
Request body
The endpoint to be used for all requests in the batch. The supported endpoints are: <code>v1/embeddings</code>, <code>v1/contextualizedembeddings</code>, and <code>v1/rerank</code>.
The ID of file that contains requests for the new batch. See the Files API for how to list existing files or upload a new file. Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch.
The time frame within which the batch should be processed. Currently only <code>12h</code> is supported.
Optional set of 16 key-value pairs that can be useful for storing additional metadata about the batch in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
Response
Success. The created Batch object.
The batch identifier.
The object type, which is always batch.
The endpoint used by the batch.
The ID of the input file for the batch.
The time frame within which the batch should be processed.
The model used by the endpoint.
The current status of the batch.
The ID of the file containing the outputs of successfully executed requests.
The ID of the file containing the outputs of requests with errors.
Set of key-value pairs attached to batch. This can be useful for storing additional information about the batch in a structured format.
RFC 3339 datetime string for when the batch was created.
RFC 3339 datetime string for when the batch started processing.
RFC 3339 datetime string for when the batch started finalizing.
RFC 3339 datetime string for when the batch was completed.
RFC 3339 datetime string for when the batch failed.
RFC 3339 datetime string for when the batch is expected to complete.
RFC 3339 datetime string for when the batch started canceling.
RFC 3339 datetime string for when the batch was canceled.