curl --request GET \
--url https://api.aiid.edu.kg/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/api/v3/contents/generations/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/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: Required. Primary description for video generation.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.
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.
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.aiid.edu.kg/api/v3/contents/generations/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/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.aiid.edu.kg/api/v3/contents/generations/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/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
Use Bearer Token authentication.
Format: Authorization: Bearer sk-xxxxxx
Path Parameters
Task ID
Response
Query successful
Task ID.
Task status.
queued, running, succeeded, failed Creation time (Unix seconds).
