任务
查询任务
按批次任务 ID 或视频子项 UUID 返回任务状态和输出。id 与 uuid 必须且只能传入一个。
GET
/
openapi
/
v1
/
tasks
/
task-info
查询任务
curl --request GET \
--url https://api.neural4d.com/openapi/v1/tasks/task-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neural4d.com/openapi/v1/tasks/task-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neural4d.com/openapi/v1/tasks/task-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neural4d.com/openapi/v1/tasks/task-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.neural4d.com/openapi/v1/tasks/task-info")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neural4d.com/openapi/v1/tasks/task-info"
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))
}require 'uri'
require 'net/http'
url = URI("https://api.neural4d.com/openapi/v1/tasks/task-info")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neural4d.com/openapi/v1/tasks/task-info",
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;
}using RestSharp;
var options = new RestClientOptions("https://api.neural4d.com/openapi/v1/tasks/task-info");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d",
"status": "succeeded",
"mode": "first_frame_image_to_video",
"model": "bytedance/seedance-2.0-fast",
"created_at": 1784044800,
"updated_at": 1784044842,
"usage": {
"credits": 26
},
"output": {
"videos": [
{
"uuid": "7d1fa4bb-41e6-4a5d-88d8-1851f5342e87",
"url": "https://cdn.neural4d.com/results/video.mp4",
"format": "mp4",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"has_audio": true,
"mode": "first_frame_image_to_video",
"status": "succeeded",
"created_at": 1784044800,
"updated_at": 1784044842
}
]
}
}授权
使用 Bearer 方式发送的 Neural4D API 密钥。
查询参数
生成请求返回的批次任务 ID。与 uuid 二选一,不能同时传入。
示例:
"normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d"
生成响应返回的视频子项 UUID。与 id 二选一,不能同时传入。
示例:
"7d1fa4bb-41e6-4a5d-88d8-1851f5342e87"
响应
任务详情
生成请求返回的批次任务 ID。
示例:
"normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d"
标准化后的任务生命周期状态。
可用选项:
queued, processing, succeeded, failed Unix 时间戳(秒)。
当前子视频任务输出,包括仍在排队或处理中的条目。
Show child attributes
Show child attributes
任务使用的视频生成模式。
可用选项:
text_to_video, first_frame_image_to_video, first_last_frame_image_to_video, reference_to_video 任务使用的视频生成模型。
可用选项:
bytedance/seedance-2.0, bytedance/seedance-2.0-fast, google/veo-3.1, xai/grok-imagine Unix 时间戳(秒)。
可用时返回此任务扣除的点数。
Show child attributes
Show child attributes
任务失败时返回的错误详情。
Show child attributes
Show child attributes
⌘I
查询任务
curl --request GET \
--url https://api.neural4d.com/openapi/v1/tasks/task-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neural4d.com/openapi/v1/tasks/task-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neural4d.com/openapi/v1/tasks/task-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neural4d.com/openapi/v1/tasks/task-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.neural4d.com/openapi/v1/tasks/task-info")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neural4d.com/openapi/v1/tasks/task-info"
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))
}require 'uri'
require 'net/http'
url = URI("https://api.neural4d.com/openapi/v1/tasks/task-info")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neural4d.com/openapi/v1/tasks/task-info",
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;
}using RestSharp;
var options = new RestClientOptions("https://api.neural4d.com/openapi/v1/tasks/task-info");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d",
"status": "succeeded",
"mode": "first_frame_image_to_video",
"model": "bytedance/seedance-2.0-fast",
"created_at": 1784044800,
"updated_at": 1784044842,
"usage": {
"credits": 26
},
"output": {
"videos": [
{
"uuid": "7d1fa4bb-41e6-4a5d-88d8-1851f5342e87",
"url": "https://cdn.neural4d.com/results/video.mp4",
"format": "mp4",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"has_audio": true,
"mode": "first_frame_image_to_video",
"status": "succeeded",
"created_at": 1784044800,
"updated_at": 1784044842
}
]
}
}
