
文字轉圖片
從文字提示詞建立 AI 圖片
免費試用 Alibaba Wan 3.0 參考素材生成影片 API,以圖片、影片、音訊、文件或網頁引導 Flaq AI 的影片生成方向。適合整合多種參考素材,建立更清楚且一致的影片創作方向。
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-3.0-reference-to-video',
prompt: 'Use the references to create a cinematic product launch with coordinated motion and sound',
duration: 12,
resolution: '1080p',
aspect_ratio: '16:9',
sound: true,
images: ['https://example.com/product-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4'],
audios: ['https://example.com/sound-reference.mp3'],
files: ['https://example.com/creative-brief.pdf'],
seed: 42
})
});
const { data } = await response.json();
const taskId = data.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));
}
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-3.0-reference-to-video',
'prompt': 'Use the references to create a cinematic product launch with coordinated motion and sound',
'duration': 12,
'resolution': '1080p',
'aspect_ratio': '16:9',
'sound': True,
'images': ['https://example.com/product-reference.jpg'],
'videos': ['https://example.com/motion-reference.mp4'],
'audios': ['https://example.com/sound-reference.mp3'],
'files': ['https://example.com/creative-brief.pdf'],
'seed': 42
}
)
result = response.json()
task_id = 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)
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-3.0-reference-to-video",
"prompt": "Use the references to create a cinematic product launch with coordinated motion and sound",
"duration": 12,
"resolution": "1080p",
"aspect_ratio": "16:9",
"sound": true,
"images": ["https://example.com/product-reference.jpg"],
"videos": ["https://example.com/motion-reference.mp4"],
"audios": ["https://example.com/sound-reference.mp3"],
"files": ["https://example.com/creative-brief.pdf"],
"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"
| 參數 | 價格 | 原價 | 折扣 |
|---|
Wan 3.0 參考生成影片 API 可根據提示詞以及可選的圖片、影片、音訊、文件或公開網頁參考生成影片。開發者可以使用受支援的輸入來引導視覺特徵、動作、聲音、情境和場景方向,同時設定時長、解析度、長寬比、聲音和種子。Flaq AI 提供以任務為基礎的工作流程,用於提交多模態請求並取得完成的影片。
注意 參考輸入是可選的,但提供的每項素材都必須符合其格式和限制要求。同一請求中不能同時使用參考檔案和網頁連結。海外服務支援海外網頁 URL,但中國境內服務無法解析這些 URL。
Wan 3.0 與 Wan 2.7 參考生成影片比較
Wan 2.7 專注於圖片、影片和語音參考,並設有合併的視覺參考上限。Wan 3.0 透過獨立的媒體限制以及文件和公開網頁情境擴充了該工作流程。
Wan 3.0 與 MiniMax H3 參考生成影片比較
MiniMax H3 支援使用視覺和音訊參考進行多模態影片引導。Wan 3.0 為使用更廣泛創意來源資料的團隊加入了文件和網頁輸入選項。
Wan 3.0 與 Seedance 2.5 參考生成影片比較
Seedance 2.5 在其影音生成工作流程中使用圖片、影片和音訊參考。Wan 3.0 提供 Wan 系列替代方案,並支援可選文件或公開連結情境。
Wan 3.0 與 Kling Video O3 參考生成影片比較
Kling Video O3 涵蓋參考生成和影片編輯變體。Wan 3.0 提供面向阿里巴巴生態的多模態請求格式,以及彈性的輸出和聲音控制。
Wan 3.0 與 Runway References 比較
Runway 將參考功能整合到廣泛的創意工作區中。Wan 3.0 適合將參考引導生成直接建構到自有產品和自動化工作流程中的開發者。
在瀏覽器中探索多種 AI 創作工具,快速完成圖片與影片工作流程,然後透過 Flaq AI 的生產級模型 API 擴展成功想法。Flaq AI 為所有模型提供統一 API 層,讓你的工作流程更容易使用和擴展。