Get task
curl --request GET \
--url https://api.dreamto.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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.dreamto.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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.dreamto.ai/api/v3/contents/generations/tasks/{id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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;
}require 'uri'
require 'net/http'
url = URI("https://api.dreamto.ai/api/v3/contents/generations/tasks/{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_bodyusing RestSharp;
var options = new RestClientOptions("https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}");
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);
import Foundation
let url = URL(string: "https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}")
.get()
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute()false{
"id": "task_8c1d2e3f4a5b6c7d8e9f0a1b",
"model": "seedance-2.5-flash",
"status": "running",
"created_at": 1794384000,
"updated_at": 1794384004,
"request_id": "req_b2c4d6e8f0a1b3c5d7e9f1a2"
}Seedance 2.5 Flash
Get task
Returns the task status and result. A failed generation still returns HTTP 200 with status failed.
Suggested polling: every 3 s for the first 30 s, every 5 s up to 2 min, then every 10 s.
GET
/
api
/
v3
/
contents
/
generations
/
tasks
/
{id}
Get task
curl --request GET \
--url https://api.dreamto.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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.dreamto.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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.dreamto.ai/api/v3/contents/generations/tasks/{id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreamto.ai/api/v3/contents/generations/tasks/{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;
}require 'uri'
require 'net/http'
url = URI("https://api.dreamto.ai/api/v3/contents/generations/tasks/{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_bodyusing RestSharp;
var options = new RestClientOptions("https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}");
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);
import Foundation
let url = URL(string: "https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Authorization": "Bearer <token>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}")
.get()
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute()false{
"id": "task_8c1d2e3f4a5b6c7d8e9f0a1b",
"model": "seedance-2.5-flash",
"status": "running",
"created_at": 1794384000,
"updated_at": 1794384004,
"request_id": "req_b2c4d6e8f0a1b3c5d7e9f1a2"
}Authorizations
Path Parameters
Response
Success
Get-task response: the task object plus the request_id of this request.
Task status. Branch on it: keep polling on running, read content.video_url on succeeded, read error.message on failed.
Allowed values:
running: In progress (queued or generating); keep pollingsucceeded: Succeeded; readcontent.video_urlfailed: Failed; readerror.message
Available options:
running, succeeded, failed 
