Get started with the File Upload API in minutes, supporting multiple upload methods
Welcome to File Upload API#
The File Upload API provides flexible and efficient file upload services, supporting multiple upload methods to meet diverse business needs. Whether it's remote file migration, large file transmission, or quick small file uploads, our API offers the best solutions for your requirements.
Base64 Upload
Base64 encoded file upload, suitable for small files
File Stream Upload
Efficient binary file stream upload, ideal for large files
URL File Upload
Automatically download and upload files from remote URLsFile uploads are free - No charges apply for uploading files to our service. You can upload files without worrying about upload costs or fees.
Important Notice: Uploaded files are temporary and will be automatically deleted after 3 days. Please download or migrate important files promptly.
Authentication#
All API requests require authentication using Bearer tokens. Please obtain your API key from the API Key Management Page.Please keep your API key secure and never share it publicly. If you suspect your key has been compromised, reset it immediately.
API Base URL#
https://sunoapiorg.redpandaai.co
Quick Start Guide#
Step 1: Choose Your Upload Method#
Select the appropriate upload method based on your needs:Suitable for downloading and uploading files from remote servers:
Step 2: Handle Response#
Upon successful upload, you'll receive a response containing file information:{
"success": true,
"code": 200,
"msg": "File uploaded successfully",
"data": {
"fileId": "file_abc123456",
"fileName": "my-image.jpg",
"originalName": "sample-image.jpg",
"fileSize": 245760,
"mimeType": "image/jpeg",
"uploadPath": "images",
"fileUrl": "https://sunoapiorg.redpandaai.co/files/images/my-image.jpg",
"downloadUrl": "https://sunoapiorg.redpandaai.co/download/file_abc123456",
"uploadTime": "2025-01-15T10:30:00Z",
"expiresAt": "2025-01-18T10:30:00Z"
}
}
Upload Method Comparison#
Choose the most suitable upload method for your needs:
URL File Upload
Best for: File migration, batch processingAutomatic download handling
Supports remote resources
Requires publicly accessible URL
30-second download timeout
File Stream Upload
Best for: Large files, local filesHigh transmission efficiency
Base64 Upload
Best for: Small files, API integrationData size increases by 33%
Not suitable for large files
Practical Examples#
Batch File Upload#
Using file stream upload to handle multiple files:Error Handling#
Common errors and handling methods:Best Practices#
Important Notice: All uploaded files are temporary and will be automatically deleted after 3 days.
Files are immediately accessible and downloadable after upload
File URLs remain valid for 3 days
The system provides an expiresAt field in the response indicating expiration time
It's recommended to download or migrate important files before expiration
Use the downloadUrl field to get direct download links
Status Codes#
Request processed successfully, file upload completedRequest parameters are incorrect or missing required parametersAuthentication credentials are missing or invalidRequest method is not supported, please check HTTP methodAn unexpected error occurred while processing the request, please retry or contact supportNext Steps#
URL File Upload
Learn how to upload files from remote URLs
File Stream Upload
Master efficient file stream upload methods
Base64 Upload
Understand Base64 encoded file uploadsSupport#
Need help? Our technical support team is here to assist you.API Status: Check our status page for real-time API health
Ready to start uploading files? Get your API key and begin using the file upload service immediately!