
Trình tạo AI Text to Image
Tạo hình ảnh trau chuốt từ prompt bằng các model hình ảnh AI hàng đầu, thiết lập linh hoạt và quy trình nhanh trên trình duyệt.
Tạo video tham chiếu với Seedance 2.0 Mini từ hình ảnh, video và âm thanh đa tham chiếu, có âm thanh tùy chọn, thời lượng linh hoạt và đầu ra ByteDance tiết kiệm.
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model_name: 'seedance-v2.0-mini-reference-to-video',
prompt:
'Use <<<image_1>>> as the character and visual reference, follow the camera movement in <<<video_1>>>, and synchronize the scene with <<<audio_1>>>.',
images: ['https://example.com/character-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4'],
audios: ['https://example.com/audio-reference.mp3'],
resolution: '720p',
duration: 8,
aspect_ratio: '16:9',
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));
}
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/video/task',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'model_name': 'seedance-v2.0-mini-reference-to-video',
'prompt': 'Use <<<image_1>>> as the character and visual reference, follow the camera movement in <<<video_1>>>, and synchronize the scene with <<<audio_1>>>.',
'images': ['https://example.com/character-reference.jpg'],
'videos': ['https://example.com/motion-reference.mp4'],
'audios': ['https://example.com/audio-reference.mp3'],
'resolution': '720p',
'duration': 8,
'aspect_ratio': '16:9',
'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)
curl -X POST 'https://api.flaq.ai/api/v1/video/task' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model_name": "seedance-v2.0-mini-reference-to-video",
"prompt": "Use <<<image_1>>> as the character and visual reference, follow the camera movement in <<<video_1>>>, and synchronize the scene with <<<audio_1>>>.",
"images": ["https://example.com/character-reference.jpg"],
"videos": ["https://example.com/motion-reference.mp4"],
"audios": ["https://example.com/audio-reference.mp3"],
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9",
"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"
Seedance V2.0 Mini Reference-to-Video là mô hình tiết kiệm chi phí của ByteDance, dùng để tạo video từ hình ảnh, video và âm thanh tham chiếu. Mô hình kết hợp hướng dẫn đa phương thức với các tùy chọn đầu ra linh hoạt, phù hợp với nhà sáng tạo và nhà phát triển cần duy trì định hướng hình ảnh nhất quán mà không cần đầu ra có độ phân giải cao hơn của mô hình Seedance V2.0 tiêu chuẩn.
Khi tải lên một hoặc nhiều video tham chiếu, chi phí tạo sẽ được nhân đôi một lần. Hệ số này không thay đổi bất kể số lượng hay thời lượng của các video tham chiếu đã tải lên.
Lưu ý: Mỗi yêu cầu phải có ít nhất một hình ảnh hoặc video tham chiếu. Mỗi video và đoạn âm thanh được tải lên phải dài từ 2 đến 15 giây. Không hỗ trợ yêu cầu chỉ có âm thanh.
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 trau chuốt từ prompt bằng các model hình ảnh AI hàng đầu, thiết lập linh hoạt và quy trình nhanh trên trình duyệt.

Tải lên hình ảnh tham chiếu, hướng dẫn chỉnh sửa bằng prompt và biến đổi hình ảnh cho thiết kế, marketing và sản xuất sáng tạo.

Biến ý tưởng cảnh viết bằng văn bản thành video AI ngắn với lựa chọn model, prompt chuyển động và điều khiển tạo thực tế.

Biến hình ảnh tham chiếu thành clip video AI mượt mà cho sản phẩm, chân dung, bài đăng xã hội và ý tưởng sáng tạo.