API reference

API reference · API

List the account's batches

GET/v1/batchesAPI key

Parameters

Path and query parameters
FieldTypeWhat it is
limit (query)integerAt most 100; 20 by default. At most 100.
after (query)stringA batch id to continue after.

Answer 200

A page of batches, newest first.

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

Errors

  • 401OpenAI 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