Create batch

Creates and executes a batch.

Body Params
string
required

The endpoint to be used for all requests in the batch. The supported endpoints are: v1/embeddings, v1/contextualizedembeddings, and v1/rerank.

string
required

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.

string
required

The time frame within which the batch should be processed. Currently only 12h is supported.

request_params
object
required

A set of key-value pairs that define the parameters to be used for each request in the batch.

metadata
object

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.

Responses

5XX

Server Error

This indicates our servers are experiencing high traffic or having an unexpected issue. Please see our Error Codes guide.

Language
Credentials
Header
Request
Response
Choose an example:
application/json