curl --request POST \
--url https://api.sinancode.com/v1/generate/vol/seedance-2.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_images": [
"<string>"
],
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": true,
"last_frame": "https://example.com/last_frame.jpg",
"model": "fast",
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头",
"ratio": "adaptive",
"resolution": "720p",
"watermark": false
}
'import requests
url = "https://api.sinancode.com/v1/generate/vol/seedance-2.0"
payload = {
"reference_images": ["<string>"],
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": True,
"last_frame": "https://example.com/last_frame.jpg",
"model": "fast",
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头",
"ratio": "adaptive",
"resolution": "720p",
"watermark": False
}
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({
reference_images: ['<string>'],
duration: 5,
first_frame: 'https://example.com/first_frame.jpg',
generate_audio: true,
last_frame: 'https://example.com/last_frame.jpg',
model: 'fast',
prompt: '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头',
ratio: 'adaptive',
resolution: '720p',
watermark: false
})
};
fetch('https://api.sinancode.com/v1/generate/vol/seedance-2.0', 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.sinancode.com/v1/generate/vol/seedance-2.0",
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([
'reference_images' => [
'<string>'
],
'duration' => 5,
'first_frame' => 'https://example.com/first_frame.jpg',
'generate_audio' => true,
'last_frame' => 'https://example.com/last_frame.jpg',
'model' => 'fast',
'prompt' => '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头',
'ratio' => 'adaptive',
'resolution' => '720p',
'watermark' => false
]),
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.sinancode.com/v1/generate/vol/seedance-2.0"
payload := strings.NewReader("{\n \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\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.sinancode.com/v1/generate/vol/seedance-2.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/vol/seedance-2.0")
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 \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}Seedance 2.0
ByteDance Seedance 2.0 video generation model, supports text-to-video, image-to-video (first frame / first & last frame), multimodal reference-to-video, and audio generation (async)
curl --request POST \
--url https://api.sinancode.com/v1/generate/vol/seedance-2.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_images": [
"<string>"
],
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": true,
"last_frame": "https://example.com/last_frame.jpg",
"model": "fast",
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头",
"ratio": "adaptive",
"resolution": "720p",
"watermark": false
}
'import requests
url = "https://api.sinancode.com/v1/generate/vol/seedance-2.0"
payload = {
"reference_images": ["<string>"],
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": True,
"last_frame": "https://example.com/last_frame.jpg",
"model": "fast",
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头",
"ratio": "adaptive",
"resolution": "720p",
"watermark": False
}
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({
reference_images: ['<string>'],
duration: 5,
first_frame: 'https://example.com/first_frame.jpg',
generate_audio: true,
last_frame: 'https://example.com/last_frame.jpg',
model: 'fast',
prompt: '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头',
ratio: 'adaptive',
resolution: '720p',
watermark: false
})
};
fetch('https://api.sinancode.com/v1/generate/vol/seedance-2.0', 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.sinancode.com/v1/generate/vol/seedance-2.0",
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([
'reference_images' => [
'<string>'
],
'duration' => 5,
'first_frame' => 'https://example.com/first_frame.jpg',
'generate_audio' => true,
'last_frame' => 'https://example.com/last_frame.jpg',
'model' => 'fast',
'prompt' => '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头',
'ratio' => 'adaptive',
'resolution' => '720p',
'watermark' => false
]),
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.sinancode.com/v1/generate/vol/seedance-2.0"
payload := strings.NewReader("{\n \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\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.sinancode.com/v1/generate/vol/seedance-2.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/vol/seedance-2.0")
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 \"reference_images\": [\n \"<string>\"\n ],\n \"duration\": 5,\n \"first_frame\": \"https://example.com/first_frame.jpg\",\n \"generate_audio\": true,\n \"last_frame\": \"https://example.com/last_frame.jpg\",\n \"model\": \"fast\",\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头\",\n \"ratio\": \"adaptive\",\n \"resolution\": \"720p\",\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}- Multiple Generation Modes - Text-to-video, image-to-video (first frame / first+last frame), and multi-modal reference-to-video
- Audio Generation - Built-in audio generation support
- Fast & Standard Modes - Choose between 2.0 Fast (faster, cheaper) and 2.0 Standard
- Flexible Duration - 4-15 seconds, or let the model decide automatically
Authorizations
Please use your API Token for authentication
Body
Task parameters
Reference image URL list (optional, 1-9 images, for multimodal reference-to-video) Note: reference images and first/last frame modes are mutually exclusive
9Video duration (optional, default 5 seconds) Range: 4-15 seconds, or set to -1 for automatic selection
-1 <= x <= 155
First frame image URL (optional, for image-to-video first frame mode)
"https://example.com/first_frame.jpg"
Whether to generate audio (optional, default true)
true
Last frame image URL (optional, must be used together with first_frame)
"https://example.com/last_frame.jpg"
Model version (optional, default fast) Options: fast (2.0 Fast, faster and cheaper), standard (2.0 Standard)
fast, standard "fast"
Prompt (optional, can be omitted for multimodal reference mode)
2000"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头"
Aspect ratio (optional, default adaptive)
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive "adaptive"
Resolution (optional, default 720p) Seedance 2.0 does not support 1080p
480p, 720p "720p"
Whether to add watermark (optional, default false)
false
Response
OK
Task ID
"01234567-89ab-cdef-0123-456789abcdef"