Upload an asset (base64)
POST/v1/assets/upload/base64
Upload a file using a JSON body with base64-encoded content. Returns an uploadID that can be referenced when sending messages with attachments. Alternative to the multipart upload endpoint.
Body ParametersJSON
content: string
Base64-encoded file content (max ~500MB decoded)
minLength1
maxLength750000000
fileName: optional string
Original filename. Generated if omitted
mimeType: optional string
MIME type. Auto-detected from magic bytes if omitted
Returns
duration: optional number
Duration in seconds (audio/videos)
error: optional string
Error message if upload failed
fileName: optional string
Resolved filename
fileSize: optional number
File size in bytes
height: optional number
Height in pixels (images/videos)
mimeType: optional string
Detected or provided MIME type
srcURL: optional string
Local file URL (file://) for the uploaded asset
uploadID: optional string
Unique upload ID for this asset
width: optional number
Width in pixels (images/videos)
Upload an asset (base64)
curl http://localhost:23373/v1/assets/upload/base64 \
-H 'Content-Type: application/json' \
-d '{
"content": "x"
}'{
"duration": 0,
"error": "error",
"fileName": "fileName",
"fileSize": 0,
"height": 0,
"mimeType": "mimeType",
"srcURL": "srcURL",
"uploadID": "uploadID",
"width": 0
}Returns Examples
{
"duration": 0,
"error": "error",
"fileName": "fileName",
"fileSize": 0,
"height": 0,
"mimeType": "mimeType",
"srcURL": "srcURL",
"uploadID": "uploadID",
"width": 0
}