Skip to main content
POST
/
v1
/
files
Upload File
curl --request POST \
  --url https://api.gravixlayer.com/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form purpose=assistants

Authorizations

Authorization
string
header
required

API key authentication. Get your API key from the Gravix Layer Dashboard.

Body

multipart/form-data
file
file
required

The file to upload

purpose
enum<string>
required

The intended purpose of the file

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

Response

200

File uploaded successfully