Skip to main content
POST
Upload File

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

multipart/form-data
file
file
required

File to upload (PDF, images, etc. depending on purpose and model support)

purpose
enum<string>
required

Intended use of the file

Available options:
assistants,
batch,
fine-tune,
vision,
user_data
Example:

"assistants"

Response

File uploaded

id
string
Example:

"file_abc123"

object
string
Example:

"file"

bytes
integer
Example:

120000

created_at
integer
Example:

1677610602

filename
string
Example:

"document.pdf"

purpose
string
Example:

"assistants"

status
string
Example:

"processed"