v1

latestOpenAPI 3.1.0MIT2026-07-2614271305.9 KB
File Upload

Base64 File Upload

  • Supports Base64 encoding and Data URL formats
  • Automatically identifies file types and categorizes storage
  • Returns accessible file URLs and download links
  • Files will expire after 72 hours
  • Current user quota is limited. Uploads will fail when quota is exhausted. Please save locally if persistent storage is needed

Note: The file upload API base URL ishttps://files-api.evolink.ai

post/api/v1/files/upload/base64

Request body

base64_datastring 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
upload_pathstring

Custom upload path

Note:

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

Custom file name

Note:

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

Example request

{
  "base64_data": "data:image/png;base64,iVBORw0KGgo...",
  "upload_path": "avatars",
  "file_name": "avatar.png"
}

Response

File uploaded successfully

successboolean

Whether the request was successful

codeinteger

Response status code

msgstring

Response message

Example response

{
  "success": true,
  "code": 200,
  "msg": "File uploaded successfully",
  "data": {
    "file_id": "file_abc123",
    "file_name": "downloaded.jpg",
    "original_name": "downloaded.jpg",
    "file_size": 2048,
    "mime_type": "image/jpeg",
    "upload_path": "downloads",
    "file_url": "https://files.evolink.ai/downloads/downloaded.jpg",
    "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"
  }
}