查询:任务结果
数字人任务结果查询接口,用于获取指定任务的生成状态和输出信息。
概览
- 请求方法:
GET - 请求路径:
/avatar/task/{task_id} - 内容类型:
application/json - 分类:视频模型(Video)/数字人
认证方式
- Header:
Authorization: Bearer <token>
路径参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| task_id | string | 是 | 已生成视频的任务 ID |
请求示例
curl 示例
bash
curl -X GET "https://api.gpt.ge/avatar/task/your_task_id" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_TOKEN"JavaScript (fetch) 示例
javascript
fetch('https://api.gpt.ge/avatar/task/your_task_id', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(res => res.json())
.then(console.log)Python 示例(requests)
python
import requests
resp = requests.get(
'https://api.gpt.ge/avatar/task/your_task_id',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
}
)
print(resp.json())返回字段说明
| 字段 | 类型 | 描述 |
|---|---|---|
| id | string | 任务 ID |
| ext | object | 额外扩展信息 |
| ext.sing_title | string | 生成音频文件名 |
| ext.track_info | string | 轨道信息 |
| ext.animate_channel | string | 动画通道类型 |
| singer | string | 演唱者名称 |
| file_type | string | 文件类型 |
| work_name | string | 作品名称 |
| animate_id | string | 动画 ID |
| play_types | array[string] | 播放类型列表 |
| vip_enable | boolean | 是否 VIP 资源 |
| create_time | integer | 创建时间戳 |
| music_title | string | 音乐标题 |
| template_id | string | 模板 ID |
| user_image_url | string | 用户图片 URL |
| work_webp_path | string | WebP 作品地址 |
| web_work_status | integer | Web 工作状态 |
| work_video_path | string | 视频地址 |
| share_magic_text | string | 分享文案 |
| example_image_url | array[string] | 示例图片地址列表 |
| picture_path_list | array[string] | 图片路径列表 |
| primary_play_type | string | 主要播放类型 |
| tmp_online_enable | boolean | 是否上线 |
| webp_aspect_ratio | integer | WebP 宽高比 |
| animate_params_str | string | 动画参数字符串 |
| video_aspect_ratio | integer | 视频宽高比 |
| wm_work_video_path | string | 带水印视频地址 |
| template_create_time | integer | 模板创建时间戳 |
| no_wm_work_video_path | string | 无水印视频地址 |
返回示例(200)
json
{
"id": "67930a6f8d5ac20007a77b1c",
"ext": {
"sing_title": "1737689681056.mp3",
"track_info": "{}",
"animate_channel": "dynamic"
},
"singer": "DreamFace",
"file_type": "VIDEO",
"work_name": "1737689681056.mp3",
"animate_id": "264c5fb9449e4c31a7ea0f392696431b",
"play_types": [
"PT",
"",
"ANIMATE"
],
"vip_enable": false,
"create_time": 1737689710890,
"music_title": "Talking avatar",
"template_id": "655b213cccd1db0007e1d977",
"user_image_url": "",
"work_webp_path": "https://cdn.gptbest.vip/file/cdn/20250124/zQBRDI6pT3Bcxs5F9iShAWf05jio0F.jpg",
"web_work_status": 200,
"work_video_path": "https://cdn.gptbest.vip/file/cdn/20250124/hfulzDLGgiDg3EQsdYZse3em2f3peS.mp4",
"share_magic_text": "13.4K users shared moments",
"example_image_url": [
"config/common/main/bd15932c14584ec2bd39f8fb46da47c7.jpg",
"config/common/main/9ae535433a14496982017711be5a06ca.png",
"config/common/main/70d3629c39094b33ac0359f017f1a963.jpg",
"system/file/fdfs/c785a37a9bd64fe5b7bdefa9054cc8b6.png"
],
"picture_path_list": [],
"primary_play_type": "ANIMATE",
"tmp_online_enable": false,
"webp_aspect_ratio": 1,
"animate_params_str": "{\"pt_infos\":[{\"context\":null,\"audio_url\":\"server%2Faudio%2Fmain%2F6d4f9a63efb94760866f600117d147bd.mp3\",\"voice_engine_id\":null,\"audio_id\":null,\"video_url\":\"server%2Fcommon%2Fmain%2Fcb599ba5-61f1-4648-bfbb-1e06299da48d.mp4\",\"video_pattern_url\":null,\"lan\":null,\"character_id\":null,\"pag_img_urls\":null,\"video_img_urls\":null}]}",
"video_aspect_ratio": 1,
"wm_work_video_path": "https://cdn.gptbest.vip/file/cdn/20250124/hfulzDLGgiDg3EQsdYZse3em2f3peS.mp4",
"template_create_time": 1700471100257,
"no_wm_work_video_path": "https://cdn.gptbest.vip/file/cdn/20250124/hfulzDLGgiDg3EQsdYZse3em2f3peS.mp4"
}