File Service Get Upload Addr

0 credits/call
ae_file_service_get_upload_addr

Get a temporary file upload link and public download URL for a local file, using its size, extension, and upload-link expiration time. Maximum upload file size is 500 MiB (524288000 bytes). The upload URL lifetime ttl_minutes is at most 30 days (43200 minutes).

Productivity
0 credits/call

Pricing

0 credits/call
ConditionCharge
Each call0 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
extstringYes文件扩展名,不含点号,只允许字母和数字,不区分大小写—
size_bytesintegerYes单个文件大小,单位 byte。必须大于 0,最大 524,288,000 字节(500 MiB,含上限);传入实际文件字节数。—
ttl_minutesintegerYes上传链接有效期,单位分钟,取值 1~120(含上下限),最长 2 小时。文件上传后按 1 天的保留策略清理。—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_file_service_get_upload_addr' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "ext": "mp4",
    "size_bytes": 6614054,
    "ttl_minutes": 60
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "downloadURL": "https://agentearth.ai/fileserver/file/4226a6c2-4bc7-4519-a066-e0afa6c62d59.mp4",
  "error": 0
}

This example shows part of the response. Copied content is valid JSON.