查询 Content Generation 视频任务
curl --request GET \
--url https://kaienapi.com/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kaienapi.com/api/v3/contents/generations/tasks/{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/api/v3/contents/generations/tasks/{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/api/v3/contents/generations/tasks/{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))
}{
"id": "<string>",
"kaien_task_id": "<string>",
"status": "<string>",
"content": {},
"error": {}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}查询 Content Generation 视频任务
查询通过 Content Generation 入口及已支持协议转换的渠道创建的视频任务。客户端应保存创建响应中的 id,按固定间隔查询,直到状态为 succeeded 或 failed。响应包含 Kaien 任务标识,便于与控制台及其他视频接口关联。
GET
/
api
/
v3
/
contents
/
generations
/
tasks
/
{task_id}
查询 Content Generation 视频任务
curl --request GET \
--url https://kaienapi.com/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kaienapi.com/api/v3/contents/generations/tasks/{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/api/v3/contents/generations/tasks/{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/api/v3/contents/generations/tasks/{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))
}{
"id": "<string>",
"kaien_task_id": "<string>",
"status": "<string>",
"content": {},
"error": {}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Authorizations
在请求头中传入:Authorization: Bearer sk-...
Path Parameters
创建任务响应中的官方任务 ID。