使用 Seedance 2.0 Reference API 创建参考引导视频。可使用视频参考、真实人物支持、灵活比例和稳定输出,让动作、镜头和风格方向更容易控制。 适合需要参考动作、人物表现或画面节奏的短视频与广告素材。
ByteDance Seedance V2.0 参考生视频 API 在 Best Image AI 上为开发者和创意 团队提供参考引导的视频生成。当前 API 集成接受文本提示词和至少一张参考图像或一个参考视频,还可 选择添加其他图像、视频和音频参考。它支持可配置的时长、多种宽高比、 多个分辨率档位,以及适用于可控视频工作流的可选生成声音设置。
注意 至少需要一张参考图像或一个参考视频;不能将音频单独用作唯一的参考输入。 请确保您的提示词和参考媒体符合 ByteDance 的内容安全准则。
Seedance V2.0 参考生视频与 Seedance V2.0 文生视频 Seedance V2.0 文生视频根据文本 提示词运行。参考生视频增加了受支持的图像、视频和可选音频输入,以及在提示词中提及媒体的功能。
Seedance V2.0 参考生视频与 Seedance V2.0 Fast 参考生视频 两个版本提供相同的 参考媒体类型和 Best Image AI 核心控制项。标准版本增加了 1080p 和 4K 分辨率选项,而 Fast 版本专注于 480p 和 720p 工作流。
Seedance V2.0 参考生视频与 Wan 2.7 参考生视频 两种 API 都接受图像和视频参考。Wan 2.7 还提供负面提示词和种子控制,而 Seedance V2.0 支持多个可选的音频 参考和生成声音开关。
Seedance V2.0 参考生视频与 Vidu Q3 参考生视频 在当前 Best Image AI 配置中, Vidu Q3 参考生视频使用图像参考。Seedance V2.0 还接受参考视频和可选的参考音频。
Seedance V2.0 参考生视频与 Runway 视频工具 Runway 提供更广泛的交互式创作套件。 Seedance V2.0 参考生视频围绕提示词、受支持的参考素材上传、输出 设置和生成声音,提供专注的 API 工作流。
// Step 1: Submit generation request
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model_name: 'seedance-v2.0-reference-to-video',
prompt: 'Use image one for the subject, video one for the movement, and audio one for the atmosphere',
resolution: '1080p',
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']
})
});
const { data } = await response.json();
const taskId = data.task_id;
// Use the @ (AT) reference feature in prompt through <<<...>>> placeholders.
// Placeholder numbering is 1-based for each media array:
// <<<image_1>>> = images[0], <<<image_2>>> = images[1]
// <<<video_1>>> = videos[0], <<<audio_1>>> = audios[0]
const mediaReferenceResponse = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model_name: 'seedance-v2.0-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: '1080p',
duration: 10,
aspect_ratio: '16:9',
sound: true,
images: [
'https://example.com/explorer-reference.jpg',
'https://example.com/environment-reference.jpg'
],
videos: ['https://example.com/camera-movement-reference.mp4'],
audios: ['https://example.com/voice-reference.mp3']
})
});
const { data: mediaReferenceData } = await mediaReferenceResponse.json();
const mediaReferenceTaskId = mediaReferenceData.task_id;
// Step 2: Poll for results
const taskId = data.task_id;
const pollResult = async (taskId) => {
const res = await fetch(`https://api.flaq.ai/api/v1/video/${taskId}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
return res.json();
};
while (true) {
const pollResultData = await pollResult(taskId);
const status = pollResultData.data.task_status;
if (status === 'succeed') {
console.log(pollResultData.data.task_result.videos[].);
;
}
(status === ) {
.(pollResultData..);
;
}
( (resolve, ));
}
# Step 1: Submit generation request
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/video/task',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'model_name': ,
: ,
: ,
: ,
: ,
: ,
: [],
: [],
: []
}
)
result = response.json()
task_id = result[][]
media_reference_response = requests.post(
,
headers={
: ,
:
},
json={
: ,
: ,
: ,
: ,
: ,
: ,
: [
,
],
: [],
: []
}
)
media_reference_result = media_reference_response.json()
media_reference_task_id = media_reference_result[][]
# Step 1: Submit generation request
curl -X POST https://api.flaq.ai/api/v1/video/task \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "seedance-v2.0-reference-to-video",
"prompt": "Use image one for the subject, video one for the movement, and audio one for the atmosphere",
"resolution": "1080p",
"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"]
}'
# Use the @ (AT) reference feature in prompt through <<<...>>> placeholders.
# Placeholder numbering is 1-based for each media array:
curl -X POST https://api.flaq.ai/api/v1/video/task \
-H \
-H \
-d
# Step 2: Poll for results
task_id = response.json()['data']['task_id']
poll_url = f"https://api.flaq.ai/api/v1/video/{task_id}"
while True:
poll_result = requests.get(poll_url, headers={'Authorization': 'Bearer YOUR_API_KEY'}).json()
status = poll_result['data']['task_status']
if status == 'succeed':
print(poll_result['data']['task_result']['videos'][0]['url'])
break
if status == 'failed':
print(poll_result['data']['task_status_msg'])
break
time.sleep(10)
# Step 2: Poll for results
# Replace {task_id} with the task_id returned from the submit response
curl -X GET "https://api.flaq.ai/api/v1/video/{task_id}" \
-H "Authorization: Bearer YOUR_API_KEY"