
文本转图像
从文本提示词创建 AI 图像
使用快手的 Kling 3.0 动作控制 API 生成角色视频。通过 Flaq AI 的统一视频 API,使用图片、参考视频和提示词引导动作。可按参考素材匹配角色朝向,并选择是否保留原声。
// 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: 'kling-3.0-motion-control',
prompt: 'Animate the character in the reference image using the dance movements from the reference video',
images: ['https://example.com/character.jpg'],
videos: ['https://example.com/dance-reference.mp4'],
character_orientation: 'video',
resolution: '720p',
keep_original_sound: true
})
});
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));
}
# 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': 'kling-3.0-motion-control',
'prompt': 'Animate the character in the reference image using the dance movements from the reference video',
'images': ['https://example.com/character.jpg'],
'videos': ['https://example.com/dance-reference.mp4'],
'character_orientation': 'video',
'resolution': '720p',
'keep_original_sound': True
}
)
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)
# 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": "kling-3.0-motion-control",
"prompt": "Animate the character in the reference image using the dance movements from the reference video",
"images": ["https://example.com/character.jpg"],
"videos": ["https://example.com/dance-reference.mp4"],
"character_orientation": "video",
"resolution": "720p",
"keep_original_sound": true
}'
# 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"
| 参数 | 价格 | 原价 | 折扣 |
|---|
快手的 Kling 3.0 Motion Control API 为开发者和创意团队提供 AI 角色动作迁移能力。通过集成此动作控制 API,您可以在自然语言提示词的引导下,使用参考视频中的动作驱动参考角色图像。该模型基于快手的 Kling 3.0 动作控制流程,专注于面向角色的动画工作流;API 则提供可靠的集成方式,并支持按需保留原声,适用于在 Flaq AI 上投入生产使用。
注意 请确保您的提示词和上传的媒体符合快手的内容安全准则。如果发生错误,请检查是否包含受限内容,调整输入后重试。
Kling 3.0 Motion Control 与 Kling 2.6 Motion Control
Kling 2.6 Motion Control 在 Flaq AI 上提供相同的动作控制参数,价格档位更低。如果您希望使用更新的模型系列,Kling 3.0 Motion Control 提供适用于同一图像与视频结合的动作迁移工作流的 3.0 代端点。
Kling 3.0 Motion Control 与 Kling Image-to-Video
Kling Image-to-Video 仅依靠提示词即可让静态图像动起来。Kling 3.0 Motion Control API 则需要参考视频,使动作、节奏和表演线索来自真实素材,更适合需要将动作忠实地重定向到角色图像上的场景。
Kling 3.0 Motion Control 与 Runway Act-One / 动作工具
Runway 在面向工作室的界面中提供强大的表演驱动创作工具。Kling 3.0 Motion Control API 专注于通过编程实现基于图像和视频的动作迁移,为开发者流程提供朝向控制和可选原声保留功能。
Kling 3.0 Motion Control 与 Pika 角色动作
Pika 注重风格化动画和易于上手的创作界面。Kling 3.0 Motion Control 提供以 API 为核心的接入方式、高清分辨率选项和面向生产的动作迁移能力,支持可扩展的角色工作流。
Kling 3.0 Motion Control 与 Luma 角色动画
Luma 以快速的生成式视频体验著称。Kling 3.0 Motion Control API 的差异化优势在于明确的角色朝向选项、参考视频驱动的动作迁移,以及适用于生产自动化且表现可预期的 Flaq AI 集成。
在浏览器中探索多种 AI 创作工具,用于快速图像和视频工作流,然后通过 Flaq AI 可用于生产的模型 API 扩展成功创意。Flaq AI 为所有模型提供统一 API 层,让你的工作流更容易使用和扩展。