获取对口型视频详情
说明
获取对口型视频详情
QPS 10/s
请求地址
http
GET /open/v1/video_lip_sync/detailHeader
http
access_token: {{access_token}}参数说明
请求参数 Query Params
| key | 说明 |
|---|---|
| id | 视频id |
响应参数
| 字段 | 类型 | 二级字段 | 类型 | 说明 |
|---|---|---|---|---|
| trace_id | string | 链路追踪id | ||
| code | int | 响应状态码 | ||
| msg | string | 响应消息 | ||
| data | object | 数据 | ||
| id | string | 视频id | ||
| status | int | 任务状态。0-排队中、10-生成中、20-生成成功、30-生成失败 | ||
| progress | int | 任务进度0~100 | ||
| msg | string | 任务信息 | ||
| video_url | string | 视频地址 | ||
| preview_url | string | 封面地址 | ||
| duration | int | 视频时长(单位ms) | ||
| create_time | int | 创建时间(unix秒级时间戳) |
请求示例
http
GET /open/v1/video_lip_sync/detail?id=9499ed79995c4bdb95f0d66ca84419fd响应JOSN
json
{
"trace_id": "8d10659438827bd4d59eaa2696f9d391",
"code": 0,
"msg": "success",
"data": {
"id": "9499ed79995c4bdb95f0d66ca84419fd",
"status": 20,
"progress": 100,
"msg": "success",
"video_url": "https://res.chanjing.cc/xxx/lip-sync/9499ed79995c4bdb95f0d66ca84419fd.mp4",
"preview_url": "https://res.chanjing.cc/xxx/lip-sync/9499ed79995c4bdb95f0d66ca84419fd.jpg",
"create_time": 1738636800
}
}响应状态码说明
| code | 说明 |
|---|---|
| 0 | 响应成功 |
| 10400 | AccessToken验证失败 |
| 40000 | 参数错误 |
| 40001 | 超出QPS限制 |
| 50000 | 系统内部错误 |
示例代码
shell
curl -L 'https://open-api.chanjing.cc/open/v1/video_lip_sync/detail?id=9499ed79995c4bdb95f0d66ca84419fd' \
-H 'access_token: {{access_token}}'go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://open-api.chanjing.cc/open/v1/video_lip_sync/detail?id=9499ed79995c4bdb95f0d66ca84419fd"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
panic(err)
}
req.Header.Set("access_token", "{{access_token}}")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
b, _ := io.ReadAll(resp.Body)
fmt.Println(string(b))
}java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://open-api.chanjing.cc/open/v1/video_lip_sync/detail?id=9499ed79995c4bdb95f0d66ca84419fd")
.method("GET", body)
.addHeader("access_token", "{{access_token}}")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());py
import requests
url = "https://open-api.chanjing.cc/open/v1/video_lip_sync/detail?id=9499ed79995c4bdb95f0d66ca84419fd"
payload = {}
headers = {
'access_token': '{{access_token}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)