
AI 文字轉圖片生成器
使用領先 AI 圖片模型、彈性設定與快速瀏覽器工作流程,從提示詞建立精緻圖片。
免費試用 Wan 2.7 參考素材生成影片 API,支援最多五張參考圖片或五部參考影片、選用語音參考、1080p 輸出和種子控制。適合可控影片創作。
// 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: 'wan-2.7-reference-to-video',
prompt: 'Use image one for the hero and video one for the motion; keep the hero voice consistent with audio one',
resolution: '1080p',
duration: 8,
aspect_ratio: '16:9',
images: ['https://example.com/hero-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4'],
audios: ['https://example.com/voice-reference.mp3'],
negative_prompt: 'flicker, distorted hands, duplicate subjects',
seed: 42
})
});
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: 'wan-2.7-reference-to-video',
prompt: 'Place the presenter from <<<image_1>>> in the studio from <<<image_2>>>, follow the camera path in <<<video_1>>>, and use the reference voice from <<<audio_1>>>',
resolution: '1080p',
duration: 8,
aspect_ratio: '16:9',
images: [
'https://example.com/presenter-reference.jpg',
'https://example.com/studio-reference.jpg'
],
videos: ['https://example.com/camera-path-reference.mp4'],
audios: ['https://example.com/voice-reference.mp3'],
negative_prompt: 'flicker, distorted hands, duplicate subjects',
seed: 42
})
});
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[0].url);
break;
}
if (status === 'failed') {
console.error(pollResultData.data.task_status_msg);
break;
}
await new Promise(resolve => setTimeout(resolve, 10000));
}
# 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': 'wan-2.7-reference-to-video',
'prompt': 'Use image one for the hero and video one for the motion; keep the hero voice consistent with audio one',
'resolution': '1080p',
'duration': 8,
'aspect_ratio': '16:9',
'images': ['https://example.com/hero-reference.jpg'],
'videos': ['https://example.com/motion-reference.mp4'],
'audios': ['https://example.com/voice-reference.mp3'],
'negative_prompt': 'flicker, distorted hands, duplicate subjects',
'seed': 42
}
)
result = response.json()
task_id = result['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]
media_reference_response = requests.post(
'https://api.flaq.ai/api/v1/video/task',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'model_name': 'wan-2.7-reference-to-video',
'prompt': 'Place the presenter from <<<image_1>>> in the studio from <<<image_2>>>, follow the camera path in <<<video_1>>>, and use the reference voice from <<<audio_1>>>',
'resolution': '1080p',
'duration': 8,
'aspect_ratio': '16:9',
'images': [
'https://example.com/presenter-reference.jpg',
'https://example.com/studio-reference.jpg'
],
'videos': ['https://example.com/camera-path-reference.mp4'],
'audios': ['https://example.com/voice-reference.mp3'],
'negative_prompt': 'flicker, distorted hands, duplicate subjects',
'seed': 42
}
)
media_reference_result = media_reference_response.json()
media_reference_task_id = media_reference_result['data']['task_id']
# 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 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": "wan-2.7-reference-to-video",
"prompt": "Use image one for the hero and video one for the motion; keep the hero voice consistent with audio one",
"resolution": "1080p",
"duration": 8,
"aspect_ratio": "16:9",
"images": ["https://example.com/hero-reference.jpg"],
"videos": ["https://example.com/motion-reference.mp4"],
"audios": ["https://example.com/voice-reference.mp3"],
"negative_prompt": "flicker, distorted hands, duplicate subjects",
"seed": 42
}'
# 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]
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": "wan-2.7-reference-to-video",
"prompt": "Place the presenter from <<<image_1>>> in the studio from <<<image_2>>>, follow the camera path in <<<video_1>>>, and use the reference voice from <<<audio_1>>>",
"resolution": "1080p",
"duration": 8,
"aspect_ratio": "16:9",
"images": [
"https://example.com/presenter-reference.jpg",
"https://example.com/studio-reference.jpg"
],
"videos": ["https://example.com/camera-path-reference.mp4"],
"audios": ["https://example.com/voice-reference.mp3"],
"negative_prompt": "flicker, distorted hands, duplicate subjects",
"seed": 42
}'
# 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"
| 參數 | 價格 | 原價 | 折扣 |
|---|
Alibaba Wan 2.7 Reference-to-Video API 為需要在生成片段中保持主體、聲音和視覺方向一致的 開發者與創意團隊提供生產級 AI 影片生成。這項先進的 Reference-to-Video API 整合支援輸入圖片和影片參考素材,並可選擇提供聲音引導,接著將自然語言指令 轉化為精良的 720p 或 1080p 影片。Wan 2.7 專為可控的創意製作而打造,結合多模態參考素材 理解、彈性的輸出設定,以及 Flaq AI 上可擴展的 API 存取能力。
注意 請確保提示詞和參考媒體符合阿里巴巴的安全準則。如果發生錯誤, 請檢查輸入中是否含有受限內容,進行調整後重試。
Wan 2.7 Reference-to-Video 與 Wan 2.7 Image-to-Video 比較 Wan 2.7 Image-to-Video 可讓起始圖片動起來。Wan 2.7 Reference-to-Video 支援混合圖片和影片參考素材、多主體引導與可選聲音參考, 實現更可控的身分驅動型製作。
Wan 2.7 Reference-to-Video 與 Seedance V2.0 Reference-to-Video 比較 Seedance V2.0 支援基於圖片、影片和音訊輸入的廣泛多模態 參考生成。Wan 2.7 著重結構化主體參考、可選聲音 身分引導、負向提示詞,以及阿里巴巴的高解析度影片生成。
Wan 2.7 Reference-to-Video 與 Vidu Q3 Reference-to-Video 比較 Vidu Q3 著重多圖片主體一致性和 原生同步音訊。Wan 2.7 增加了對混合圖片與影片參考素材的支援,並提供可選的主體層級聲音 引導,適用於彈性的多模態工作流程。
Wan 2.7 Reference-to-Video 與 Kling Video O3 Reference-to-Video 比較 Kling Video O3 提供具有出色動作推理能力的參考素材引導生成。 Wan 2.7 憑藉混合參考媒體、主體聲音引導、種子 控制和負向提示詞,支援可控的製作管線。
Wan 2.7 Reference-to-Video 與 Runway 影片工具比較 Runway 提供面向創作者的廣泛編輯與生成 工具套件。Wan 2.7 Reference-to-Video API 專為程式化多模態參考工作流程、主體的持續 重複使用,以及可擴展的應用程式整合而設計。
在瀏覽器中探索多種 AI 創作工具,快速完成圖片與影片工作流程,然後透過 Flaq AI 的生產級模型 API 擴展成功想法。Flaq AI 為所有模型提供統一 API 層,讓你的工作流程更容易使用和擴展。