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

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:
batch,
batch_output,
fine-tune,
vision,
user_data,
evals
expires_after
integer

Expiration time in seconds

Response

200

File uploaded successfully

I