Kling 3.0 API Documentation

Complete guide to integrating the Kling 3.0 and Kling Video O3 APIs into your applications.

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

Quick Start

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 "type": "pro-text-to-video",
6 "prompt": "A cinematic shot of mountains at sunrise",
7 "duration": 5,
8 "aspect_ratio": "16:9"
9 }'

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Get Your API Key: You can get your API key from the API Keys page in your dashboard. → Get Your API Key

http
1Authorization: Bearer YOUR_API_KEY

Available Models

3.0

Kling 3.0

High-quality 4K video generation

TypeDescriptionDurationCredits
pro-text-to-videoPro quality text-to-video generation3-15s54/s (no audio) · 80/s (with audio)
pro-image-to-videoPro quality image-to-video animation3-15s54/s (no audio) · 80/s (with audio)
std-text-to-videoStandard quality text-to-video3-15s40/s (no audio) · 60/s (with audio)
std-image-to-videoStandard quality image-to-video3-15s40/s (no audio) · 60/s (with audio)
O3

Kling Video O3

Next-gen with reference & video editing

TypeDescriptionDurationCredits
o3-pro-text-to-videoO3 Pro text-to-video3-15s48/s
o3-pro-image-to-videoO3 Pro image-to-video3-15s48/s
o3-pro-reference-to-videoO3 Pro with reference images/video3-15s72/s
o3-pro-video-editO3 Pro video editingauto435 fixed
o3-std-text-to-videoO3 Standard text-to-video3-15s36/s
o3-std-image-to-videoO3 Standard image-to-video3-15s36/s
o3-std-reference-to-videoO3 Standard reference-to-video3-15s20/s
o3-std-video-editO3 Standard video editingauto360 fixed

API Endpoints

POST/api/generate

Create a new video generation task. The API automatically routes to the correct backend based on task type.

Request Body

Body ParametersJSON
type:string

Task type (e.g., pro-text-to-video, o3-pro-reference-to-video)

prompt:string

Text description of the video to generate (max 2000 chars)

duration:optional number

Video duration in seconds. Kling 3.0: 3-15. O3: 3-15. Defaults to 5.

aspect_ratio:optional string

Output aspect ratio (16:9, 9:16, 1:1) Defaults to 16:9.

image:optional string

Image URL for image-to-video tasks

end_image:optional string

End frame image URL (image-to-video only)

video:optional string

Video URL for reference-to-video or video-edit tasks

images:optional string[]

Array of reference image URLs (O3 reference-to-video, max 7)

sound:optional boolean

Enable native audio generation Defaults to true.

negative_prompt:optional string

Negative prompt to avoid certain elements

cfg_scale:optional number

Prompt adherence (0-1, Kling 3.0 only) Defaults to 0.5.

Kling 3.0 - Text to Video

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 - Image to Video

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 - Reference to Video

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 - Video Edit

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}

Responses

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

Check the status of a video generation task. Routes based on task_id prefix (n75 for Kling 3.0, n71 for Kling O3).

Query Parameters

Body ParametersJSON
task_id:string

The unique task ID returned from generate endpoint (e.g., n75xxx for Kling 3.0, n71xxx for O3)

Example Request

bash
1curl -X GET 'https://kling3api.com/api/status?task_id=n75abc123kling3' \
2 -H 'Authorization: Bearer YOUR_API_KEY'

💡 Tip: The response field in the status API is an array of video URLs. You can directly access data.response[0] to get the video URL.

javascript
1// Extract video URL from response
2const videoUrl = data.response[0];

Responses

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 Playground

Test the API directly from your browser. Replace YOUR_API_KEY with your actual API key.

API PlaygroundPOST

Error Codes

StatusCodeDescription
400 Bad RequestINVALID_PROMPTThe prompt is invalid or empty
400 Bad RequestINVALID_DURATIONDuration out of supported range
400 Bad RequestINVALID_TYPEUnsupported task type
400 Bad RequestMISSING_IMAGEImage is required for image-to-video tasks
400 Bad RequestMISSING_VIDEOVideo is required for video-edit tasks
401 UnauthorizedINVALID_API_KEYAPI key is missing or invalid
402 INSUFFICIENT_CREDITSNot enough credits for this operation
429 Too Many RequestsRATE_LIMITEDToo many requests, please slow down
500 Internal Server ErrorINTERNAL_ERRORServer error, please try again later