Kling
App · 19 actions
Kling text/image video, extension, lip sync and image jobs.
Actions
| Action | What it does |
|---|---|
| Create extend video task | Create extend video task. |
| Create image task | Create image task. |
| Create image video task | Create image video task. |
| Create lip sync task | Create lip sync task. |
| Create multi image task | Create multi image task. |
| Create text video task | Create text video task. |
| Get extend video task | Get extend video task. |
| Get image task | Get image task. |
| Get image video task | Get image video task. |
| Get lip sync task | Get lip sync task. |
| Get multi image task | Get multi image task. |
| Get text video task | Get text video task. |
| Get usage | Get usage. |
| List extend video tasks | List extend video tasks. |
| List image tasks | List image tasks. |
| List image video tasks | List image video tasks. |
| List lip sync tasks | List lip sync tasks. |
| List multi image tasks | List multi image tasks. |
| List text video tasks | List text video tasks. |
Create extend video task
Create extend video task.
Inputs
- Video id
video_idtextRequired - The ID of a retained video generated with Kling V1.0, V1.5 or V1.6. Other model versions cannot be extended by this endpoint.
- Prompt
prompttext - Text Prompt
- Negative prompt
negative_prompttext - Negative text prompt
- Cfg scale
cfg_scalenumber - Prompt reference strength. The higher the value, the stronger the reference to the prompt.
- Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- Callback url
callback_urltext - The callback notification address for the task results. If configured, the server will actively notify when the task status changes.
- External task id
external_task_idtext - Customized Task ID
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Create image task
Create image task.
Inputs
- Model name
model_nametext - Model NameOne of:
kling-v2-1,kling-v3. - Prompt
prompttextRequired - Positive text prompt
- Negative prompt
negative_prompttext - Negative text prompt
- Image
imagetext - Reference Image
- Image reference
image_referencetext - Image reference typeOne of:
subject,face. - Image fidelity
image_fidelitynumber - Face reference intensity for user-uploaded images during generation
- Human fidelity
human_fidelitynumber - Facial reference intensity, refers to the similarity of the facial features of the person in the reference image
- Element list
element_listlist - Reference element list based on element library ID
- Resolution
resolutiontext - Image generation resolutionOne of:
1k,2k. - N
nnumber - Number of generated images
- Aspect ratio
aspect_ratiotext - Aspect ratio of the generated images (width:height)One of:
16:9,9:16,1:1,4:3,3:4,3:2,2:3,21:9. - Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- Callback url
callback_urltext - The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes.
- External task id
external_task_idtext - Customized Task ID
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Create image video task
Create image video task.
Inputs
- Model name
model_nametextRequired - Model NameOne of:
kling-v2-5-turbo,kling-v2-6,kling-v3. - Image
imagetext - Reference Image
- Image tail
image_tailtext - Reference Image - End frame control
- Multi shot
multi_shottrue/false - Whether to generate multi-shot video
- Shot type
shot_typetext - Storyboard methodOne of:
customize,intelligence. - Prompt
prompttext - Positive text prompt
- Multi prompt
multi_promptlist - Information about each storyboard, such as prompts and duration
- Negative prompt
negative_prompttext - Negative text prompt
- Element list
element_listlist - Reference Element List, based on element ID from element library
- Voice list
voice_listlist - List of voices referenced when generating videos
- Sound
soundtext - Whether to generate sound when generating videoOne of:
on,off. - Cfg scale
cfg_scalenumber - Flexibility in video generation; higher value means lower model flexibility and stronger relevance to user prompt
- Mode
modetext - Video generation modeOne of:
std,pro,4k. - Static mask
static_masktext - Static brush mask area (mask image created by user using motion brush)
- Dynamic masks
dynamic_maskslist - Dynamic brush configuration list
- Camera control
camera_controlobject - Camera movement control protocol (if not specified, model will intelligently match based on input text/images)
- Duration
durationtext - Video duration in secondsOne of:
3,4,5,6,7,8,9,10,11,12, and 3 more. - Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- Callback url
callback_urltext - Callback notification URL for task result. If configured, server will notify when task status changes.
- External task id
external_task_idtext - Customized Task ID
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Create lip sync task
Create lip sync task.
Inputs
- Session id
session_idtextRequired - Session ID generated during the identify face API. It remains unchanged during the selection/editing process.
- Face choose
face_chooselistRequired - Specified Face for Lip-Sync
- Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- External task id
external_task_idtext - Custom Task ID
- Callback url
callback_urltext - The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Create multi image task
Create multi image task.
Inputs
- Model name
model_nametext - Model NameOne of:
kling-v2-1. - Prompt
prompttext - Positive text prompt
- Subject image list
subject_image_listlistRequired - One to four cropped subject images, each with a subject_image URL or raw base64 value.
- Scene image
scene_imagetext - Scene Reference Image
- Style image
style_imagetext - Style Reference Image
- N
nnumber - Number of generated images
- Aspect ratio
aspect_ratiotext - Aspect ratio of the generated images (width:height)One of:
16:9,9:16,1:1,4:3,3:4,3:2,2:3,21:9. - Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- Callback url
callback_urltext - The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes
- External task id
external_task_idtext - Customized Task ID
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Create text video task
Create text video task.
Inputs
- Model name
model_nametextRequired - Model NameOne of:
kling-v2-5-turbo,kling-v2-6,kling-v3. - Multi shot
multi_shottrue/false - Whether to generate multi-shot video
- Shot type
shot_typetext - Storyboard methodOne of:
customize,intelligence. - Prompt
prompttext - Positive text prompt
- Multi prompt
multi_promptlist - Each storyboard cue can include both positive and negative descriptions
- Negative prompt
negative_prompttext - Negative text prompt
- Sound
soundtext - Is sound generated simultaneously when generating videosOne of:
on,off. - Cfg scale
cfg_scalenumber - The degree of freedom for generating video; the larger the value, the smaller the degree of freedom of the model
- Mode
modetext - Video generation modeOne of:
std,pro,4k. - Camera control
camera_controlobject - Terms of controlling camera movement (if not specified, the model will intelligently match based on the input text/images)
- Aspect ratio
aspect_ratiotext - The aspect ratio of the generated video frame (width:height)One of:
16:9,9:16,1:1. - Duration
durationtext - Video Length, unit: s (seconds)One of:
3,4,5,6,7,8,9,10,11,12, and 3 more. - Watermark info
watermark_infoobject - Whether to generate watermarked results simultaneously
- Callback url
callback_urltext - Callback notification URL for this task result. If configured, the server will actively notify when the task status changes
- External task id
external_task_idtext - Customized Task ID
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get extend video task
Get extend video task.
Inputs
- Task id
task_idtext - Task ID for Video Generation. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
- External task id
external_task_idtext - Customized Task ID for Video Generation. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"videos": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get image task
Get image task.
Inputs
- Task id
task_idtext - The task ID for image generation. Request path parameter, directly fill the value in the request path. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
- External task id
external_task_idtext - Customized Task ID for image generation. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"images": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get image video task
Get image video task.
Inputs
- Task id
task_idtext - Task ID for image to video. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
- External task id
external_task_idtext - Customized Task ID for image to video. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"videos": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get lip sync task
Get lip sync task.
Inputs
- Task id
task_idtext - Task ID for Video Generation - Lip-Sync. Fill the value directly in the request path.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"videos": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get multi image task
Get multi image task.
Inputs
- Task id
task_idtext - The task ID for image generation. Request path parameter, directly fill the value in the request path. Query by external_task_id or task_id. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
- External task id
external_task_idtext - Customized Task ID for image generation. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"images": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get text video task
Get text video task.
Inputs
- Task id
task_idtext - Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
- External task id
external_task_idtext - Customized Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying. Use either task_id or external_task_id as the {id} path parameter; exactly one is required.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": {
"created_at": 1,
"task_id": "example",
"task_info": {
"external_task_id": "example"
},
"task_result": {
"videos": []
},
"task_status": "submitted",
"task_status_msg": "example",
"updated_at": 1
},
"message": "example",
"request_id": "example"
}
}Get usage
Get usage.
Inputs
- Start time
start_timedate and timeRequired - Start time.
- End time
end_timedate and timeRequired - End time.
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 1,
"data": {},
"message": "example"
}
}List extend video tasks
List extend video tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Number of items per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}List image tasks
List image tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Number of items per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}List image video tasks
List image video tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Data volume per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}List lip sync tasks
List lip sync tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Number of items per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}List multi image tasks
List multi image tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Number of items per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}List text video tasks
List text video tasks.
Inputs
- Page Num
pageNumnumber - Page number
- Page Size
pageSizenumber - Number of items per page
Outputs
dataobject- Api result.
Example output
{
"data": {
"code": 0,
"data": [],
"message": "example",
"request_id": "example"
}
}