When to Use This
- Uploading many files in a batch
- Building production pipelines
- Handling failures gracefully
- Processing webhook callbacks
Async Upload Pattern
For large files or many uploads, use callbacks instead of waiting:Webhook Handler
Handle upload callbacks in your backend:Python
Callback Payloads
Success:Batch Upload with Tracking
Track multiple uploads and wait for all to complete:Retry Pattern
Handle transient failures with exponential backoff:Indexing Callbacks
Chain indexing after upload completes:Error Handling
Common error responses and how to handle them:| Error | Cause | Action |
|---|---|---|
Download failed | URL inaccessible | Verify URL, check permissions |
Invalid media type | Wrong MediaType enum | Match MediaType to file |
Something went wrong | Corrupted file | Re-encode source file |