API reference

API reference · API

Retrieve a file

GET/v1/files/{id}API key

Parameters

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

Answer 200

The file object.

Fields of the 200 answer
FieldTypeWhat it is
idstring
object"file"
bytesinteger
created_atinteger
expires_atnull
filenamestring
purposestringassistants and user_data are documents for file search (scripts/openapi-vector.ts). One of "batch", "batch_output", "assistants", "user_data".
status"processed"
status_detailsnull

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