Files

Upload File

post
/files

Upload a file with optional metadata.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Body
filestring ยท binary[]Optional
purposestring ยท enumOptionalDefault: user_dataPossible values:
metadataany ofOptional

JSON string with file metadata

stringOptional
or
nullOptional
instructionsany ofOptional

Instructions used to process the file

stringOptional
or
nullOptional
workspacestringOptionalDefault: default
Responses
200

Successful Response

application/json
Responseany of
or
post
/files

List Files

get
/files

Returns a list of files, filtered by the organization.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Query parameters
workspacestringOptional

List files in workspace

Default: default
afterany ofOptional

Cursor for pagination

stringOptional
or
nullOptional
limitinteger ยท min: 1 ยท max: 10000Optional

Limit the number of returned files

Default: 10000
orderstringOptional

Sort order by creation timestamp

Default: desc
purposeany ofOptional

Filter by purpose

string ยท enumOptionalPossible values:
or
nullOptional
filterany ofOptional

Filter by metadata

stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
get
/files

Retrieve File

get
/files/{file_id}

Returns information about a specific file, verifying organization access.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
file_idstringRequired

The ID of the file

Query parameters
workspacestringOptional

Get file from workspace

Default: default
Responses
200

Successful Response

application/json
get
/files/{file_id}

Delete File

delete
/files/{file_id}

Delete a file, verifying organization access.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
file_idstringRequired

The ID of the file

Query parameters
workspacestringOptional

Delete file from workspace

Default: default
Responses
200

Successful Response

application/json
delete
/files/{file_id}

Retrieve File Content

get
/files/{file_id}/content

Returns the contents of the specified file, verifying organization access.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
file_idstringRequired

The ID of the file

Query parameters
workspacestringOptional

The workspace id to get file content from

Default: default
Responses
200

Successful Response

application/json
Responseany
get
/files/{file_id}/content

No content

Update File Metadata

patch
/files/{file_id}/metadata

Update metadata for a specific file, verifying organization access.

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
file_idstringRequired

The ID of the file

Query parameters
workspacestringOptional

The workspace id to update th file in

Default: default
Body

The metadata to update. instructions key is considered as an instruction to update metadata by AI.

Other propertiesanyOptional
Responses
200

Successful Response

application/json
Responseany of
or
nullOptional
patch
/files/{file_id}/metadata

Last updated