Kling

App · 19 actions

Kling text/image video, extension, lip sync and image jobs.

Actions

ActionWhat it does
Create extend video taskCreate extend video task.
Create image taskCreate image task.
Create image video taskCreate image video task.
Create lip sync taskCreate lip sync task.
Create multi image taskCreate multi image task.
Create text video taskCreate text video task.
Get extend video taskGet extend video task.
Get image taskGet image task.
Get image video taskGet image video task.
Get lip sync taskGet lip sync task.
Get multi image taskGet multi image task.
Get text video taskGet text video task.
Get usageGet usage.
List extend video tasksList extend video tasks.
List image tasksList image tasks.
List image video tasksList image video tasks.
List lip sync tasksList lip sync tasks.
List multi image tasksList multi image tasks.
List text video tasksList text video tasks.

Create extend video task

Create extend video task.

Inputs

Video idvideo_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.
Promptprompttext
Text Prompt
Negative promptnegative_prompttext
Negative text prompt
Cfg scalecfg_scalenumber
Prompt reference strength. The higher the value, the stronger the reference to the prompt.
Watermark infowatermark_infoobject
Whether to generate watermarked results simultaneously
Callback urlcallback_urltext
The callback notification address for the task results. If configured, the server will actively notify when the task status changes.
External task idexternal_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 namemodel_nametext
Model NameOne of: kling-v2-1, kling-v3.
PromptprompttextRequired
Positive text prompt
Negative promptnegative_prompttext
Negative text prompt
Imageimagetext
Reference Image
Image referenceimage_referencetext
Image reference typeOne of: subject, face.
Image fidelityimage_fidelitynumber
Face reference intensity for user-uploaded images during generation
Human fidelityhuman_fidelitynumber
Facial reference intensity, refers to the similarity of the facial features of the person in the reference image
Element listelement_listlist
Reference element list based on element library ID
Resolutionresolutiontext
Image generation resolutionOne of: 1k, 2k.
Nnnumber
Number of generated images
Aspect ratioaspect_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 infowatermark_infoobject
Whether to generate watermarked results simultaneously
Callback urlcallback_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 idexternal_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 namemodel_nametextRequired
Model NameOne of: kling-v2-5-turbo, kling-v2-6, kling-v3.
Imageimagetext
Reference Image
Image tailimage_tailtext
Reference Image - End frame control
Multi shotmulti_shottrue/false
Whether to generate multi-shot video
Shot typeshot_typetext
Storyboard methodOne of: customize, intelligence.
Promptprompttext
Positive text prompt
Multi promptmulti_promptlist
Information about each storyboard, such as prompts and duration
Negative promptnegative_prompttext
Negative text prompt
Element listelement_listlist
Reference Element List, based on element ID from element library
Voice listvoice_listlist
List of voices referenced when generating videos
Soundsoundtext
Whether to generate sound when generating videoOne of: on, off.
Cfg scalecfg_scalenumber
Flexibility in video generation; higher value means lower model flexibility and stronger relevance to user prompt
Modemodetext
Video generation modeOne of: std, pro, 4k.
Static maskstatic_masktext
Static brush mask area (mask image created by user using motion brush)
Dynamic masksdynamic_maskslist
Dynamic brush configuration list
Camera controlcamera_controlobject
Camera movement control protocol (if not specified, model will intelligently match based on input text/images)
Durationdurationtext
Video duration in secondsOne of: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and 3 more.
Watermark infowatermark_infoobject
Whether to generate watermarked results simultaneously
Callback urlcallback_urltext
Callback notification URL for task result. If configured, server will notify when task status changes.
External task idexternal_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 idsession_idtextRequired
Session ID generated during the identify face API. It remains unchanged during the selection/editing process.
Face chooseface_chooselistRequired
Specified Face for Lip-Sync
Watermark infowatermark_infoobject
Whether to generate watermarked results simultaneously
External task idexternal_task_idtext
Custom Task ID
Callback urlcallback_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 namemodel_nametext
Model NameOne of: kling-v2-1.
Promptprompttext
Positive text prompt
Subject image listsubject_image_listlistRequired
One to four cropped subject images, each with a subject_image URL or raw base64 value.
Scene imagescene_imagetext
Scene Reference Image
Style imagestyle_imagetext
Style Reference Image
Nnnumber
Number of generated images
Aspect ratioaspect_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 infowatermark_infoobject
Whether to generate watermarked results simultaneously
Callback urlcallback_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 idexternal_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 namemodel_nametextRequired
Model NameOne of: kling-v2-5-turbo, kling-v2-6, kling-v3.
Multi shotmulti_shottrue/false
Whether to generate multi-shot video
Shot typeshot_typetext
Storyboard methodOne of: customize, intelligence.
Promptprompttext
Positive text prompt
Multi promptmulti_promptlist
Each storyboard cue can include both positive and negative descriptions
Negative promptnegative_prompttext
Negative text prompt
Soundsoundtext
Is sound generated simultaneously when generating videosOne of: on, off.
Cfg scalecfg_scalenumber
The degree of freedom for generating video; the larger the value, the smaller the degree of freedom of the model
Modemodetext
Video generation modeOne of: std, pro, 4k.
Camera controlcamera_controlobject
Terms of controlling camera movement (if not specified, the model will intelligently match based on the input text/images)
Aspect ratioaspect_ratiotext
The aspect ratio of the generated video frame (width:height)One of: 16:9, 9:16, 1:1.
Durationdurationtext
Video Length, unit: s (seconds)One of: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and 3 more.
Watermark infowatermark_infoobject
Whether to generate watermarked results simultaneously
Callback urlcallback_urltext
Callback notification URL for this task result. If configured, the server will actively notify when the task status changes
External task idexternal_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 idtask_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 idexternal_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 idtask_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 idexternal_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 idtask_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 idexternal_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 idtask_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 idtask_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 idexternal_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 idtask_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 idexternal_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 timestart_timedate and timeRequired
Start time.
End timeend_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 NumpageNumnumber
Page number
Page SizepageSizenumber
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 NumpageNumnumber
Page number
Page SizepageSizenumber
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 NumpageNumnumber
Page number
Page SizepageSizenumber
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 NumpageNumnumber
Page number
Page SizepageSizenumber
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 NumpageNumnumber
Page number
Page SizepageSizenumber
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 NumpageNumnumber
Page number
Page SizepageSizenumber
Number of items per page

Outputs

dataobject
Api result.
Example output
{
  "data": {
    "code": 0,
    "data": [],
    "message": "example",
    "request_id": "example"
  }
}

On this page