使用 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"