如何使用 HeyGen Avatar 6
模式会根据你提交的字段自动选择(每次请求只使用一种模式):
- 照片:
images_list(1 张照片)+ audio_url。
- 参考视频:
video_url + audio_url(可选 images_list 参考照片)。
- 公开虚拟形象:
avatar + audio_url 或 text(可选 voice、aspect_ratio)。
音频时长必须为 2-60 秒且小于 15 MB;输出时长与音频一致。选择 resolution 1080p 或 2K。
curl -X POST https://api.muapi.ai/api/v1/heygen-avatar-6 \
-H "x-api-key: $MUAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"images_list": ["https://example.com/portrait.png"], "audio_url": "https://example.com/speech.mp3", "resolution": "1080p", "prompt": "Speak warmly to the camera"}'
然后轮询 GET /api/v1/predictions/{{request_id}}/result,或传入 webhook 查询参数。