Skip to main content

Upload File

POST /api/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

Code Examples

curl --request POST \
--url 'https://tess.pareto.io/api/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.

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