File Extraction
Extract text from documents for processing:Basic File Upload
V1 File Upload
Upload files to user’s private subchat with OAuth:Single File Upload
Text Content Upload
Upload with Scopes
Bulk Upload
Upload multiple files at once:Bulk File Example
List Files
Get all files in user’s chat:List Example
Upload with Scopes (Advanced)
Upload to specific chat with custom metadata:Scoped Upload Example
JavaScript Upload Examples
Single File with Progress
Bulk Upload with Retry
Supported Formats
Documents
PDF, DOCX, TXT, MD, HTML
Data Files
CSV, JSON, YAML, XML
Code Files
JS, TS, PY, JAVA, C, C++, etc.
Error Handling
Common Upload Errors
Best Practices
1
Validate Client-Side
Check file size and type before uploading to save bandwidth
2
Show Progress
Implement upload progress indicators for better UX
3
Handle Errors
Provide clear error messages and retry options
4
Batch When Possible
Use bulk upload endpoints for multiple files
5
Add Metadata
Use scopes to organize and filter documents