LogoLogo
  • ๐Ÿ”ฌActiveloop
  • ๐Ÿ Setup
    • Quickstart
  • Models & Pricing
  • ๐Ÿ“–User Guide
    • Ingesting with Metadata
      • Modalities
    • Filtering Query
      • Query Syntax
    • Streaming Output
  • ๐Ÿ—๏ธAPI Reference
    • Chat Completions
    • Files
Powered by GitBook
On this page
Export as PDF
  1. API Reference

Files

PreviousChat Completions

Last updated 12 days ago

๐Ÿ—๏ธ

Delete File

delete

Delete a file, verifying organization access.

Authorizations
Path parameters
file_idstringRequired

The ID of the file

Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
delete
DELETE /files/{file_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Accept: */*

No content

Retrieve File Content

get

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

Authorizations
Path parameters
file_idstringRequired

The ID of the file

Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
get
GET /files/{file_id}/content HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Accept: */*

No content

  • POSTUpload File
  • GETRetrieve File
  • DELETEDelete File
  • GETRetrieve File Content

Retrieve File

get

Returns information about a specific file, verifying organization access.

Authorizations
Path parameters
file_idstringRequired

The ID of the file

Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
get
GET /files/{file_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Accept: */*

No content

Upload File

post

Upload a file with optional metadata and processing instructions.

Authorizations
Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Body
filestring ยท binary[]Optional
purposestring ยท enumOptionalDefault: user_dataPossible values:
metadataany ofOptional

JSON string with file metadata

stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
post
POST /files HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Content-Type: multipart/form-data
Accept: */*
Content-Length: 55

{
  "file": [
    "binary"
  ],
  "purpose": "batch",
  "metadata": "text"
}

No content

List Files

get

Returns a list of files, filtered by the organization.

Authorizations
Query parameters
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
Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
get
GET /files HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Accept: */*

No content

Update File Metadata

patch

Update metadata for a specific file, verifying organization access.

Authorizations
Path parameters
file_idstringRequired

The ID of the file

Header parameters
X-Activeloop-Org-Idany ofOptional
stringOptional
or
nullOptional
Body

The metadata to update

Other propertiesanyOptional
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
patch
PATCH /files/{file_id}/metadata HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

No content