cos-upload

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Upload a file → AceData CDN URL

上传文件 → AceData CDN URL

Turn a local file into a public
https://cdn.acedata.cloud/...
URL.
将本地文件转换为公共的
https://cdn.acedata.cloud/...
URL。

Upload (multipart, synchronous)

上传(多部分,同步)

bash
curl -s -X POST https://platform.acedata.cloud/api/v1/files/ \
  -H "Authorization: Bearer $ACEDATACLOUD_PLATFORM_TOKEN" \
  -F "file=@/path/to/video.mp4"
Response:
json
{"file_url": "https://cdn.acedata.cloud/7f849b80b9.mp4"}
→ use
file_url
. One file per request (loop for several).
bash
curl -s -X POST https://platform.acedata.cloud/api/v1/files/ \
  -H "Authorization: Bearer $ACEDATACLOUD_PLATFORM_TOKEN" \
  -F "file=@/path/to/video.mp4"
响应:
json
{"file_url": "https://cdn.acedata.cloud/7f849b80b9.mp4"}
→ 使用
file_url
。每次请求上传一个文件(如需上传多个可循环执行)。

When to use

使用场景

  • Feed a generated asset into another API by URL — e.g. upload a gpt-image-2 still, then pass its URL to
    seedance
    /
    kling
    image-to-video.
  • Publish/return a finished artifact (final video, cover image).
  • Persist intermediate artifacts so a later run can re-download and continue.
  • 通过URL将生成的资产传入其他API —— 例如,上传gpt-image-2生成的静态图片,然后将其URL传入
    seedance
    /
    kling
    图转视频API。
  • 发布/返回成品制品(最终视频、封面图片)。
  • 持久化中间制品,以便后续运行时可重新下载并继续处理。

Notes

注意事项

  • Auth uses the platform token (
    ACEDATACLOUD_PLATFORM_TOKEN
    ), not the per-service API token — the files endpoint is on
    platform.acedata.cloud
    , not
    api.acedata.cloud
    .
  • If your runtime ships a bundled uploader (e.g. a worker that owns the storage creds), prefer it — it avoids handling the platform token directly.
  • The returned URL is CDN-served and stable; safe to store and re-download later.
  • 认证使用平台令牌
    ACEDATACLOUD_PLATFORM_TOKEN
    ),而非各服务专属的API令牌 —— 文件端点位于
    platform.acedata.cloud
    ,而非
    api.acedata.cloud
  • 如果你的运行环境提供了捆绑的上传工具(例如拥有存储凭证的worker),优先使用该工具 —— 这样可避免直接处理平台令牌。
  • 返回的URL由CDN提供服务且稳定可靠;可安全存储并在后续重新下载。