
文本转图像
从文本提示词创建 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 层,让你的工作流更容易使用和扩展。