Files
Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
user_dataPossible values: JSON string with file metadata
Instructions used to process the file
defaultSuccessful Response
Validation Error
POST /files HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 103
{
"file": [
"binary"
],
"purpose": "user_data",
"metadata": "text",
"instructions": "text",
"workspace": "default"
}[
{
"id": "text",
"object": "file",
"bytes": 1,
"created_at": 1,
"filename": "text",
"purpose": "user_data",
"status": "uploaded",
"status_details": "text",
"expires_at": 1,
"org_id": "text",
"workspace_id": "default",
"user_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
List files in workspace
defaultCursor for pagination
Limit the number of returned files
10000Sort order by creation timestamp
descFilter by purpose
Filter by metadata
Successful Response
listValidation Error
GET /files HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"id": "text",
"object": "file",
"bytes": 1,
"created_at": 1,
"filename": "text",
"purpose": "user_data",
"status": "uploaded",
"status_details": "text",
"expires_at": 1,
"org_id": "text",
"workspace_id": "default",
"user_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"object": "list",
"total": 1
}Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
The ID of the file
Get file from workspace
defaultSuccessful Response
fileuser_dataPossible values: uploadedPossible values: defaultValidation Error
GET /files/{file_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "file",
"bytes": 1,
"created_at": 1,
"filename": "text",
"purpose": "user_data",
"status": "uploaded",
"status_details": "text",
"expires_at": 1,
"org_id": "text",
"workspace_id": "default",
"user_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
The ID of the file
Delete file from workspace
defaultSuccessful Response
filetrueValidation Error
DELETE /files/{file_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "file",
"deleted": true
}Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
The ID of the file
The workspace id to get file content from
defaultSuccessful Response
Validation Error
GET /files/{file_id}/content HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)
The ID of the file
The workspace id to update th file in
defaultThe metadata to update. instructions key is considered as an instruction to update metadata by AI.
Successful Response
fileuser_dataPossible values: uploadedPossible values: defaultValidation Error
PATCH /files/{file_id}/metadata HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"id": "text",
"object": "file",
"bytes": 1,
"created_at": 1,
"filename": "text",
"purpose": "user_data",
"status": "uploaded",
"status_details": "text",
"expires_at": 1,
"org_id": "text",
"workspace_id": "default",
"user_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Last updated

