查询 Kling 图生视频任务
curl --request GET \
--url https://kaienapi.com/kling/v1/videos/image2video/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kaienapi.com/kling/v1/videos/image2video/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://kaienapi.com/kling/v1/videos/image2video/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://kaienapi.com/kling/v1/videos/image2video/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}查询 Kling 图生视频任务
查询 Kling 图生视频任务的状态和结果。
查询顺序
先通过图生视频接口创建任务,再使用返回的 task_id 调用本接口。任务完成后,从响应中读取视频结果 URL、封面、状态或错误信息。
错误定位
- 任务不存在:确认任务 ID 与创建环境一致。
- 任务失败:检查参考图是否可访问,以及 prompt 是否符合模型要求。
- 结果为空:记录完整响应,按返回字段提取结果。
GET
/
kling
/
v1
/
videos
/
image2video
/
{task_id}
查询 Kling 图生视频任务
curl --request GET \
--url https://kaienapi.com/kling/v1/videos/image2video/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kaienapi.com/kling/v1/videos/image2video/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://kaienapi.com/kling/v1/videos/image2video/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://kaienapi.com/kling/v1/videos/image2video/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}