跳转到主要内容
POST
/
api
/
v1
/
files
/
upload
/
url
URL文件上传
curl --request POST \
  --url https://files-api.evolink.ai/api/v1/files/upload/url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_url": "https://example.com/image.jpg"
}'
{
  "success": true,
  "code": 200,
  "msg": "文件上传成功",
  "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"
  }
}

Authorizations

Authorization
string
header
required

##所有接口均需要使用Bearer Token进行认证##

获取 API Key :

访问 API Key 管理页面 获取您的 API Key

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

Body

application/json
file_url
string<uri>
required

远程文件URL

要求:

  • 必须是可公开访问的URL
  • 支持 HTTP 和 HTTPS 协议
  • 系统会自动下载该URL的文件内容
  • 单次请求最多支持1张图像
  • 当前仅支持:image/jpegimage/pngimage/gifimage/webp四种类型文件的上传
Example:

"https://example.com/image.jpg"

upload_path
string

自定义上传路径

说明:

  • 不指定时系统会根据文件类型自动分类
Example:

"downloads"

file_name
string

自定义文件名

说明:

  • 不指定时系统会自动生成唯一文件名
Example:

"downloaded.jpg"

Response

200 - application/json

文件上传成功

success
boolean

请求是否成功

Example:

true

code
integer

响应状态码

Example:

200

msg
string

响应消息

Example:

"文件上传成功"

data
object