KIE.AI
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
MarketFile Upload API
Common APIAI Agents
MarketFile Upload API
Common APIAI Agents
  1. File Upload API
  • File Upload API Quickstart
  • Base64 File Upload
    POST
  • File Stream Upload
    POST
  • URL File Upload
    POST
  1. File Upload API

File Stream Upload

POST
https://kieai.redpandaai.co/api/file-stream-upload
Uploaded files are deleted 24 hours after upload.

Features#

Supports binary stream upload for multiple file types
Suitable for large file uploads with high transmission efficiency
Automatically identifies MIME types
Supports custom filenames or auto-generation (identical filenames will overwrite old files, potential caching delays may occur)
Returns complete file information and download links
Protected by API Key authentication

Usage Recommendations#

Recommended for large files (>10MB)
Supports multiple formats: images, videos, documents, etc.
Avoids the ~33% size overhead of Base64 encoding.

Example Command#

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params multipart/form-dataRequired

Responses

🟢200SuccessResponse
application/json
File uploaded successfully
Bodyapplication/json

🟠400BadRequestError
🟠401UnauthorizedError
🔴500ServerError
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://kieai.redpandaai.co/api/file-stream-upload' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""' \
--form 'uploadPath="images/user-uploads"' \
--form 'fileName="my-image.jpg"'
Response Response Example
200 - Successful Example
{
    "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"
    }
}
Previous
Base64 File Upload
Next
URL File Upload
Built with