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

Base64 File Upload

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

Features#

Supports Base64 encoded data and data URL formats
The MIME type and extension are taken from the data URL prefix (e.g. data:image/png;base64,...) or from the fileName extension.
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

Supported Formats#

Plain Base64 strings: iVBORw0KGgoAAAANSUhEUgAA...
Data URL format: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...

Usage Recommendations#

Recommended for small files such as images
Large files (>10MB) should use the File Stream Upload API
Base64 encoding increases data transmission volume by approximately 33%

Request

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

Examples

Responses

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

🟠400BadRequestError
🟠401UnauthorizedError
🔴500ServerError
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://kieai.redpandaai.co/api/file-base64-upload' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "base64Data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
    "uploadPath": "images/base64",
    "fileName": "test-image.png"
}'
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
File Upload API Quickstart
Next
File Stream Upload
Built with