Kling 3.0 API 문서
Kling 3.0 및 Kling Video O3 API를 애플리케이션에 통합하기 위한 완전 가이드.
빠른 시작
| 1 | curl -X POST 'https://kling3api.com/api/generate' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "type": "pro-text-to-video", |
| 6 | "prompt": "A cinematic shot of mountains at sunrise", |
| 7 | "duration": 5, |
| 8 | "aspect_ratio": "16:9" |
| 9 | }' |
인증
모든 API 요청은 Authorization 헤더에서 Bearer 토큰을 사용한 인증이 필요합니다.
API 키 가져오기: 대시보드의 API Keys 페이지에서 API 키를 가져올 수 있습니다. → API 키 가져오기
| 1 | Authorization: Bearer YOUR_API_KEY |
사용 가능한 모델
Kling 3.0
고품질 4K 비디오 생성
| 타입 | 설명 | 길이 | 크레딧 |
|---|---|---|---|
pro-text-to-video | Pro 품질 텍스트-비디오 생성 | 3-15s | 54/s (no audio) · 80/s (with audio) |
pro-image-to-video | Pro 품질 이미지-비디오 애니메이션 | 3-15s | 54/s (no audio) · 80/s (with audio) |
std-text-to-video | 표준 품질 텍스트-비디오 | 3-15s | 40/s (no audio) · 60/s (with audio) |
std-image-to-video | 표준 품질 이미지-비디오 | 3-15s | 40/s (no audio) · 60/s (with audio) |
Kling Video O3
참조 및 비디오 편집 기능이 포함된 차세대 모델
| 타입 | 설명 | 길이 | 크레딧 |
|---|---|---|---|
o3-pro-text-to-video | O3 Pro 텍스트-비디오 | 3-15s | 48/s |
o3-pro-image-to-video | O3 Pro 이미지-비디오 | 3-15s | 48/s |
o3-pro-reference-to-video | O3 Pro 참조 이미지/비디오 포함 | 3-15s | 72/s |
o3-pro-video-edit | O3 Pro 비디오 편집 | auto | 435 fixed |
o3-std-text-to-video | O3 Standard 텍스트-비디오 | 3-15s | 36/s |
o3-std-image-to-video | O3 Standard 이미지-비디오 | 3-15s | 36/s |
o3-std-reference-to-video | O3 Standard 참조-비디오 | 3-15s | 20/s |
o3-std-video-edit | O3 Standard 비디오 편집 | auto | 360 fixed |
API 엔드포인트
/api/generate새 비디오 생성 작업을 생성합니다. API는 작업 유형에 따라 자동으로 올바른 백엔드로 라우팅합니다.
요청 본문
작업 유형 (예: pro-text-to-video, o3-pro-reference-to-video)
생성할 비디오의 텍스트 설명 (최대 2000자)
비디오 길이(초). Kling 3.0: 3-15. O3: 3-15. Defaults to 5.
출력 종횡비 (16:9, 9:16, 1:1) Defaults to 16:9.
이미지-비디오 작업의 이미지 URL
종료 프레임 이미지 URL (이미지-비디오만 해당)
참조-비디오 또는 비디오 편집 작업의 비디오 URL
참조 이미지 URL 배열 (O3 참조-비디오, 최대 7개)
네이티브 오디오 생성 활성화 Defaults to true.
특정 요소를 피하기 위한 부정 프롬프트
프롬프트 준수도 (0-1, Kling 3.0만 해당) Defaults to 0.5.
Kling 3.0 - 텍스트-비디오
| 1 | { |
| 2 | "type": "pro-text-to-video", |
| 3 | "prompt": "A majestic eagle soaring through clouds at sunset", |
| 4 | "duration": 5, |
| 5 | "aspect_ratio": "16:9", |
| 6 | "sound": true |
| 7 | } |
Kling 3.0 - 이미지-비디오
| 1 | { |
| 2 | "type": "pro-image-to-video", |
| 3 | "prompt": "The character slowly turns and smiles", |
| 4 | "image": "https://example.com/my-image.jpg", |
| 5 | "duration": 5 |
| 6 | } |
Kling O3 - 참조-비디오
| 1 | { |
| 2 | "type": "o3-pro-reference-to-video", |
| 3 | "prompt": "The character walks through a futuristic city", |
| 4 | "images": [ |
| 5 | "https://example.com/character-reference.jpg", |
| 6 | "https://example.com/style-reference.jpg" |
| 7 | ], |
| 8 | "duration": 5, |
| 9 | "aspect_ratio": "16:9" |
| 10 | } |
Kling O3 - 비디오 편집
| 1 | { |
| 2 | "type": "o3-pro-video-edit", |
| 3 | "prompt": "Change the background to a snowy mountain landscape", |
| 4 | "video": "https://example.com/original-video.mp4", |
| 5 | "keep_original_sound": true |
| 6 | } |
응답
Task created successfully
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n75abc123kling3", |
| 6 | "status": "IN_PROGRESS", |
| 7 | "consumed_credits": 400 |
| 8 | } |
| 9 | } |
/api/status비디오 생성 작업의 상태를 확인합니다. task_id 접두사를 기반으로 라우팅합니다 (Kling 3.0은 n75, Kling O3는 n71).
쿼리 매개변수
생성 엔드포인트에서 반환된 고유 작업 ID (예: Kling 3.0은 n75xxx, O3는 n71xxx)
요청 예시
| 1 | curl -X GET 'https://kling3api.com/api/status?task_id=n75abc123kling3' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
💡 Tip: 상태 API의 response 필드는 비디오 URL 배열입니다. data.response[0]에 직접 접근하여 비디오 URL을 가져올 수 있습니다.
| 1 | // Extract video URL from response |
| 2 | const videoUrl = data.response[0]; |
응답
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "n75abc123kling3", |
| 6 | "status": "SUCCESS", |
| 7 | "consumed_credits": 400, |
| 8 | "created_at": "2026-02-05T10:30:00Z", |
| 9 | "request": { |
| 10 | "type": "pro-text-to-video", |
| 11 | "prompt": "A majestic eagle soaring through clouds at sunset", |
| 12 | "duration": 5, |
| 13 | "aspect_ratio": "16:9" |
| 14 | }, |
| 15 | "response": [ |
| 16 | "https://cdn.example.com/videos/abc123.mp4" |
| 17 | ], |
| 18 | "error_message": null, |
| 19 | "type": "pro-text-to-video" |
| 20 | } |
| 21 | } |
API 플레이그라운드
브라우저에서 직접 API를 테스트합니다. YOUR_API_KEY를 실제 API 키로 교체하세요.
오류 코드
| Status | Code | Description |
|---|---|---|
| 400 잘못된 요청 | INVALID_PROMPT | 프롬프트가 유효하지 않거나 비어있습니다 |
| 400 잘못된 요청 | INVALID_DURATION | 길이가 지원 범위를 벗어났습니다 |
| 400 잘못된 요청 | INVALID_TYPE | 지원되지 않는 작업 유형입니다 |
| 400 잘못된 요청 | MISSING_IMAGE | 이미지-비디오 작업에 이미지가 필요합니다 |
| 400 잘못된 요청 | MISSING_VIDEO | 비디오 편집 작업에 비디오가 필요합니다 |
| 401 인증되지 않음 | INVALID_API_KEY | API 키가 없거나 유효하지 않습니다 |
| 402 | INSUFFICIENT_CREDITS | 이 작업에 크레딧이 부족합니다 |
| 429 요청이 너무 많음 | RATE_LIMITED | 요청이 너무 많습니다. 속도를 늦춰주세요 |
| 500 내부 서버 오류 | INTERNAL_ERROR | 서버 오류입니다. 나중에 다시 시도해주세요 |