KIE.AI
English
  • English
  • Chinese
English
  • English
  • Chinese
Support
English
  • English
  • Chinese
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma APIFile Upload API
Common API
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma APIFile Upload API
Common API
  1. File Upload API
  • File Upload API Quickstart
  • Base64 File Upload
    POST
  • File Stream Upload
    POST
  • URL File Upload
    POST
English
  • English
  • Chinese
Support
English
  • English
  • Chinese
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma APIFile Upload API
Common API
MarketVeo3.1 APISuno API4o Image APIFlux Kontext APIRunway APILuma APIFile Upload API
Common API
  1. File Upload API

File Stream Upload

POST
/api/file-stream-upload
Uploaded files are temporary and will be automatically deleted after 3 days.

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
Uploaded files are temporary and will be automatically deleted after 3 days

Usage Recommendations#

Recommended for large files (>10MB)
Supports multiple formats: images, videos, documents, etc.
Approximately 33% more efficient for transmission compared to Base64 format

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
Body

🟠400BadRequestError
🟠401UnauthorizedError
🔴500ServerError
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.kie.ai/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