Library management

Upload Workspace File

Upload files to use for RAG Engine document searches. You can assign metadata to your files to limit searches to specific files by file metadata. There is no bulk upload method; files must be loaded one at a time.

  • Max number of files: No limit. The playground limits bulk uploads to 50 files per request.
  • Max library size: 1 GB total size. No limit to individual file size.
  • Supported file types: PDF, DocX, HTML, TXT
post/studio/v1/library/files

Request

  • Base URL
    https://api.ai21.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.ai21.com/studio/v1/library/files
  • Auth
    none declared

Request body multipart/form-data

filestring binary required
pathstring
labelsstring[]
publicUrlstring
custom_configsstring
upload_mode'immediate' | 'batch'

An enumeration.

batch_idstring uuid
data_sourcestring
metadatastring

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 55 revisions of this API.