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
curl -X POST 'https://kling3api.com/api/generate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "pro-text-to-video",
    "prompt": "A cinematic shot of mountains at sunrise",
    "duration": 5,
    "aspect_ratio": "16: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.

http
Authorization: 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 generation5s / 10s240 / 480
pro-image-to-videoPro quality image-to-video animation5s / 10s240 / 480
std-text-to-videoStandard quality text-to-video5s / 10s180 / 360
std-image-to-videoStandard quality image-to-video5s / 10s180 / 360
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

ParameterTypeRequiredDescription
typestringRequiredTask type (e.g., pro-text-to-video, o3-pro-reference-to-video)
promptstringRequiredText description of the video to generate (max 2000 chars)
durationnumberOptionalVideo duration in seconds. Kling 3.0: 5 or 10. O3: 3-15. (Default: 5)
aspect_ratiostringOptionalOutput aspect ratio (16:9, 9:16, 1:1) (Default: 16:9)
imagestringOptionalImage URL for image-to-video tasks
end_imagestringOptionalEnd frame image URL (image-to-video only)
videostringOptionalVideo URL for reference-to-video or video-edit tasks
imagesstring[]OptionalArray of reference image URLs (O3 reference-to-video, max 7)
soundbooleanOptionalEnable native audio generation (Default: false)
negative_promptstringOptionalNegative prompt to avoid certain elements
cfg_scalenumberOptionalPrompt adherence (0-1, Kling 3.0 only) (Default: 0.5)

Kling 3.0 - Text to Video

json
{
  "type": "pro-text-to-video",
  "prompt": "A majestic eagle soaring through clouds at sunset",
  "duration": 5,
  "aspect_ratio": "16:9",
  "sound": true
}

Kling 3.0 - Image to Video

json
{
  "type": "pro-image-to-video",
  "prompt": "The character slowly turns and smiles",
  "image": "https://example.com/my-image.jpg",
  "duration": 5
}

Kling O3 - Reference to Video

json
{
  "type": "o3-pro-reference-to-video",
  "prompt": "The character walks through a futuristic city",
  "images": [
    "https://example.com/character-reference.jpg",
    "https://example.com/style-reference.jpg"
  ],
  "duration": 5,
  "aspect_ratio": "16:9"
}

Kling O3 - Video Edit

json
{
  "type": "o3-pro-video-edit",
  "prompt": "Change the background to a snowy mountain landscape",
  "video": "https://example.com/original-video.mp4",
  "keep_original_sound": true
}

Responses

Task created successfully

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "n70abc123kling3",
    "status": "IN_PROGRESS",
    "consumed_credits": 240
  }
}
GET/api/status

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