Skip to main content
GET
cURL
Related guide: Batches guide. See the Batches guide for the status lifecycle.

Authorizations

Authorization
string
header
required

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

Path Parameters

batch_id
string
required

The batch's identifier, as returned from create.

Response

The batch.

completion_window
string
required

Time window the batch runs in, always 24h.

created_at
integer<int64>
required

Creation time, in Unix seconds.

endpoint
string
required

Endpoint each line of the input file is sent to.

id
string
required

Batch identifier.

input_file_id
string
required

ID of the uploaded JSONL input file.

object
string
required

Object type, always batch.

request_counts
object
required

Per-line progress counters.

status
enum<string>
required

Current batch status.

Available options:
validating,
in_progress,
finalizing,
completed,
failed,
expired,
cancelling,
cancelled
cancelled_at
integer<int64>

Time the batch finished cancelling, in Unix seconds.

cancelling_at
integer<int64>

Time cancellation was requested, in Unix seconds.

completed_at
integer<int64>

Time the batch completed, in Unix seconds.

error_file_id
string

ID of the JSONL file holding per-line errors, when any line failed.

errors
object

Errors that prevented the batch from running, when the status is failed.

expired_at
integer<int64>

Time the batch expired, in Unix seconds.

expires_at
integer<int64>

Time the batch expires, in Unix seconds.

failed_at
integer<int64>

Time the batch failed, in Unix seconds.

finalizing_at
integer<int64>

Time the batch began assembling its result files, in Unix seconds.

in_progress_at
integer<int64>

Time the batch started running, in Unix seconds.

metadata
object

Metadata supplied at creation.

model
string

Model resolved for the batch.

output_file_id
string

ID of the JSONL file holding successful responses, set once the batch completes.

usage
object

Token usage summed over the successful lines.