
Văn bản thành hình ảnh
Tạo hình ảnh AI từ prompt văn bản
Dùng thử API Seedance 2.5 của ByteDance cho video tham chiếu: ảnh, video và âm thanh tham chiếu tùy chọn, hỗ trợ đa tham chiếu, thời lượng 4–30 giây, có âm thanh và đầu ra 720p.
// 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-reference-to-video',
prompt: 'Use image one for the subject, video one for the movement, and audio one for the atmosphere',
resolution: '720p',
duration: 8,
aspect_ratio: '16:9',
sound: true,
images: ['https://example.com/subject-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4'],
audios: ['https://example.com/atmosphere-reference.mp3']
})
});
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: 'seedance-v2.5-reference-to-video',
prompt: 'Place the explorer from <<<image_1>>> in the environment from <<<image_2>>>, following the camera movement in <<<video_1>>> and speaking with the reference voice from <<<audio_1>>>',
resolution: '720p',
duration: 10,
aspect_ratio: '16:9',
sound: true,
images: [
'https://example.com/explorer-reference.jpg',
'https://example.com/environment-reference.png'
],
videos: ['https://example.com/camera-movement-reference.mp4'],
audios: ['https://example.com/voice-reference.mp3']
})
});
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': 'seedance-v2.5-reference-to-video',
'prompt': 'Use image one for the subject, video one for the movement, and audio one for the atmosphere',
'resolution': '720p',
'duration': 8,
'aspect_ratio': '16:9',
'sound': True,
'images': ['https://example.com/subject-reference.jpg'],
'videos': ['https://example.com/motion-reference.mp4'],
'audios': ['https://example.com/atmosphere-reference.mp3']
}
)
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': 'seedance-v2.5-reference-to-video',
'prompt': 'Place the explorer from <<<image_1>>> in the environment from <<<image_2>>>, following the camera movement in <<<video_1>>> and speaking with the reference voice from <<<audio_1>>>',
'resolution': '720p',
'duration': 10,
'aspect_ratio': '16:9',
'sound': True,
'images': [
'https://example.com/explorer-reference.jpg',
'https://example.com/environment-reference.png'
],
'videos': ['https://example.com/camera-movement-reference.mp4'],
'audios': ['https://example.com/voice-reference.mp3']
}
)
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": "seedance-v2.5-reference-to-video",
"prompt": "Use image one for the subject, video one for the movement, and audio one for the atmosphere",
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9",
"sound": true,
"images": ["https://example.com/subject-reference.jpg"],
"videos": ["https://example.com/motion-reference.mp4"],
"audios": ["https://example.com/atmosphere-reference.mp3"]
}'
# 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": "seedance-v2.5-reference-to-video",
"prompt": "Place the explorer from <<<image_1>>> in the environment from <<<image_2>>>, following the camera movement in <<<video_1>>> and speaking with the reference voice from <<<audio_1>>>",
"resolution": "720p",
"duration": 10,
"aspect_ratio": "16:9",
"sound": true,
"images": [
"https://example.com/explorer-reference.jpg",
"https://example.com/environment-reference.png"
],
"videos": ["https://example.com/camera-movement-reference.mp4"],
"audios": ["https://example.com/voice-reference.mp3"]
}'
# 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á |
|---|
API ByteDance Seedance 2.5 Reference-to-Video hỗ trợ hình ảnh, âm thanh và video tùy chọn để định hướng tạo video mới trên Flaq AI. Nhà phát triển và nhóm sáng tạo có thể dùng tư liệu tham chiếu đa phương thức để truyền đạt ngoại hình chủ thể, sản phẩm, môi trường, chuyển động, thời điểm, âm thanh và định hướng hình ảnh chính xác hơn so với chỉ dùng văn bản. Các tùy chỉnh linh hoạt về chất lượng, thời lượng, tỷ lệ khung hình và âm thanh tạo ra giúp API phù hợp với nội dung thương hiệu, quy trình nhân vật, câu chuyện sản phẩm và hệ thống sáng tạo có thể mở rộng.
Lưu ý Hỗ trợ yêu cầu chỉ có ảnh, chỉ có video, chỉ có âm thanh và không có tư liệu tham chiếu. Khi tạo không có tham chiếu, nên dùng Text-to-Video. Hãy bảo đảm mọi câu lệnh và tư liệu tuân thủ hướng dẫn an toàn nội dung của ByteDance.
Seedance 2.5 Reference-to-Video và Seedance 2.5 Text-to-Video
Text-to-Video chỉ tạo từ hướng dẫn bằng
văn bản. Reference-to-Video bổ sung định hướng tùy chọn bằng ảnh, video và âm thanh cho quy trình cần
kiểm soát cụ thể hơn về chuyển động, ngoại hình, thời điểm hoặc phong cách.
Seedance 2.5 Reference-to-Video và Seedance 2.5 Image-to-Video
Image-to-Video tạo chuyển động từ khung hình đầu bắt buộc và
có thể dùng khung hình cuối tùy chọn. Reference-to-Video có thể kết hợp video,
hình ảnh và âm thanh tùy chọn để định hướng đa phương thức rộng hơn.
Seedance 2.5 Reference-to-Video và Wan Reference-to-Video
Cả hai dùng tư liệu tải lên để định hướng tạo
video mới. Seedance 2.5 cung cấp quy trình linh hoạt với ảnh, video và âm thanh tham chiếu tùy chọn cùng
khả năng tùy chỉnh đầu ra linh hoạt qua Flaq AI.
Seedance 2.5 Reference-to-Video và Vidu Reference-to-Video
Vidu cung cấp khả năng tạo video dựa trên tham chiếu để giữ tính nhất quán
về hình ảnh. Seedance 2.5 hỗ trợ định hướng video tùy chọn và kết hợp ảnh cùng
âm thanh tham chiếu trong một yêu cầu.
Seedance 2.5 Reference-to-Video và công cụ video Runway
Runway cung cấp bộ công cụ sáng tạo tương tác phong phú.
API Seedance 2.5 Reference-to-Video cung cấp quy trình lập trình chuyên biệt cho đầu vào đa phương thức, định hướng
tham chiếu bằng câu lệnh và tạo nội dung ở quy mô lớn.
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