查询任务
curl --request GET \
--url https://ai.alad.com/kling/v1/videos/{action}/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.alad.com/kling/v1/videos/{action}/{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://ai.alad.com/kling/v1/videos/{action}/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ai.alad.com/kling/v1/videos/{action}/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ai.alad.com/kling/v1/videos/{action}/{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))
}HttpResponse<String> response = Unirest.get("https://ai.alad.com/kling/v1/videos/{action}/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.alad.com/kling/v1/videos/{action}/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "860260753860210752",
"action": "/kling/v1/videos/omni-video_POST",
"status": "SUCCESS",
"fail_reason": "<string>",
"submit_time": 1773130665,
"start_time": 1773130715,
"finish_time": 1773130790,
"progress": "100%",
"data": {
"code": 0,
"message": "SUCCEED",
"request_id": "7e91db5f-66d3-4df4-b7e5-c2ab89df1959",
"data": {
"created_at": 123,
"task_id": "<string>",
"task_status": "succeed",
"updated_at": 123,
"task_result": {
"videos": [
{
"id": "860260754053148756",
"url": "<string>",
"duration": "5.041"
}
]
}
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Kuaishou
kling-task-query
查询可灵生成任务的状态和结果。使用创建任务接口返回的 task_id。
GET
/
kling
/
v1
/
videos
/
{action}
/
{task_id}
查询任务
curl --request GET \
--url https://ai.alad.com/kling/v1/videos/{action}/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.alad.com/kling/v1/videos/{action}/{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://ai.alad.com/kling/v1/videos/{action}/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ai.alad.com/kling/v1/videos/{action}/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ai.alad.com/kling/v1/videos/{action}/{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))
}HttpResponse<String> response = Unirest.get("https://ai.alad.com/kling/v1/videos/{action}/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.alad.com/kling/v1/videos/{action}/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "860260753860210752",
"action": "/kling/v1/videos/omni-video_POST",
"status": "SUCCESS",
"fail_reason": "<string>",
"submit_time": 1773130665,
"start_time": 1773130715,
"finish_time": 1773130790,
"progress": "100%",
"data": {
"code": 0,
"message": "SUCCEED",
"request_id": "7e91db5f-66d3-4df4-b7e5-c2ab89df1959",
"data": {
"created_at": 123,
"task_id": "<string>",
"task_status": "succeed",
"updated_at": 123,
"task_result": {
"videos": [
{
"id": "860260754053148756",
"url": "<string>",
"duration": "5.041"
}
]
}
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
任务类型,与创建任务时的端点对应。
可用选项:
generations, text2video, image2video, lip-sync, kolors-virtual-try-on 示例:
"text2video"
创建任务接口返回的任务 ID。
示例:
"860260753860210752"
⌘I

