使用由 ByteDance 提供支持的 Seedance 2.5 参考视频生成 API 创建电影感视频。支持必填的视频输入、可选的参考图像、4–30 秒时长、声音和高质量输出。还可选用参考音频,支持 480p/720p。
ByteDance Seedance 2.5 Reference-to-Video API 将必需的参考视频与可选的图像、音频和 其他视频素材相结合,以指导在 Bestimage AI 上生成新视频。开发者和创意团队可以使用多模态 参考素材,比单纯使用文本更精确地传达主体外观、产品、环境、动作、时序、声音和视觉方向。 灵活的质量、时长、宽高比和生成声音控制,使该 API 适用于 品牌内容、角色工作流、产品叙事和可扩展的创意系统。
注意 至少需要一个参考视频。参考图像为可选项,提供视频时可以省略; 仅有音频或图像无法替代必需的视频输入。请确保所有提示词和媒体均符合 ByteDance 的内容安全准则。
Seedance 2.5 Reference-to-Video 与 Seedance 2.5 Text-to-Video
Text-to-Video 仅根据书面指导
生成视频。Reference-to-Video 增加了必需的视频指导,以及可选的图像和音频,适合需要更
具体控制动作、外观、时序或风格的工作流。
Seedance 2.5 Reference-to-Video 与 Seedance 2.5 Image-to-Video
Image-to-Video 为必需的首帧添加动画,
并可使用可选的尾帧。Reference-to-Video 从必需的视频素材开始,还可将其与可选的
图像和音频素材相结合,提供更全面的多模态指导。
Seedance 2.5 Reference-to-Video 与 Wan Reference-to-Video
两种方式都使用上传的媒体来指导新视频
生成。Seedance 2.5 提供必须上传视频的工作流,并支持可选的多图像和音频参考,以及通过 Bestimage AI 提供的
灵活输出控制。
Seedance 2.5 Reference-to-Video 与 Vidu Reference-to-Video
Vidu 提供参考素材驱动的视频创作,以保持视觉
一致性。Seedance 2.5 的差异在于必须使用视频进行指导,并能在单个请求中组合可选的图像和
音频参考。
Seedance 2.5 Reference-to-Video 与 Runway 视频工具
Runway 提供广泛的交互式创作套件。
Seedance 2.5 Reference-to-Video 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.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']
})
});
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.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']
})
});
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.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"]
}'
# 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"