Skip to main content
POST
Base64 File Upload

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Body

application/json
base64_data
string
required

Base64 encoded file data

Supported Formats:

  • Data URL format: data:image/png;base64,iVBORw0KGgo...
  • Pure Base64 encoding: iVBORw0KGgo...

Note:

  • Maximum 1 file per request
  • Supported file types: images (JPEG, PNG, GIF, WebP), video (MP4, MOV, WebM) and audio (MP3, WAV, M4A, AAC, FLAC, OGG)
  • With a Data URL prefix, the type declared in the prefix is used; plain Base64 is typed from the file content
Example:

"data:image/png;base64,iVBORw0KGgo..."

upload_path
string

Custom upload path

Note:

  • If not specified, system will automatically categorize based on file type
Example:

"avatars"

file_name
string

Custom file name

Note:

  • If not specified, system will automatically generate a unique file name
Example:

"avatar.png"

Response

200 - application/json

File uploaded successfully

success
boolean

Whether the request was successful

Example:

true

code
integer

Response status code

Example:

200

msg
string

Response message

Example:

"File uploaded successfully"

data
object