Create video task
curl --request POST \
--url https://api.outai.top/api/v1/video/seedance-2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance_2_0",
"prompt": "A futuristic city at sunset",
"function_mode": "omni_reference",
"ratio": "16:9",
"duration": 5,
"image_urls": [],
"audio_urls": [],
"video_urls": []
}
'import requests
url = "https://api.outai.top/api/v1/video/seedance-2"
payload = {
"model": "seedance_2_0",
"prompt": "A futuristic city at sunset",
"function_mode": "omni_reference",
"ratio": "16:9",
"duration": 5,
"image_urls": [],
"audio_urls": [],
"video_urls": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance_2_0',
prompt: 'A futuristic city at sunset',
function_mode: 'omni_reference',
ratio: '16:9',
duration: 5,
image_urls: [],
audio_urls: [],
video_urls: []
})
};
fetch('https://api.outai.top/api/v1/video/seedance-2', 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.outai.top/api/v1/video/seedance-2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'seedance_2_0',
'prompt' => 'A futuristic city at sunset',
'function_mode' => 'omni_reference',
'ratio' => '16:9',
'duration' => 5,
'image_urls' => [
],
'audio_urls' => [
],
'video_urls' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outai.top/api/v1/video/seedance-2"
payload := strings.NewReader("{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outai.top/api/v1/video/seedance-2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outai.top/api/v1/video/seedance-2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"trace_id": "45c30d76f06549b199a3775544523689",
"message": null,
"data": {
"task_id": "task_id",
"status": "running",
"created_at": "2023-11-07T05:31:56Z",
"credits_cost": 12
}
}API Reference
Create video task
Creates an asynchronous Seedance 2.0 video generation task.
POST
/
v1
/
video
/
seedance-2
Create video task
curl --request POST \
--url https://api.outai.top/api/v1/video/seedance-2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance_2_0",
"prompt": "A futuristic city at sunset",
"function_mode": "omni_reference",
"ratio": "16:9",
"duration": 5,
"image_urls": [],
"audio_urls": [],
"video_urls": []
}
'import requests
url = "https://api.outai.top/api/v1/video/seedance-2"
payload = {
"model": "seedance_2_0",
"prompt": "A futuristic city at sunset",
"function_mode": "omni_reference",
"ratio": "16:9",
"duration": 5,
"image_urls": [],
"audio_urls": [],
"video_urls": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance_2_0',
prompt: 'A futuristic city at sunset',
function_mode: 'omni_reference',
ratio: '16:9',
duration: 5,
image_urls: [],
audio_urls: [],
video_urls: []
})
};
fetch('https://api.outai.top/api/v1/video/seedance-2', 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.outai.top/api/v1/video/seedance-2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'seedance_2_0',
'prompt' => 'A futuristic city at sunset',
'function_mode' => 'omni_reference',
'ratio' => '16:9',
'duration' => 5,
'image_urls' => [
],
'audio_urls' => [
],
'video_urls' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outai.top/api/v1/video/seedance-2"
payload := strings.NewReader("{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outai.top/api/v1/video/seedance-2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outai.top/api/v1/video/seedance-2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedance_2_0\",\n \"prompt\": \"A futuristic city at sunset\",\n \"function_mode\": \"omni_reference\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"image_urls\": [],\n \"audio_urls\": [],\n \"video_urls\": []\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"trace_id": "45c30d76f06549b199a3775544523689",
"message": null,
"data": {
"task_id": "task_id",
"status": "running",
"created_at": "2023-11-07T05:31:56Z",
"credits_cost": 12
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Validation notes: prompt is required; model, ratio, and function_mode must use supported values; duration must be between 4 and 15; when function_mode=first_last_frames, at most 2 images are allowed; when function_mode=omni_reference, audio-only input is not allowed, so if audio_urls is provided, include at least one image or video.
Text prompt for video generation.
Available options:
seedance_2_0, seedance_2_0_fast Available options:
first_last_frames, omni_reference Available options:
21:9, 16:9, 4:3, 1:1, 3:4, 9:16 Required range:
4 <= x <= 15Maximum array length:
9Maximum array length:
3Maximum array length:
3⌘I