
Văn bản thành hình ảnh
Tạo hình ảnh AI từ prompt văn bản
Dùng thử miễn phí API Wan 2.7 Lora cho chuyển hình ảnh thành video cho hoạt ảnh hình ảnh Alibaba, chuyển động điện ảnh, cảnh nhân vật và quy trình video có thể mở rộng.
// 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-lora-image-to-video',
prompt: 'The girl is dancing',
image_url: 'https://example.com/source-image.jpg',
resolution: '1080p',
duration: 5,
audio_url: 'https://example.com/background-audio.mp3',
seed: 4,
negative_prompt: 'other people'
})
});
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': 'wan-2.7-lora-image-to-video',
'prompt': 'The girl is dancing',
'image_url': 'https://example.com/source-image.jpg',
'resolution': '1080p',
'duration': 5,
'audio_url': 'https://example.com/background-audio.mp3',
'seed': 4,
'negative_prompt': 'other people'
}
)
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": "wan-2.7-lora-image-to-video",
"prompt": "The girl is dancing",
"image_url": "https://example.com/source-image.jpg",
"resolution": "1080p",
"duration": 5,
"audio_url": "https://example.com/background-audio.mp3",
"seed": 4,
"negative_prompt": "other people"
}'
# 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"
| Tham số | Giá | Giá gốc | Giảm giá |
|---|
Wan 2.7 Lora Image-to-Video API trên Flaq AI cung cấp quyền truy cập hoạt ảnh video Alibaba nâng cao cho các đội ngũ cần biến ảnh tĩnh thành chuyển động điện ảnh chất lượng cao. Tích hợp Wan Lora API này giúp developer tạo hoạt ảnh từ visual nguồn với chuyển động camera theo prompt, động lực cảnh và giữ chủ thể ổn định. API này được thiết kế cho production sáng tạo chuyên nghiệp, chuyển động ecommerce, video mạng xã hội, storyboard và quy trình video có khả năng mở rộng.
Lưu ý Hãy đảm bảo hình ảnh tải lên và prompt tuân thủ yêu cầu an toàn của Alibaba và Flaq AI. Nếu xảy ra lỗi, hãy điều chỉnh hình ảnh hoặc prompt chuyển động rồi thử lại.
Khám phá nhiều công cụ tạo AI cho quy trình hình ảnh và video nhanh ngay trong trình duyệt, rồi mở rộng các ý tưởng thành công bằng API model sẵn sàng cho sản xuất của Flaq AI. Flaq AI cung cấp một lớp API thống nhất cho tất cả model, giúp dễ dàng sử dụng và mở rộng quy trình của bạn.

Tạo hình ảnh AI từ prompt văn bản

Tạo hình ảnh AI từ hình ảnh và prompt văn bản

Tạo video AI từ prompt văn bản

Biến hình ảnh thành video AI

Tạo hình ảnh và video AI trong một không gian làm việc hợp nhất

Tạo video nhất quán từ nội dung đa phương tiện tham chiếu

Xây dựng quy trình hình ảnh và video AI trực quan trên canvas vô hạn