API reference

API reference · API

Retrieve a batch

GET/v1/batches/{id}API key

Retrieving an unfinished batch also starts a pass on it after the response.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe batch id.

Answer 200

The batch.

Fields of the 200 answer
FieldTypeWhat it is
idstring
object"batch"
endpointstringOne of "/v1/chat/completions", "/v1/embeddings".
modelstringPresent when every line names the same model.
errorsobject or nullWhy validation failed the batch: {object: list, data: [{code, message, param, line}]}.
input_file_idstring
completion_window"24h"
statusstringOne of "validating", "failed", "in_progress", "finalizing", "completed", "expired", "cancelling", "cancelled".
output_file_idstring or null
error_file_idstring or null
created_atinteger
in_progress_atinteger or null
expires_atinteger
finalizing_atinteger or null
completed_atinteger or null
failed_atinteger or null
expired_atinteger or null
cancelling_atinteger or null
cancelled_atinteger or null
request_countsobject
request_counts.totalinteger
request_counts.completedinteger
request_counts.failedinteger
usageobject
metadataobject or null

Errors

  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter