Upload API
The Upload API allows you to process files through our intelligent content transformation pipeline. It supports both single file processing and batch processing of multiple files, with API key authentication for secure integration.
Single File Upload
Process a single file or URL through our transformation pipeline.
Single Upload Endpoint
/v1/uploads/single Upload and process a single file or URL.
curl -X POST https://api.shrinked.com/v1/uploads/single \ -H "x-api-key: YOUR_API_KEY" \ -H "content-type: application/json" \ -d '{ "email": "[email protected]", "language": "en", "payload": "https://example.com/file.mp3" }'curl -X POST https://api.shrinked.com/v1/uploads/single \ -H "x-api-key: YOUR_API_KEY" \ -F "language=en" \ -F "file=@/path/to/your/file.mp3"{ "taskId": "task_abc123", "status": "in_progress"}Check Task Status
/v1/uploads/task/taskId Check the status of a processing task.
curl -X GET https://api.shrinked.com/v1/uploads/task/task_abc123 \ -H "x-api-key: YOUR_API_KEY"{ "taskId": "task_abc123", "status": "completed", "progress": 100, "result": { "documentId": "doc_xyz789", "accessUrl": "https://api.shrinked.com/documents/doc_xyz789" }}Batch Processing
Process multiple files at once through our intelligent content transformation pipeline. This is perfect for processing entire directories or multiple media sources simultaneously.
Batch Upload Endpoint
/v1/uploads/multi Process multiple files or URLs in a single request.
curl -X POST https://api.shrinked.com/v1/uploads/multi \ -H "x-api-key: YOUR_API_KEY" \ -H "content-type: application/json" \ -d '{ "email": "[email protected]", "language": "en", "payload": [ "https://example.com/file1.mp3", "https://example.com/file2.mp3", "https://example.com/file3.mp3" ] }'{ "tasks": [ { "taskId": "task_abc123", "status": "in_progress" }, { "taskId": "task_def456", "status": "in_progress" }, { "taskId": "task_ghi789", "status": "in_progress" } ], "batchId": "batch_xyz890"}Batch Status Endpoint
/v1/uploads/multi/batchId Check the status of a batch processing job.
curl -X GET https://api.shrinked.com/v1/uploads/multi/batch_xyz890 \ -H "x-api-key: YOUR_API_KEY"{ "batchId": "batch_xyz890", "status": "processing", "tasks": [ { "taskId": "task_abc123", "status": "completed", "result": { "documentId": "doc_123abc", "accessUrl": "https://api.shrinked.com/documents/doc_123abc" } }, { "taskId": "task_def456", "status": "processing" }, { "taskId": "task_ghi789", "status": "queued" } ], "progress": { "completed": 1, "processing": 1, "queued": 1, "failed": 0, "total": 3 }}Batch Processing Flow
Submit Batch
Upload multiple files or URLs in a single request
Process Files
Files are processed in parallel for maximum efficiency
Monitor Progress
Check batch status to track individual task completion
Access Results
Download or access processed documents for each completed task
Supported File Types
Audio
Video
URLs
Size and Rate Limits
Single Upload Limits
Maximum File Size
Maximum Duration
Rate Limit
Batch Upload Limits
Maximum Files Per Batch
Maximum Total Size
Rate Limit
Contact support to request higher limits for your account.
Status Codes
Task is waiting to be processed
Task is actively being processed
Task has finished successfully
Task failed to process
Error Handling
If one or more files in a batch fail to process, the API will continue processing the remaining files. Failed tasks will include error information in the status response:
{ "taskId": "task_abc123", "status": "failed", "error": { "code": "FILE_NOT_ACCESSIBLE", "message": "Unable to access file at provided URL" }}Common Error Codes
| Error Code | Description |
|---|---|
FILE_NOT_ACCESSIBLE | The file URL could not be accessed |
INVALID_FILE_FORMAT | The file format is not supported |
PROCESSING_ERROR | General error during processing |
RATE_LIMIT_EXCEEDED | Request rate limit exceeded |
BATCH_SIZE_EXCEEDED | Too many files in batch request |
Best Practices
Start Small
Begin with small batches to test your integration before scaling up.
Implement Retry Logic
Add retry mechanisms for failed tasks to ensure complete processing.
Monitor Progress
Periodically check status to track completion and handle results as they become available.
Handle Partial Success
Design your application to handle cases where some files process successfully while others fail.
Processing Languages
| Language | Code |
|---|---|
| English | en |
| Spanish | es |
| French | fr |
| German | de |
| Portuguese | pt |
| Italian | it |
Additional languages are being added regularly. Check our documentation for updates.
Coming Soon: Webhook Notifications
In a future update, you will be able to configure webhooks to receive notifications when:
- Processing jobs complete
- Individual tasks complete
- Processing errors occur
This will eliminate the need for polling the status endpoints.