Skip to main content
POST
/
api
/
v1
/
files
/
upload
/
base64
Base64 File Upload
curl --request POST \
  --url https://files-api.evolink.ai/api/v1/files/upload/base64 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "base64_data": "data:image/png;base64,iVBORw0KGgo..."
}'
{
  "success": true,
  "code": 200,
  "msg": "File uploaded successfully",
  "data": {
    "file_id": "file_abc123",
    "file_name": "avatar.png",
    "original_name": "avatar.png",
    "file_size": 2048,
    "mime_type": "image/png",
    "upload_path": "avatars",
    "file_url": "https://files.evolink.ai/avatars/avatar.png",
    "download_url": "https://files.evolink.ai/api/v1/files/download/file_abc123",
    "upload_time": "2025-10-09T00:00:00+08:00",
    "expires_at": "2025-10-12T00:00:00+08:00"
  }
}

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to obtain your API Key

Add to request header:

Authorization: Bearer YOUR_API_KEY

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 image per request
  • Currently supports uploading files in: image/jpeg, image/png, image/gif, image/webp formats only
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