Seedance 2.5 API
ByteDance의 Seedance 2.5 동영상 생성 모델에 대한 전체 API 레퍼런스입니다.
모델 변형
이 API는 세 가지 모델 변형을 지원합니다.
빠른 비교
지원되는 화면 비율
텍스트 투 비디오와 레퍼런스 투 비디오는 다음을 지원합니다.
21:9, 16:9, 9:16, 1:1, 4:3, 3:4
이미지 투 비디오는 aspect_ratio 매개변수를 지원하지 않습니다.
해상도 옵션
Seedance 2.5 텍스트 투 비디오
엔드포인트 {#}
POST /api/v1/video/task
요청 매개변수
필수
선택 사항
요청 예시
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.5-text-to-video',
prompt: 'A golden retriever running through a sunlit meadow',
resolution: '720p',
duration: 8,
aspect_ratio: '16:9',
sound: true
})
});
const { data } = await response.json();
const taskId = data.task_id;
Seedance 2.5 이미지 투 비디오
요청 매개변수
필수
선택 사항
이미지 투 비디오 요청에 aspect_ratio를 포함하지 마세요. 이 모델은 해당 매개변수를 지원하지 않습니다.
요청 예시
{
model_name: 'seedance-v2.5-image-to-video',
image_url: 'https://example.com/first-frame.jpg',
image_end_url: 'https://example.com/last-frame.jpg',
prompt: 'Camera slowly pulls back to reveal the full landscape',
resolution: '720p',
duration: 8,
sound: true
}
Seedance 2.5 레퍼런스 투 비디오
요청 매개변수
필수
참조 미디어
@ (AT) 참조 자리표시자
@ (AT) 참조 기능은 번호가 지정된 <<<...>>> 자리표시자를 통해 참조 미디어를 프롬프트에 연결합니다. 번호는 각 미디어 유형별로 1부터 독립적으로 시작하며 해당 배열의 순서를 따릅니다.
예를 들어 첫 번째 이미지가 캐릭터 참조이고 두 번째 이미지가 장면 참조라면, prompt에서 캐릭터에는 <<<image_1>>>, 장면에는 <<<image_2>>>를 사용하세요. 각 자리표시자는 해당 배열에 실제로 존재하는 항목을 가리켜야 합니다.
선택 사항
요청 예시
{
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']
}
@ (AT) 레퍼런스 투 비디오 요청 예시
{
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']
}
응답 형식
초기 응답
모든 모델은 폴링에 사용할 task_id를 반환합니다.
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
폴링 응답
상태를 확인하려면 GET /api/v1/video/{taskId}를 폴링하세요.
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
상태 값
submitted: 작업이 접수되어 처리 대기 중
processing: 동영상 생성 진행 중
succeed: 동영상 생성 완료
failed: 동영상 생성 실패
처리 시간
처리 시간은 길이, 해상도 및 현재 대기열 상태에 따라 달라집니다.
상태를 확인하려면 5-10초마다 폴링하세요.
모범 사례
- 필수 매개변수: 항상
resolution과 duration을 제공하고, 텍스트 투 비디오 및 레퍼런스 투 비디오에는 aspect_ratio를 제공하세요
- 이미지 투 비디오 비율: 이미지 투 비디오 요청에는
aspect_ratio를 보내지 마세요
- 참조 동영상: 레퍼런스 투 비디오에는 동영상이 하나 이상 필요합니다. 각 동영상과 전체 동영상 길이는 문서에 명시된 제한을 준수해야 합니다
- 참조 이미지: 참조 동영상이 제공되면 이미지는 선택 사항입니다. 이미지를 사용할 때는 지원되는 이미지 URL 1-30개를 제출하세요
- 참조 오디오: 각 오디오 클립은 2-30초, 15MB 이하여야 하며 총 길이는 30초를 초과할 수 없습니다
- 참조 순서:
images, videos, audios를 의도한 순서대로 유지하고 프롬프트에서 일관되게 참조하세요
- 사운드: 기본값
true를 사용하려면 sound를 생략하고, 생성 사운드를 비활성화하려면 false로 설정하세요