API reference

API reference · API

List the account's files

GET/v1/filesAPI key

Parameters

Path and query parameters
FieldTypeWhat it is
purpose (query)stringbatch or batch_output.
limit (query)integerAt most 1000; 100 by default. At most 1000.
after (query)stringA file id to continue after.
order (query)stringNewest first by default. One of "asc", "desc".

Answer 200

A page of files.

Fields of the 200 answer
FieldTypeWhat it is
object"list"
dataarray of BatchFile
data[].idstring
data[].object"file"
data[].bytesinteger
data[].created_atinteger
data[].expires_atnull
data[].filenamestring
data[].purposestringassistants and user_data are documents for file search (scripts/openapi-vector.ts). One of "batch", "batch_output", "assistants", "user_data".
data[].status"processed"
data[].status_detailsnull
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