
텍스트로 이미지 생성
텍스트 프롬프트로 AI 이미지 생성
Best Image AI에서 ByteDance Seedance 2.5 Flash API로 이미지, 클립, 오디오를 참조해 동영상을 만드세요. 이미지로 분위기를 정하거나 오디오 트랙으로 동작을 유도할 수 있습니다.
Seedance 2.5 Flash Reference-to-Video는 Best Image AI에서 사용할 수 있는 ByteDance의 API 모델로, 프롬프트와 선택적으로 제공한 참고 자료를 바탕으로 새로운 영상을 생성합니다. 이미지로 외형을, 비디오로 움직임을, 오디오로 동작의 타이밍을 지정할 수 있습니다. 한 요청에서 여러 유형의 자료를 조합하거나 오디오만 참고 자료로 사용할 수 있습니다.
요청을 제출하기 전에 지원하는 미디어 형식과 파일 크기 제한을 확인하고, 비디오와 오디오에 각각 적용되는 총 길이 제한도 확인하세요.
참고 요금은 선택한 출력 해상도에 따라 계산됩니다. 참고 비디오가 있으면 먼저 모든 참고 비디오의 길이를 합산한 뒤 가장 가까운 정수 초로 반올림하고(2.4초는 2초, 2.5초는 3초), 여기에 출력 영상의 길이를 더합니다. 참고 비디오가 없으면 출력 영상 길이에 대해서만 요금이 부과됩니다. 프롬프트와 참고 자료는 ByteDance의 콘텐츠 안전 지침을 준수해야 합니다.
브라우저에서 빠른 이미지 및 비디오 워크플로를 위한 여러 AI 창작 도구를 살펴본 다음, Best Image AI의 프로덕션용 모델 API로 성공적인 아이디어를 확장하세요. Best Image 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: 'seedance-v2.5-flash-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-flash-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[].);
;
}
(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': ,
: ,
: ,
: ,
: ,
: ,
: [],
: [],
: []
}
)
result = response.json()
task_id = result[][]
media_reference_response = requests.post(
,
headers={
: ,
:
},
json={
: ,
: ,
: ,
: ,
: ,
: ,
: [
,
],
: [],
: []
}
)
media_reference_result = media_reference_response.json()
media_reference_task_id = media_reference_result[][]
# 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-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:
curl -X POST https://api.flaq.ai/api/v1/video/task \
-H \
-H \
-d
# 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 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"