Skip to main content
POST
/
api
/
file-stream-upload
File Stream Upload
curl --request POST \
  --url https://veo3apiai.redpandaai.co/api/file-stream-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form uploadPath=images/user-uploads \
  --form fileName=my-image.jpg
{
  "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"
  }
}
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://veo3apiai.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
file
file
required

File to upload (binary data)

uploadPath
string
required

File upload path, without leading or trailing slashes

Example:

"images/user-uploads"

fileName
string

Custom file name (optional). If not provided, the system will generate a random filename. If a custom filename is provided that matches an existing file, the existing file will be overwritten. Note: Due to caching mechanisms, file overwrites may not take effect immediately.

Example:

"my-image.jpg"

Response

File uploaded successfully

success
boolean

Whether the request was successful

code
enum<integer>

Response status code

CodeDescription
200Success - Request has been processed successfully
400Bad Request - Request parameters are incorrect or missing required parameters
401Unauthorized - Authentication credentials are missing or invalid
405Method Not Allowed - Request method is not supported
500Server Error - An unexpected error occurred while processing the request
Available options:
200,
400,
401,
405,
500
msg
string

Response message

Example:

"File uploaded successfully"

data
object