Kling Video O3 API
Kuaishou의 Kling Video O3 모델에 대한 완전한 API 참조 문서입니다.
모델 종류
이 API는 8가지 모델 변형을 지원합니다:
빠른 비교
지원되는 화면 비율
16:9, 9:16, 1:1
Kling Video O3 텍스트-비디오 변환 (Std & Pro)
엔드포인트 {#}
POST /api/v1/video/task
요청 파라미터
필수
선택 사항
@ (AT) 참조 플레이스홀더
@ (AT) 참조 기능은 번호가 지정된 <<<...>>> 플레이스홀더를 통해 참조 미디어를 프롬프트에 연결합니다. 이미지 번호는 1부터 시작하며 images 배열의 순서를 따릅니다. 이 모델은 하나의 참조 비디오 URL을 허용하므로 <<<video_1>>>은 video_url을 참조합니다.
요청 예시
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: 'kling-video-o3-std-text-to-video',
prompt: 'A drone flying over a mountain range at sunrise',
duration: 5,
aspect_ratio: '16:9'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Kling Video O3 이미지-비디오 변환 (Std & Pro)
요청 파라미터
필수
선택 사항
요청 예시
{
model_name: 'kling-video-o3-pro-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly pulls back revealing the landscape',
duration: 5,
image_end_url: 'https://example.com/end-frame.jpg'
}
Kling Video O3 참조 가이드 비디오 생성 (Std & Pro)
요청 파라미터
필수
선택
요청 예시
{
model_name: 'kling-video-o3-std-reference-to-video',
video_url: 'https://example.com/source.mp4',
images: ['https://example.com/reference-a.jpg', 'https://example.com/reference-b.jpg'],
prompt: 'Character walking through a forest',
duration: 8,
aspect_ratio: '16:9',
keep_original_sound: true
}
Kling Video O3 비디오 편집 (Std & Pro)
요청 파라미터
필수
선택
요청 예시
{
model_name: 'kling-video-o3-pro-video-edit',
video_url: 'https://example.com/source.mp4',
duration: 5,
images: ['https://example.com/ref.jpg'],
prompt: 'Add falling snow throughout the scene',
keep_original_sound: true
}
@ (AT) Reference-to-Video 요청 예시
{
model_name: 'kling-video-o3-std-reference-to-video',
video_url: 'https://example.com/motion-reference.mp4',
images: [
'https://example.com/athlete-reference.jpg',
'https://example.com/uniform-reference.jpg'
],
prompt: 'Make the athlete from <<<image_1>>> follow the motion in <<<video_1>>> while preserving the uniform details from <<<image_2>>>',
duration: 8,
aspect_ratio: '16:9',
keep_original_sound: true
}
응답 형식
초기 응답
{
"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: 비디오 생성 실패
처리 시간
권장 사항
- 등급 선택: 반복 작업에는 Std를, 최종 출력에는 Pro를 사용하세요
- 동작 묘사: 카메라 및 피사체의 구체적인 움직임을 포함하세요
- 참조 입력: 캐릭터 일관성을 위해 선명하고 고품질의 참조 이미지 또는 참조 비디오를 사용하세요
- 비디오 편집 프롬프트: 원본 콘텐츠를 유지하면서 변경할 내용을 구체적으로 명시하세요