查询视频任务状态
curl --request GET \
--url https://openapi.imini.ai/imini/router/v1/videos/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.imini.ai/imini/router/v1/videos/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://openapi.imini.ai/imini/router/v1/videos/tasks/{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://openapi.imini.ai/imini/router/v1/videos/tasks/{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://openapi.imini.ai/imini/router/v1/videos/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))
}HttpResponse<String> response = Unirest.get("https://openapi.imini.ai/imini/router/v1/videos/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.imini.ai/imini/router/v1/videos/tasks/{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{
"task_id": "task_2042864638838083584",
"status": "succeeded",
"model": "kling/kling-v3",
"created_at": "2026-04-11T07:17:39.146Z",
"completed_at": "2026-04-11T07:19:57.844Z",
"videos": [
{
"url": "https://file.iminicdn.com/file/2026/04/11/2042865212863942656.mp4",
"width": 1284,
"height": 716,
"duration": 5,
"cover_url": "https://file.iminicdn.com/file/2026/04/11/2042865212863942700.jpg"
}
],
"error": null,
"request_id": "req_abc123"
}视频模型 API
查询任务状态
查询异步视频生成任务的状态与结果
GET
/
v1
/
videos
/
tasks
/
{task_id}
查询视频任务状态
curl --request GET \
--url https://openapi.imini.ai/imini/router/v1/videos/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.imini.ai/imini/router/v1/videos/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://openapi.imini.ai/imini/router/v1/videos/tasks/{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://openapi.imini.ai/imini/router/v1/videos/tasks/{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://openapi.imini.ai/imini/router/v1/videos/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))
}HttpResponse<String> response = Unirest.get("https://openapi.imini.ai/imini/router/v1/videos/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.imini.ai/imini/router/v1/videos/tasks/{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{
"task_id": "task_2042864638838083584",
"status": "succeeded",
"model": "kling/kling-v3",
"created_at": "2026-04-11T07:17:39.146Z",
"completed_at": "2026-04-11T07:19:57.844Z",
"videos": [
{
"url": "https://file.iminicdn.com/file/2026/04/11/2042865212863942656.mp4",
"width": 1284,
"height": 716,
"duration": 5,
"cover_url": "https://file.iminicdn.com/file/2026/04/11/2042865212863942700.jpg"
}
],
"error": null,
"request_id": "req_abc123"
}授权
在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。前往 API Keys 管理页 创建和管理 API Key。
路径参数
任务唯一 ID,由视频生成接口返回。
示例:
"task_2042864638838083584"
响应
查询成功
任务唯一 ID
示例:
"task_2042864638838083584"
任务状态:
queued— 已提交,等待队列processing— 模型生成中succeeded— 生成成功failed— 生成失败,见error字段
可用选项:
queued, processing, succeeded, failed 示例:
"succeeded"
本次任务使用的模型 ID
示例:
"kling/kling-v3"
任务创建时间(ISO 8601)
示例:
"2026-04-11T07:17:39.146Z"
任务完成时间(ISO 8601),未完成时为 null
示例:
"2026-04-11T07:19:57.844Z"
生成结果列表,status 为 succeeded 时有值,否则为 null
Show child attributes
Show child attributes
错误信息,status 为 failed 时有值,否则为 null
Show child attributes
Show child attributes
请求唯一 ID
示例:
"req_abc123"
⌘I

