
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 层,让你的工作流更容易使用和扩展。