
Văn bản thành hình ảnh
Tạo hình ảnh AI từ câu lệnh văn bản
Chuyển văn bản thành video trên Best Image AI với Seedance 2.5 Flash API của ByteDance. Định hướng hành động, chọn bố cục khung hình và tạo cảnh có âm thanh. Dài 4–30 giây.
Seedance 2.5 Flash Text-to-Video là mô hình của ByteDance, cho phép bạn dùng API trên Best Image AI để chuyển mô tả cảnh thành video. Bạn mô tả chủ thể, hành động và chuyển động máy quay, rồi chọn thời lượng và khung hình phù hợp với nơi đăng. Bạn có thể tạo clip dài tối đa 30 giây kèm âm thanh hoặc xuất clip không tiếng để biên tập âm thanh riêng.
Lưu ý Chi phí được tính theo độ phân giải đầu ra đã chọn và thời lượng video được tạo. Lời nhắc cần tuân thủ nguyên tắc an toàn nội dung của ByteDance.
Khám phá nhiều công cụ sáng tạo AI cho quy trình hình ảnh và video nhanh ngay trong trình duyệt, sau đó mở rộng các ý tưởng thành công bằng API mô hình sẵn sàng cho sản xuất của Best Image AI. Best Image AI cung cấp một lớp API thống nhất cho mọi mô hình, giúp bạn dễ dàng sử dụng và mở rộng quy trình.

Tạo hình ảnh AI từ câu lệnh văn bản

Tạo hình ảnh AI từ hình ảnh và câu lệnh văn bản

Tạo video AI từ câu lệnh 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ừ 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
// 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: 'seedance-v2.5-flash-text-to-video',
prompt: 'A cat playing with a ball of yarn on a sunny windowsill',
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[].);
;
}
(status === ) {
.(pollResultData..);
;
}
( (resolve, ));
}
# 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': 'seedance-v2.5-flash-text-to-video',
'prompt': 'A cat playing with a ball of yarn on a sunny windowsill',
'resolution': '720p',
'duration': 8,
'aspect_ratio': '16:9',
'sound': True
}
)
result = response.json()
task_id = result['data']['task_id']
# 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": "seedance-v2.5-flash-text-to-video",
"prompt": "A cat playing with a ball of yarn on a sunny windowsill",
"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"
# 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)