根据各个算法创建任务后,获取到的task_id 来获取结果
接口地址
https://open-api.wondershare.cc/v1/open/pub/task
请求方式
POST
获取结果请求示例
curl -X POST 'https://open-api.wondershare.cc/v1/open/pub/task' \
--header 'Content-Type: application/json' \
--header 'X-App-Key: {app-key}' \
--header 'Authorization: Basic {access_token}' \
--data '{
"task_id": "tm_text2video_customize-0-2025080109295bd73652d4"
}'
返回结果数据
|
名称 |
类型 |
是否必须 |
默认值 |
备注 |
|
code |
number |
必须 |
|
即Task结构体中的ErrCode字段,0-成功,非0-失败,非0错误统一以68开头,6位数字,例如680001 |
|
msg |
string |
必须 |
|
信息 |
|
data |
object |
必须 |
|
数据 |
|
├─ task_id |
string |
必须 |
|
任务id |
|
├─ wsid |
number |
非必须 |
|
|
|
├─priority |
number |
非必须 |
|
|
|
├─ status |
number |
必须 |
|
状态: 1-排队中(待处理/未处理) 2-处理中 3-处理成功 4-处理失败 5-已关闭(已取消) 6-已超时 |
|
├─reason |
string |
非必须 |
|
status对应的原因 |
|
├─process |
number |
非必须 |
|
进度 |
|
├─ position |
number |
非必须 |
|
|
|
├─wait_time |
number |
非必须 |
|
|
|
├─params |
string |
非必须 |
|
|
|
├─ result |
string |
必须 |
|
任务执行结果,JSON字符串 |
返回结果示例
{
"code": 0,
"msg": "success",
"data": {
"task_id": "tm_text2video_customize-0-2025080109295bd73652d4",
"wsid": 123,
"priority": 0,
"status": 3,
"reason": "success",
"progress": 100,
"position": -1,
"wait_time": 96,
"delay": false,
"params": "",
"result": "{\"model_version\":\"L0-15899\",\"translate_prompt\":\"跳舞\",\"video_path\":[\"http://tic-ai-storage.wondershare.com/aicloudtmp%2F433223946%2F3%2F202508%2F1%2Ftm_vsr-20250808150129-2614613-44094-dwt.mp4?Expires=1754809290\&OSSAccessKeyId=LTAI5tFi5sAjeq28CgJWweCQ\&Signature=keG7bxVrOAYw19lfgWrO7JxpTBI%3F\"]}"
}
}