Kling API 문서

API 키 하나로 Kling 4.0, Kling 4.0 Flash, Kling 3.0, Kling Video O3를 앱에 연동하는 전체 가이드입니다.

API v1.0 Base URL: https://kling3api.com

빠른 시작

bash
1curl -X POST 'https://kling3api.com/api/generate' \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "model": "kling-4.0",
6 "prompt": "A cinematic shot of mountains at sunrise",
7 "duration": 5,
8 "resolution": "1080p",
9 "aspect_ratio": "16:9"
10 }'

인증

모든 API 요청은 Authorization 헤더에서 Bearer 토큰을 사용한 인증이 필요합니다.

API 키 가져오기: 대시보드의 API Keys 페이지에서 API 키를 가져올 수 있습니다. → API 키 가져오기

http
1Authorization: Bearer YOUR_API_KEY

사용 가능한 모델

4.0

Kling 4.0 신규

레퍼런스, 피사체, 음성, 키프레임으로 만드는 3–30초 720p 또는 1080p 장면

모델 가이드 →

선택 방법 "model": "kling-4.0"

타입설명길이크레딧
reference-to-video텍스트, 레퍼런스 이미지, 피사체, 음성(자동 선택)3-30s28.5/s (720p) · 42.5/s (1080p)
keyframe-to-video첫 프레임, 중간 프레임, 마지막 프레임(자동 선택)3-30s28.5/s (720p) · 42.5/s (1080p)
Flash

Kling 4.0 Flash 신규

이미지-동영상, 레퍼런스, 동영상 편집을 지원하는 저비용 720p 클립

모델 가이드 →

선택 방법 "model": "kling-4.0-flash"

타입설명길이크레딧
text-to-video텍스트-동영상, 720p3-20s24/s
image-to-video첫 프레임 이미지에 움직임 추가, 프롬프트 선택3-20s24/s
reference-to-video이미지 최대 10장, 레퍼런스 동영상 최대 5개3-20s24/s · 32/s (videos)
video-edit프롬프트로 원본 동영상 편집, 원본 길이(초) 기준 과금auto (3-20s)32/s
3.0

Kling 3.0

고품질 4K 비디오 생성

타입설명길이크레딧
pro-text-to-videoPro 품질 텍스트-비디오 생성3-15s54/s (no audio) · 80/s (with audio)
pro-image-to-videoPro 품질 이미지-비디오 애니메이션3-15s54/s (no audio) · 80/s (with audio)
std-text-to-video표준 품질 텍스트-비디오3-15s40/s (no audio) · 60/s (with audio)
std-image-to-video표준 품질 이미지-비디오3-15s40/s (no audio) · 60/s (with audio)
O3

Kling Video O3

참조 및 비디오 편집 기능이 포함된 차세대 모델

타입설명길이크레딧
o3-pro-text-to-videoO3 Pro 텍스트-비디오3-15s48/s
o3-pro-image-to-videoO3 Pro 이미지-비디오3-15s48/s
o3-pro-reference-to-videoO3 Pro 참조 이미지/비디오 포함3-15s72/s
o3-pro-video-editO3 Pro 비디오 편집auto435 fixed
o3-std-text-to-videoO3 Standard 텍스트-비디오3-15s36/s
o3-std-image-to-videoO3 Standard 이미지-비디오3-15s36/s
o3-std-reference-to-videoO3 Standard 참조-비디오3-15s20/s
o3-std-video-editO3 Standard 비디오 편집auto360 fixed

API 엔드포인트

POST/api/generate

새 동영상 생성 작업을 만듭니다. Kling 4 제품군은 model을 kling-4.0 또는 kling-4.0-flash로 설정하고, Kling 3.0과 O3는 type 필드로 백엔드를 선택합니다.

요청 본문

Body ParametersJSON
model:optional string

Kling 4 제품군 모델: kling-4.0 또는 kling-4.0-flash. 생략하면 type 필드로 Kling 3.0 또는 O3를 사용합니다. Kling 4 모델마다 고유 필드가 있으니 모델 가이드를 참고하세요.

type:optional string

Kling 3.0 / O3 작업 유형(예: pro-text-to-video, o3-pro-reference-to-video). model을 설정하면 필요 없습니다.

prompt:string

생성할 동영상의 텍스트 설명. 최대 길이: Kling 3.0은 2,000자, Kling 4.0은 8,000자, Kling 4.0 Flash는 2,500자.

duration:optional number

비디오 길이(초). Kling 3.0: 3-15. O3: 3-15. Defaults to 5.

aspect_ratio:optional string

출력 종횡비 (16:9, 9:16, 1:1) Defaults to 16:9.

image:optional string

이미지-비디오 작업의 이미지 URL

end_image:optional string

종료 프레임 이미지 URL (이미지-비디오만 해당)

video:optional string

참조-비디오 또는 비디오 편집 작업의 비디오 URL

images:optional string[]

참조 이미지 URL 배열 (O3 참조-비디오, 최대 7개)

sound:optional boolean

네이티브 오디오 생성 활성화 Defaults to true.

negative_prompt:optional string

특정 요소를 피하기 위한 부정 프롬프트

cfg_scale:optional number

프롬프트 준수도 (0-1, Kling 3.0만 해당) Defaults to 0.5.

Kling 4.0 - 레퍼런스 이미지

json
1{
2 "model": "kling-4.0",
3 "prompt": "The woman from @image_1 walks into the cafe from @image_2 and orders a coffee",
4 "image_urls": [
5 "https://example.com/woman.jpg",
6 "https://example.com/cafe.png"
7 ],
8 "duration": 8,
9 "resolution": "1080p",
10 "aspect_ratio": "9:16"
11}

Kling 4.0 - 키프레임

json
1{
2 "model": "kling-4.0",
3 "prompt": "Start on @first_frame and settle on @last_frame in one continuous move",
4 "first_frame_url": "https://example.com/start.jpg",
5 "last_frame_url": "https://example.com/end.jpg",
6 "duration": 6,
7 "resolution": "720p"
8}

Kling 4.0 Flash - 이미지-동영상

json
1{
2 "model": "kling-4.0-flash",
3 "prompt": "The product slowly rotates while soft light sweeps across it",
4 "image": "https://example.com/product.jpg",
5 "duration": 5
6}

Kling 4.0 Flash - 동영상 편집

json
1{
2 "model": "kling-4.0-flash",
3 "mode": "video-edit",
4 "prompt": "Turn the daytime street into a snowy night",
5 "video": "https://example.com/street.mp4",
6 "keep_original_sound": true
7}

Kling 3.0 - 텍스트-비디오

json
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 - 이미지-비디오

json
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 - 참조-비디오

json
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 - 비디오 편집

json
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}
GET/api/status

동영상 생성 작업의 상태를 확인합니다. 어떤 모델이든 /api/generate가 반환한 task_id를 사용하면 API가 알맞은 백엔드로 전달합니다.

쿼리 매개변수

Body ParametersJSON
task_id:string

생성 엔드포인트가 반환한 작업 ID(모든 모델 공통)

요청 예시

bash
1curl -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을 가져올 수 있습니다.

javascript
1// Extract video URL from response
2const 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 키로 교체하세요.

예시 본문
API 테스트 환경POST

오류 코드

StatusCodeDescription
400 잘못된 요청INVALID_PROMPT프롬프트가 유효하지 않거나 비어있습니다
400 잘못된 요청INVALID_DURATION길이가 지원 범위를 벗어났습니다
400 잘못된 요청INVALID_TYPE지원되지 않는 작업 유형입니다
400 잘못된 요청MISSING_IMAGE이미지-비디오 작업에 이미지가 필요합니다
400 잘못된 요청MISSING_VIDEO비디오 편집 작업에 비디오가 필요합니다
401 인증되지 않음INVALID_API_KEYAPI 키가 없거나 유효하지 않습니다
402 INSUFFICIENT_CREDITS이 작업에 크레딧이 부족합니다
429 요청이 너무 많음RATE_LIMITED요청이 너무 많습니다. 속도를 늦춰주세요
500 내부 서버 오류INTERNAL_ERROR서버 오류입니다. 나중에 다시 시도해주세요