Files

File upload and management endpoints.

List files (OpenAI-compatible)

get

List files owned by the authenticated project, optionally filtered by purpose.

Authorizations
AuthorizationstringRequired

API key in Authorization header using Bearer .

Query parameters
purposeany ofOptional

Filter by purpose

stringOptional
or
nullOptional
limitinteger · min: 1 · max: 1000Optional

Max number of files.

Default: 100
offsetintegerOptional

Number of files to skip.

Default: 0
Responses
chevron-right
200

Successful Response

application/json

OpenAI-compatible list response for files.

objectconst: listOptional

Object type identifier.

Default: list
totalintegerRequired

Total number of items available for this resource.

get
/v1/files

Upload a file

post

Upload a file to the platform. This endpoint accepts a file and a purpose, and uploads the file to the platform, for later use in training or evaluation.

Authorizations
AuthorizationstringRequired

API key in Authorization header using Bearer .

Body
purposestringRequired
filestring · binaryRequired
Responses
post
/v1/files

Retrieve file metadata

get

Fetch metadata for a single file by id within the authenticated project.

Authorizations
AuthorizationstringRequired

API key in Authorization header using Bearer .

Path parameters
file_idstringRequired

File id (UUID)

Responses
chevron-right
200

Successful Response

application/json

OpenAI-compatible file object (subset).

We keep id as the DB UUID string, and expose the OpenAI-ish envelope.

idstringRequired

File id (UUID).

objectconst: fileOptional

Object type.

Default: file
bytesintegerRequired

File size in bytes.

created_atintegerRequired

Unix timestamp (seconds).

filenamestringRequired

Original filename.

purposestringRequired

Intended file purpose.

statusstringRequired

Current file status.

status_detailsany ofOptional

Optional status details.

stringOptional
or
nullOptional
get
/v1/files/{file_id}

Delete a file (OpenAI-compatible)

delete

Soft-delete a file by id within the authenticated project.

Authorizations
AuthorizationstringRequired

API key in Authorization header using Bearer .

Path parameters
file_idstringRequired

File id (UUID)

Responses
chevron-right
200

Successful Response

application/json

OpenAI-compatible delete response.

idstringRequired

File id (UUID).

objectconst: fileOptional

Object type.

Default: file
deletedbooleanOptional

Deletion status.

Default: true
delete
/v1/files/{file_id}

Retrieve file content (OpenAI-compatible)

get

Download the raw contents of a file by id within the authenticated project.

Authorizations
AuthorizationstringRequired

API key in Authorization header using Bearer .

Path parameters
file_idstringRequired

File id (UUID)

Responses
chevron-right
200

Raw file bytes

anyOptional
get
/v1/files/{file_id}/content

No content

Last updated