Skip to main content

Upload File

POST /files

Upload a new file to the system and optionally process it.

Supported files​

LabelFile Pattern(s)
Text*.txt
Word*.{doc,docx}
Spreadsheet*.csv
PDF*.pdf
Excel*.xls,*.xlsx
Power Point*.{ppt,pptx}
Image*.{jpg,jpeg,png,gif,bmp,svg,tiff,webp}
Video*.{mp4,avi,mov,mkv,wmv,flv}
Audio*.{mp3,wav,aac,ogg,flac,m4a}
Code*.bas, *.bat, *.xml, *.css, *.dart, *.{html,htm}, *.inc, *.js, *.json, *.kt, *.lua, *.pas, *.php, *.pl, *.ps1, *.py, *.r, *.sh, *.vsd, *.sql, *.swift, *.ts, *.vb, *.vba, *.{yml,yaml}, *.md

Limits​

  • Maximum file size per upload: 200 MB
  • This endpoint accepts one file per request (use multiple requests for multiple files).
  • File storage limit: 30 files
  • Some features have different limits:
    • Chat attachments: up to 200 MB per file; up to 5 files per send
    • Audio transcription: up to 10 MB per file

Code Examples​

curl --request POST \
--url 'https://api.tess.im/files' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@/path/to/file' \
--form 'process=false'

Headers​

ParameterTypeRequiredDescription
x-workspace-idintegerNoID of the workspace. If not provided, the user's selected workspace will be used.

Note: This field will be required in a future release of the API. It is highly recommended to set it now to ensure compatibility with future updates.

Request Body​

ParameterTypeRequiredDescription
filebinaryYesThe file to upload
processbooleanNoWhether to process the file after upload (default: false). The file processing consume credits (true).

Response​

{
"id": 73325,
"object": "file",
"bytes": 35504128,
"created_at": "2025-01-05T22:26:27+00:00",
"filename": "endpoints.pdf",
"credits": 0,
"status": "waiting"
}

Try it out!​

Authentication​

This endpoint requires Bearer token authentication.

Test Endpoint​

Multipart Fields