curl --request POST \
--url https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声",
"camera_fixed": false,
"draft": false,
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": true,
"last_frame": "https://example.com/last_frame.jpg",
"ratio": "adaptive",
"resolution": "720p",
"watermark": false
}
'import requests
url = "https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5"
payload = {
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声",
"camera_fixed": False,
"draft": False,
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": True,
"last_frame": "https://example.com/last_frame.jpg",
"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({
prompt: '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声',
camera_fixed: false,
draft: false,
duration: 5,
first_frame: 'https://example.com/first_frame.jpg',
generate_audio: true,
last_frame: 'https://example.com/last_frame.jpg',
ratio: 'adaptive',
resolution: '720p',
watermark: false
})
};
fetch('https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5', 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-pro-1.5",
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([
'prompt' => '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声',
'camera_fixed' => false,
'draft' => false,
'duration' => 5,
'first_frame' => 'https://example.com/first_frame.jpg',
'generate_audio' => true,
'last_frame' => 'https://example.com/last_frame.jpg',
'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-pro-1.5"
payload := strings.NewReader("{\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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-pro-1.5")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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-pro-1.5")
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 \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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 Pro 1.5 動画生成
火山エンジンの Seedance 1.5 Pro モデルを使用してビデオを生成し、テキストからビデオ、画像からビデオ(最初のフレーム/最初と最後のフレーム)、音声付きビデオ、サンプルモードをサポートします(非同期)
curl --request POST \
--url https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声",
"camera_fixed": false,
"draft": false,
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": true,
"last_frame": "https://example.com/last_frame.jpg",
"ratio": "adaptive",
"resolution": "720p",
"watermark": false
}
'import requests
url = "https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5"
payload = {
"prompt": "女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声",
"camera_fixed": False,
"draft": False,
"duration": 5,
"first_frame": "https://example.com/first_frame.jpg",
"generate_audio": True,
"last_frame": "https://example.com/last_frame.jpg",
"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({
prompt: '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声',
camera_fixed: false,
draft: false,
duration: 5,
first_frame: 'https://example.com/first_frame.jpg',
generate_audio: true,
last_frame: 'https://example.com/last_frame.jpg',
ratio: 'adaptive',
resolution: '720p',
watermark: false
})
};
fetch('https://api.sinancode.com/v1/generate/vol/seedance-pro-1.5', 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-pro-1.5",
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([
'prompt' => '女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声',
'camera_fixed' => false,
'draft' => false,
'duration' => 5,
'first_frame' => 'https://example.com/first_frame.jpg',
'generate_audio' => true,
'last_frame' => 'https://example.com/last_frame.jpg',
'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-pro-1.5"
payload := strings.NewReader("{\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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-pro-1.5")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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-pro-1.5")
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 \"prompt\": \"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声\",\n \"camera_fixed\": false,\n \"draft\": false,\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 \"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>"
}- マルチモード生成 - テキストから動画、画像から動画(先頭フレーム/キーフレーム)、リファレンスモードに対応
- ネイティブ音声生成 - 動画と同期した音声、効果音、BGM を生成(セリフ部分をダブルクォーテーションで囲むと最適化されます)
- ドラフトモード - より少ないトークンでプレビュー動画を素早く生成
- 柔軟な再生時間 - 4〜12秒、または
-1でモデルが自動決定 - HD解像度 - 480p、720p、1080p 出力に対応
承認
API Tokenを使用して認証を行ってください
ボディ
タスクパラメータ
プロンプト(必須、500文字以内を推奨)
1 - 2000"女孩抱着狐狸,女孩睁开眼,温柔地看向镜头,狐狸友善地抱着,镜头缓缓拉出,女孩的头发被风吹动,可以听到风声"
カメラを固定するかどうか(オプション、デフォルト false) 注意:画像参照動画生成モードではこのパラメータはサポートされていません
false
ドラフトモードかどうか(オプション、デフォルト false) Seedance 1.5 の特徴:プレビュー動画を高速生成し、消費 token が少ない 注意:Draft モードでは 480p 解像度を使用する必要があり、最終フレーム返却機能はサポートされていません
false
動画の長さ(オプション、デフォルト 5 秒) 範囲: 4-12 秒、または -1 を設定してモデルに長さを自動選択させる
-1 <= x <= 125
先頭フレーム画像 URL(オプション) 指定すると、画像参照動画生成-先頭フレームモードになります
"https://example.com/first_frame.jpg"
オーディオを生成するかどうか(オプション、デフォルト true) Seedance 1.5 の特徴:映像と同期した音声(人声、効果音、背景音楽)を生成 オーディオ生成効果を最適化するため、会話部分は二重引用符で囲むことを推奨します
true
最終フレーム画像 URL(オプション) first_frame と併用する必要があり、画像参照動画生成-先頭・最終フレームモードになります
"https://example.com/last_frame.jpg"
アスペクト比(オプション) テキストからの動画生成デフォルト: adaptive(自動調整) 画像からの動画生成デフォルト: adaptive(先頭フレーム画像に基づいて自動調整) 選択可能な値: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive "adaptive"
解像度(オプション、デフォルト 720p) 選択可能な値: 480p, 720p, 1080p 注意:Draft モードでは 480p のみ使用可能
480p, 720p, 1080p "720p"
ウォーターマークを追加するかどうか(オプション、デフォルト false)
false
レスポンス
成功
タスクID
"01234567-89ab-cdef-0123-456789abcdef"