Appearance
资源与形象
数字人资源统一纳入素材体系。你可以上传或登记形象视频、授权视频、音频素材,获得 asset_id 后在任务中复用。
上传形象素材
http
POST /v1/assets/uploadsbash
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_avatar、digital_human_voice、digital_human_authorization。 |
asset_id | 上传或登记后返回的素材 ID。 |
metadata | 可选业务元数据。 |