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 動画生成モデル、テキストから動画、画像から動画(最初のフレーム/最初と最後のフレーム)、マルチモーダル参照から動画、音声付き動画をサポート(非同期)
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>"
}- 複数の生成モード - テキストから動画、画像から動画(最初のフレーム/最初と最後のフレーム)、マルチモーダル参照から動画をサポート
- 音声付き動画 - 内蔵音声生成をサポート
- Fast & Standard モード - 2.0 Fast(より高速で低コスト)と 2.0 Standard を選択可能
- 柔軟な長さ - 4〜15秒、または -1 でモデルに自動選択させる
承認
API Tokenを使用して認証を行ってください
ボディ
タスクパラメータ
参照画像 URL リスト(オプション、1-9枚、マルチモーダル参照から動画生成用) 注意:参照画像と最初/最後のフレームモードは排他的です
9動画の長さ(オプション、デフォルト 5 秒) 範囲: 4-15 秒、または -1 に設定してモデルに自動選択させる
-1 <= x <= 155
最初のフレーム画像 URL(オプション、画像から動画の最初のフレームモード用)
"https://example.com/first_frame.jpg"
音声を生成するかどうか(オプション、デフォルト true)
true
最後のフレーム画像 URL(オプション、first_frame と一緒に使用する必要があります)
"https://example.com/last_frame.jpg"
モデルバージョン(オプション、デフォルト fast) オプション: fast(2.0 Fast、より高速で低コスト), standard(2.0 Standard)
fast, standard "fast"
プロンプト(オプション、マルチモーダル参照モードでは省略可能)
2000"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头"
アスペクト比(オプション、デフォルト adaptive)
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive "adaptive"
解像度(オプション、デフォルト 720p) Seedance 2.0 は 1080p に対応していません
480p, 720p "720p"
ウォーターマークを追加するかどうか(オプション、デフォルト false)
false
レスポンス
OK
タスクID
"01234567-89ab-cdef-0123-456789abcdef"