Skip to content

资源与形象

数字人资源统一纳入素材体系。你可以上传或登记形象视频、授权视频、音频素材,获得 asset_id 后在任务中复用。

上传形象素材

http
POST /v1/assets/uploads
bash
curl https://moonapix.com/v1/assets/uploads \
  -H "Authorization: Bearer <MOONAPIX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/avatar.mp4",
    "purpose": "digital_human_avatar",
    "metadata": {
      "name": "brand-host-avatar"
    }
  }'

上传授权素材

bash
curl https://moonapix.com/v1/assets/uploads \
  -H "Authorization: Bearer <MOONAPIX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/authorization.mp4",
    "purpose": "digital_human_authorization"
  }'

查询素材

bash
curl https://moonapix.com/v1/assets/asset_xxx \
  -H "Authorization: Bearer <MOONAPIX_API_KEY>"

在任务中引用

json
{
  "model": "digital-human-video-v8",
  "avatar_asset_id": "asset_avatar_xxx",
  "audio_url": "https://example.com/audio.mp3",
  "name": "brand-host-video"
}

也可以使用 Asset://asset_xxx 作为资源引用,便于在业务系统中区分普通 URL 和 MoonApiX 素材。

常用字段

字段说明
url可访问的素材 URL。
purpose素材用途,例如 digital_human_avatardigital_human_voicedigital_human_authorization
asset_id上传或登记后返回的素材 ID。
metadata可选业务元数据。

相关页面