Skip to main content
POST
/
v1
/
files
Upload File
curl --request POST \
  --url http://localhost:8080/v1/files \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form purpose=batch \
  --form 'provider=<string>'
{
  "id": "<string>",
  "object": "<string>",
  "bytes": 123,
  "created_at": 123,
  "filename": "<string>",
  "purpose": "<string>",
  "status": "uploaded",
  "storage_backend": "api",
  "extra_fields": "<unknown>"
}

Body

multipart/form-data
file
file
required

The file to upload

purpose
enum<string>
required

The intended purpose of the file

Available options:
batch,
fine-tune,
assistants,
vision
provider
string
required

The model provider (e.g., openai, azure, bedrock, gemini)

Response

200 - application/json

File uploaded successfully

id
string

Unique file ID

object
string

Object type (file)

bytes
integer

File size in bytes

created_at
integer

Unix timestamp of creation

filename
string

Original filename

purpose
string

File purpose

status
enum<string>

File processing status

Available options:
uploaded,
processed,
processing,
error,
deleted
storage_backend
enum<string>

Storage backend type

Available options:
api,
s3,
gcs,
memory
extra_fields
any