Seedance 2.5 API
ByteDance の動画生成モデル Seedance 2.5 の完全な API リファレンスです。
モデルバリエーション {#}
この API は、3 つのモデルバリエーションをサポートしています。
クイック比較
対応アスペクト比
Text-to-Video と Reference-to-Video は、以下をサポートしています。
21:9, 16:9, 9:16, 1:1, 4:3, 3:4
Image-to-Video は aspect_ratio パラメータをサポートしていません。
解像度オプション
Seedance 2.5 Text to Video
エンドポイント
POST /api/v1/video/task
リクエストパラメータ
必須
任意
リクエスト例
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'seedance-v2.5-text-to-video',
prompt: 'A golden retriever running through a sunlit meadow',
resolution: '720p',
duration: 8,
aspect_ratio: '16:9',
sound: true
})
});
const { data } = await response.json();
const taskId = data.task_id;
Seedance 2.5 Image to Video
リクエストパラメータ
必須
任意
Image-to-Video リクエストに aspect_ratio を含めないでください。このモデルは、そのパラメータをサポートしていません。
リクエスト例
{
model_name: 'seedance-v2.5-image-to-video',
image_url: 'https://example.com/first-frame.jpg',
image_end_url: 'https://example.com/last-frame.jpg',
prompt: 'Camera slowly pulls back to reveal the full landscape',
resolution: '720p',
duration: 8,
sound: true
}
Seedance 2.5 Reference to Video
リクエストパラメータ
必須
参照メディア
@(AT)参照プレースホルダー
@(AT)参照機能は、番号付きの <<<...>>> プレースホルダーを通じて参照メディアをプロンプトに関連付けます。番号はメディアタイプごとに個別に 1 から始まり、対応する配列の順序に従います。
たとえば、1 枚目の画像がキャラクターの参照、2 枚目がシーンの参照である場合、prompt 内でキャラクターには <<<image_1>>>、シーンには <<<image_2>>> を使用します。各プレースホルダーは、対応する配列に存在する項目を指す必要があります。
任意
リクエスト例
{
model_name: 'seedance-v2.5-reference-to-video',
prompt: 'Use image one for the subject, video one for the movement, and audio one for the atmosphere',
resolution: '720p',
duration: 8,
aspect_ratio: '16:9',
sound: true,
images: ['https://example.com/subject-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4'],
audios: ['https://example.com/atmosphere-reference.mp3']
}
@(AT)Reference-to-Video リクエスト例
{
model_name: 'seedance-v2.5-reference-to-video',
prompt: 'Place the explorer from <<<image_1>>> in the environment from <<<image_2>>>, following the camera movement in <<<video_1>>> and speaking with the reference voice from <<<audio_1>>>',
resolution: '720p',
duration: 10,
aspect_ratio: '16:9',
sound: true,
images: [
'https://example.com/explorer-reference.jpg',
'https://example.com/environment-reference.png'
],
videos: ['https://example.com/camera-movement-reference.mp4'],
audios: ['https://example.com/voice-reference.mp3']
}
レスポンス形式
初期レスポンス
すべてのモデルは、ポーリング用の task_id を返します。
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
ポーリングレスポンス
GET /api/v1/video/{taskId} をポーリングしてステータスを確認します。
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
ステータス値
submitted:タスクが受け付けられ、処理待ちです
processing:動画を生成中です
succeed:動画生成が完了しました
failed:動画生成に失敗しました
処理時間
処理時間は、動画の長さ、解像度、現在のキューの状況によって異なります。
5~10 秒ごとにポーリングしてステータスを確認してください。
ベストプラクティス
- 必須パラメータ:
resolution と duration は必ず指定し、Text-to-Video と Reference-to-Video では aspect_ratio も指定してください
- Image-to-Video の比率:Image-to-Video リクエストでは
aspect_ratio を送信しないでください
- 参照動画:Reference-to-Video には 1 本以上の動画が必要です。各動画および動画の合計時間は、記載された制限内に収めてください
- 参照画像:参照動画を指定している場合、画像は任意です。使用する場合は、対応形式の画像 URL を 1~30 件送信してください
- 参照音声:各音声クリップは 2~30 秒かつ 15 MB 以下、合計時間は 30 秒以内にしてください
- 参照順序:
images、videos、audios を意図した順序に保ち、プロンプト内でも一貫して参照してください
- 音声:デフォルト値の
true を使用する場合は sound を省略し、生成音声を無効にする場合は false に設定してください