# 灵动人像 LivePortrait

通过 post 请求，可基于人物肖像图片和人声音频文件，快速、轻量地生成人物肖像动态视频。与悦动人像EMO模型相比，生成速度快、价格低，但是生成效果不如悦动人像EMO模型。

```
curl --location '{{BASE_URL}}/qwen/api/v1/services/aigc/image2video/video-synthesis/'
--header 'X-DashScope-Async: enable'
--header 'Authorization: Bearer <YOUR_API_KEY>'
--header 'Content-Type: application/json'
--data '{
"model": "liveportrait",
"input": {
"image_url": "http://xxx/1.jpg",
"audio_url": "http://xxx/1.wav"
},
"parameters": {
"template_id": "normal",
"eye_move_freq": 0.5,
"video_fps":30,
"mouth_move_strength":1,
"paste_back": true,
"head_move_strength":0.7
}
}'
```

成功响应

```
{
"output": {
"task_id": "a8532587-fa8c-4ef8-82be-0c46b17950d1",
"task_status": "PENDING"
}
"request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}
```

可通过get 请求获取结果

```
curl -X GET
--header 'Authorization: Bearer <YOUR_API_KEY>'
{{BASE_URL}}/qwen/api/v1/tasks/<YOUR_TASK_ID>
```

成功执行完毕返回

```
{
"request_id":"7574ee8f-38a3-4b1e-9280-11c33ab46e51",
"output":{
"task_id":"a8532587-fa8c-4ef8-82be-0c46b17950d1",
"task_status":"SUCCEEDED",
"results":{
"video_url":"https://xxx/1.mp4"
}
},
"usage":{
"video_duration": 10.23,
"video_ratio": "standard"
}
}
```

可用模型

| 模型名称 | 说明 | 单价 |
| --- | --- | --- |
| liveportrait-detect | 检测输入的图片是否符合要求 | 0.004元/张 |
| liveportrait | 生成人物肖像动态视频 | 0.02元/秒 |
