
文字轉圖片
從文字提示詞建立 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-video-edit',
prompt: 'Turn the daytime scene into a rainy evening while preserving the subject and camera movement',
video_url: 'https://example.com/source-video.mp4',
duration: 10,
resolution: '1080p',
aspect_ratio: '16:9',
sound: true,
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-video-edit',
'prompt': 'Turn the daytime scene into a rainy evening while preserving the subject and camera movement',
'video_url': 'https://example.com/source-video.mp4',
'duration': 10,
'resolution': '1080p',
'aspect_ratio': '16:9',
'sound': True,
'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-video-edit",
"prompt": "Turn the daytime scene into a rainy evening while preserving the subject and camera movement",
"video_url": "https://example.com/source-video.mp4",
"duration": 10,
"resolution": "1080p",
"aspect_ratio": "16:9",
"sound": true,
"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 提供以任務為基礎的 API 工作流程,用於提交來源影片、追蹤編輯進度並取得轉換後的影片。
注意 來源影片必須符合支援的格式、時長和尺寸限制。來源影片時長與所需輸出時長之和不能超過合計上限,因此請在提交前驗證時長。
Wan 3.0 與 Wan 2.7 影片編輯比較
Wan 2.7 提供提示詞引導的來源影片編輯,並帶有其自身的參考控制。Wan 3.0 採用專注於來源影片的工作流程,並提供明確的時長、解析度、長寬比、聲音和種子設定。
Wan 3.0 與 Kling Video O3 影片編輯比較
Kling Video O3 涵蓋編輯和其他影片生成模式。Wan 3.0 適合需要透過 Wan 系列直接方案轉換上傳素材的團隊。
Wan 3.0 與 Runway Aleph 比較
Runway Aleph 屬於更廣泛的創意編輯環境。Wan 3.0 支援希望透過自有應用程式和任務流程協調來源影片轉換的開發者。
Wan 3.0 與 Adobe Firefly Video 比較
Adobe Firefly Video 將影片生成和編輯與 Adobe 的創意生態系統連結。Wan 3.0 為自訂產品中的提示詞引導編輯提供面向阿里巴巴生態的 API 選項。
Wan 3.0 與 Pika 比較
Pika 強調易於使用的創意特效和轉換功能。Wan 3.0 專為結構化請求、可設定的輸出設定和程式化任務處理而設計。
在瀏覽器中探索多種 AI 創作工具,快速完成圖片與影片工作流程,然後透過 Flaq AI 的生產級模型 API 擴展成功想法。Flaq AI 為所有模型提供統一 API 層,讓你的工作流程更容易使用和擴展。