Skip to main content
GET
Retrieve Openai Batch
When called with an API key, the key needs the batch scope (about scopes).

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

xi-api-key
string | null
x-api-key
string | null

Path Parameters

batch_id
string
required

Response

Successful Response

id
string
required

The batch ID.

endpoint
string
required

The API endpoint used for the batch.

input_file_id
string
required

The ID of the input file for the batch.

completion_window
string
required

The time frame within which the batch should be processed.

status
string
required

The current status of the batch.

created_at
integer
required

The Unix timestamp of when the batch was created.

expires_at
integer
required

The Unix timestamp of when the batch will expire.

object
string
default:batch

The object type, which is always batch.

Allowed value: "batch"
errors
BatchErrors · object | null

Errors that occurred during the batch.

output_file_id
string | null

The ID of the output file.

error_file_id
string | null

The ID of the error file.

in_progress_at
integer | null

The Unix timestamp of when the batch started processing.

finalizing_at
integer | null

The Unix timestamp of when the batch started finalizing.

completed_at
integer | null

The Unix timestamp of when the batch completed.

failed_at
integer | null

The Unix timestamp of when the batch failed.

expired_at
integer | null

The Unix timestamp of when the batch expired.

cancelling_at
integer | null

The Unix timestamp of when the batch started cancelling.

cancelled_at
integer | null

The Unix timestamp of when the batch was cancelled.

request_counts
BatchRequestCounts · object | null

Request counts for the batch.

metadata
Metadata · object | null

Metadata associated with the batch.

model
string | null

The model used for the batch.

usage
BatchUsage · object | null

Token usage accumulated for the batch.