Skip to main content
POST
Upload Files

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer

Body

application/json
input_file_id
string
required

The ID of an uploaded file that contains requests for the new batch.

Example:

"file-jkvytbjtow"

endpoint
string
required

The endpoint to be used for all requests in the batch. Currently /v1/chat/completions is supported.

Example:

"/v1/chat/completions"

completion_window
string
required

The time frame within which the batch should be processed. The maximum value is 24 hours, and the minimum value is 336 hours.

Example:

"24h"

metadata
object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.<\br>Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

replace
object

Response

Successful response

id
string
Example:

"batch_rdyqgrcgjg"

object
string
Example:

"batch"

endpoint
string
Example:

"/v1/chat/completions"

errors
string[]
Example:

null

input_file_id
string
Example:

"file-jkvytbjtow"

completion_window
string
Example:

"24h"

status
string
Example:

"in_queue"

output_file_id
string
Example:

null

error_file_id
string
Example:

null

created_at
integer
Example:

1741685413

in_progress_at
integer
Example:

null

expires_at
integer
Example:

1741771813

finalizing_at
integer
Example:

null

completed_at
integer
Example:

null

failed_at
integer
Example:

null

expired_at
integer
Example:

null

cancelling_at
integer
Example:

null

cancelled_at
integer
Example:

null

request_counts
object
Example:

null

metadata
object