curl --request GET \
--url https://api.newapi.si/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newapi.si/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://api.newapi.si/api/v3/contents/generations/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://api.newapi.si/api/v3/contents/generations/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://api.newapi.si/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))
}HttpResponse<String> response = Unirest.get("https://api.newapi.si/api/v3/contents/generations/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newapi.si/api/v3/contents/generations/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{
"id": "<string>",
"model": "<string>",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": 123,
"updated_at": 123,
"content": {
"video_url": "<string>",
"last_frame_url": "<string>"
},
"usage": {
"completion_tokens": 123,
"total_tokens": 123
},
"items": "<string>"
}Query task (Seedance)
This series supports OpenAI video generation formats (see the link Video generation Sora compatible formats).
Used to create video generation tasks and query status and results via task ID.
Core fields for task creation:
model: Required. Model name.prompt: Optional; if not provided,contentmust include a non-empty text item.content: Optional, the Volcano Ark content array, mixing text, image, video, and audio materials.function_mode: Optional. Commonly used for advanced modes such as Omni-Reference.
Compatible input parameters:
The following fields are mainly used for compatibility with legacy clients and older protocols. For new integrations, please use the standard format in the “Request Example” on this page whenever possible: use the content array for text and reference materials, and use top-level duration, ratio, resolution, fps, and other fields for generation configuration.
mode:t2v / i2v / i2v_first_last / reference_images / reference_materialimage_url / image_urls / input_referenceend_image_url / last_image_urlvideo_urls / audio_urlsseconds / durationaspect_ratio / ratio / sizequality / resolutionfpsgenerate_audio / watermark
Call details:
- When using
mode=reference_materialorfunction_mode=omni_reference, it is recommended to pass text and reference materials viacontent. contenttext items are written as{ "type": "text", "text": "测试文字" }.contentimage, video, and audio material items use theimage_url,video_url, andaudio_urlobject formats respectively, for example{ "type": "image_url", "image_url": { "url": "https://example.com/ref.png" }, "role": "reference_image", "name": "1" }.rolecan be used to identify the purpose of the material, andnamecan be referenced by name in prompts.ratio,duration,resolution, andfpswill affect the final generation configuration.
Seedance 2.5 Mixed image, video, and audio reference example (the asset URLs are placeholders; replace them with actual accessible links when calling):
{
"model": "sd-2-5",
"ratio": "9:16",
"fps": 24,
"duration": 10,
"content": [
{
"type": "text",
"text": "使用 @图片1 @图片2 @图片3 @音频1 参考@视频1 生成视频"
},
{
"type": "image_url",
"image_url": {
"url": "https://demo1.png"
},
"role": "reference_image",
"name": "图片1"
},
{
"type": "image_url",
"image_url": {
"url": "https://demo2.png"
},
"role": "reference_image",
"name": "图片2"
},
{
"type": "image_url",
"image_url": {
"url": "https://demo3.png"
},
"role": "reference_image",
"name": "图片3"
},
{
"type": "video_url",
"video_url": {
"url": "https://video.mp4"
},
"role": "reference_video",
"name": "视频1"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://audio.mp3"
},
"role": "reference_audio",
"name": "音频1"
}
]
}
Gemini Omni invocation:
gemini-omnican also be invoked through this Seedance task API.mode=t2vis used for text-to-video,mode=r2vfor generation with reference images/reference materials, andmode=editfor video editing.- Text can be placed in the
textitem ofpromptorcontent; images can be placed inimage_url / image_urls / reference_images / input_reference / content; videos can be placed invideo_urls / content. - The duration field can use
durationorseconds, and will be automatically mapped to the 4 / 6 / 8 / 10 second options.
MiniMax / Hailuo Invocation:
minimax-h3can be invoked through this task API and supports text-to-video, image reference, and audio reference; text can be placed in thepromptorcontenttext fields, and assets can be placed in fields such ascontent,image_urls, andaudio_urls.hailuo-2.3can be invoked through this task API. A first-frame image is required. It is recommended to pass theimage_urlitem ofrole=first_frameincontent.minimax-h3commonly usesduration=5~15andresolution=1440p;hailuo-2.3commonly usesduration=6or10andresolution=768p.
Kling 4.0 requests: kling-4.0 (720p) and kling-4.0-1080p both support the Seedance content/duration/resolution/ratio/mode format, contents/settings/options, and the OpenAI video format; the two unified video endpoints can reuse the same request body. The resolution must match the model name. Kling 4.0 can use either the Seedance format with content/duration/resolution/ratio/mode, or the OpenAI video format with prompt/seconds/size/input_reference; neither requires additional contents/settings/options. The mode can be t2v (text only), i2v (single first frame), i2v_first_last (first and last frames), reference_images (standard reference images), or reference_material (all-purpose reference materials; audio requires a route that supports this capability). If mode is omitted and no explicit tool is specified, reference_material is used by default when reference materials are provided; otherwise, t2v is used. Reference modes treat inputs as standard reference images and do not silently reinterpret explicitly provided first and last frames as reference images. For first and last frames, explicitly select i2v or i2v_first_last and omit the aspect ratio parameter. Kling 4.0 generates audio and video together by default. All-purpose reference mode supports public audio URLs: use audio_urls with /v1/videos, and the audio_url item in content with Seedance; a route that supports audio materials is required. The three native dedicated endpoints currently do not accept reference audio fields.
Vidu Q4: vidu-q4 is fixed at 720p, and vidu-q4-540p is fixed at 540p. Supports generating videos from 3 to 16 seconds. At least 1 image is required, with up to 15 reference images supported. Reference generation can include up to 3 MP3 audio clips, each 3 to 12 seconds long and up to 50 MB. Pure text-to-video, specified first and last frames, and reference videos are not supported. Multiple images are used as joint references and do not indicate first or last frame positions. Tasks can be created via POST /v1/videos, POST /api/v3/contents/generations/tasks, or the Vidu formats POST /ent/v2/img2video and POST /ent/v2/reference2video. For the unified endpoint, mode=reference_images is recommended; use mode=reference_material when including audio. Reference audio can use audio_urls. The Seedance format can also use the audio_url field of the standard content; the audio Boolean field controls audio generation and is used separately from the reference audio URL list. The resolution must match the model name.
Magi-2 1080p
magi-2-1080p supports both the OpenAI /v1/videos and Ark /api/v3/contents/generations/tasks formats. Query each format using the corresponding path’s GET /{task_id}. Resolution is fixed at 1080p, with a generation duration of 4–30 seconds. Supported aspect ratios are 16:9, 9:16, 1:1, 4:3, 3:4, and 21:9; 1:1 output is 1440×1440. Reference mode supports up to 10 images, 5 video clips, and 5 audio clips, for a total of 20 assets. Each video and audio clip must be 2–30 seconds long. The combined duration of all videos must not exceed 30 seconds, and the combined duration of all audio must not exceed 30 seconds. The size limit is 30 MB for images, 200 MB for videos, and 15 MB for audio. First-and-last-frame mode cannot be combined with other image, video, or audio references. Prompts can use <<<image_1>>>, <<<video_1>>>, and <<<audio_1>>> to reference assets in the order they were provided for each type. There is currently no separate entry point for the official sand.ai format.
{
"model": "magi-2-1080p",
"duration": 4,
"resolution": "1080p",
"ratio": "1:1",
"content": [
{
"type": "text",
"text": "以 <<<image_1>>> 的彩色积木为主体,参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/blocks.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/rotation.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/rhythm.wav"
},
"role": "reference_audio"
}
]
}
Key fields in query results:
items[].statusitems[].content.video_urloritems[].video_urlitems[].erroritems[].progress
Error fields: error.code, error.message.
{
"error": {
"code": "invalid_request_error",
"message": "requires at least one image in `images`"
}
}
curl --request GET \
--url https://api.newapi.si/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newapi.si/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://api.newapi.si/api/v3/contents/generations/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://api.newapi.si/api/v3/contents/generations/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://api.newapi.si/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))
}HttpResponse<String> response = Unirest.get("https://api.newapi.si/api/v3/contents/generations/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newapi.si/api/v3/contents/generations/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{
"id": "<string>",
"model": "<string>",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": 123,
"updated_at": 123,
"content": {
"video_url": "<string>",
"last_frame_url": "<string>"
},
"usage": {
"completion_tokens": 123,
"total_tokens": 123
},
"items": "<string>"
}Authorizations
Response
Query successful
