POST
/
api
/
file-stream-upload
File Stream Upload
curl --request POST \
  --url https://kieai.redpandaai.co/api/file-stream-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form uploadPath=images/user-uploads \
  --form fileName=my-image.jpg \
  --form file=@example-file
{
"success": true,
"code": 200,
"msg": "File uploaded successfully",
"data": {
"fileName": "uploaded-image.png",
"filePath": "images/user-uploads/uploaded-image.png",
"downloadUrl": "https://tempfile.redpandaai.co/xxx/images/user-uploads/uploaded-image.png",
"fileSize": 154832,
"mimeType": "image/png",
"uploadedAt": "2025-01-01T12:00:00.000Z"
}
}
Upload temporary files via multipart/form-data format. Note: Uploaded files are temporary and automatically deleted after 3 days.

Features

  • Supports binary stream upload for various file types
  • Suitable for large file uploads with high transmission efficiency
  • Automatic MIME type recognition
  • Support for custom file names or using original file names
  • Returns complete file information and download links
  • API Key authentication protection
  • Uploaded files are temporary and automatically deleted after 3 days

Usage Recommendations

  • Recommended for large files (>10MB)
  • Supports various formats: images, videos, documents, etc.
  • Transmission efficiency is approximately 33% higher than Base64 format

Example Command

curl -X POST https://kieai.redpandaai.co/api/file-stream-upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/your-file.jpg" \
  -F "uploadPath=images/user-uploads" \
  -F "fileName=custom-name.jpg"

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Body

multipart/form-data

Response

200
application/json

File uploaded successfully

The response is of type object.