Skip to main content
POST
Upload a file

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file
required

The file to upload.

purpose
string
required

What the file is for. Use batch for Batch API input files.

Response

The uploaded file.

id
string
required

The file's unique ID.

object
enum<string>
required
Available options:
file
bytes
integer
required

The file's size in bytes.

created_at
integer
required

When the file was uploaded, as a Unix timestamp.

filename
string
required

The name the file was uploaded with.

purpose
string
required

What the file is for. Use batch for Batch API input files.

status
string

The file's processing status.

status_details
string | null