Files
Upload file
Upload a file.
POST
/
v1
/
files
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
purpose
enum<string>
default: assistantsAvailable options:
assistants
, assistants_output
, batch
, batch_output
, fine-tune
, fine-tune-results
, vision
Body
multipart/form-data
file
file
requiredResponse
201 - application/json
Response to the file upload API.
filename
string
requiredName of the file
bytes
integer
requiredSize of the file in bytes
purpose
enum<string>
requiredPurpose of the file
Available options:
assistants
, assistants_output
, batch
, batch_output
, fine-tune
, fine-tune-results
, vision
id
string
Unique identifier of the file
created_at
string
Date and time when the file was created (in UTC timezone)
object
string
default: fileType of the file
Allowed value:
"file"