kling.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Image Generation
create
imageGeneration.create
Create a text-to-image or image-to-image task
Risk: write
await corsair.kling.api.imageGeneration.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model_name | kling-v2-1 | kling-v3 | No | — |
prompt | string | Yes | — |
negative_prompt | string | No | — |
image | string | No | — |
image_reference | subject | face | No | — |
image_fidelity | number | No | — |
human_fidelity | number | No | — |
element_list | object[] | No | — |
resolution | 1k | 2k | No | — |
n | number | No | — |
aspect_ratio | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | 3:2 | 2:3 | 21:9 | No | — |
watermark_info | object | No | — |
callback_url | string | No | — |
external_task_id | string | No | — |
element_list full type
element_list full type
{
element_id: number
}[]
watermark_info full type
watermark_info full type
{
enabled: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
imageGeneration.get
Fetch an image generation task by id
Risk: read
await corsair.kling.api.imageGeneration.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
imageGeneration.list
List image generation tasks by page
Risk: read
await corsair.kling.api.imageGeneration.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Image To Video
create
imageToVideo.create
Create an image-to-video generation task
Risk: write
await corsair.kling.api.imageToVideo.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model | kling-2.5-turbo | kling-2.6 | kling-3.0 | kling-3.0-turbo | Yes | — |
contents | object[] | Yes | — |
settings | object | No | — |
options | object | No | — |
contents full type
contents full type
{
type: string,
text?: string,
url?: string,
id?: string,
voice_id?: string,
element_id?: string
}[]
settings full type
settings full type
{
resolution?: string,
aspect_ratio?: string,
duration?: number,
audio?: string,
multi_shot?: boolean
}
options full type
options full type
{
callback_url?: string,
external_task_id?: string,
watermark_info?: {
enabled: boolean
}
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
imageToVideo.get
Fetch an image-to-video task by id
Risk: read
await corsair.kling.api.imageToVideo.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
list
imageToVideo.list
List image-to-video and other video tasks by cursor
Risk: read
await corsair.kling.api.imageToVideo.list({});
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | number | No | — |
end_time | string | number | No | — |
cursor | string | No | — |
limit | number | No | — |
filters | object[] | No | — |
filters full type
filters full type
{
key: status | product_type,
values: string[]
}[]
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
result: {
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[],
count?: number,
next_cursor?: string,
has_more?: boolean
}
Lip Sync
create
lipSync.create
Create a lip-sync task for a detected face
Risk: write
await corsair.kling.api.lipSync.create({});
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | — |
face_choose | object[] | Yes | — |
watermark_info | object | No | — |
callback_url | string | No | — |
external_task_id | string | No | — |
face_choose full type
face_choose full type
{
face_id: string,
audio_id?: string,
sound_file?: string,
sound_start_time: number,
sound_end_time: number,
sound_insert_time: number,
sound_volume?: number,
original_audio_volume?: number
}[]
watermark_info full type
watermark_info full type
{
enabled: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
detectFace
lipSync.detectFace
Identify faces in a video for lip-sync processing
Risk: write
await corsair.kling.api.lipSync.detectFace({});
| Name | Type | Required | Description |
|---|---|---|---|
video_id | string | No | — |
video_url | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
session_id: string,
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
face_data?: {
face_id?: string,
face_image?: string,
start_time?: number,
end_time?: number
}[]
}
get
lipSync.get
Fetch a lip-sync task by id
Risk: read
await corsair.kling.api.lipSync.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
lipSync.list
List lip-sync tasks by page
Risk: read
await corsair.kling.api.lipSync.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Motion Control
create
motionControl.create
Create a motion-control task from a motion reference
Risk: write
await corsair.kling.api.motionControl.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model | kling-2.6 | kling-3.0 | Yes | — |
contents | object[] | Yes | — |
settings | object | Yes | — |
options | object | No | — |
contents full type
contents full type
{
type: string,
text?: string,
url?: string,
id?: string,
voice_id?: string,
element_id?: string
}[]
settings full type
settings full type
{
character_orientation: image | video,
resolution?: string,
aspect_ratio?: string,
duration?: number,
audio?: string,
multi_shot?: boolean
}
options full type
options full type
{
callback_url?: string,
external_task_id?: string,
watermark_info?: {
enabled: boolean
}
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
motionControl.get
Fetch a motion-control task by id
Risk: read
await corsair.kling.api.motionControl.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
list
motionControl.list
List motion-control and other video tasks by cursor
Risk: read
await corsair.kling.api.motionControl.list({});
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | number | No | — |
end_time | string | number | No | — |
cursor | string | No | — |
limit | number | No | — |
filters | object[] | No | — |
filters full type
filters full type
{
key: status | product_type,
values: string[]
}[]
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
result: {
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[],
count?: number,
next_cursor?: string,
has_more?: boolean
}
Multi Image To Image
create
multiImageToImage.create
Create a multi-image (subject, scene, style) task
Risk: write
await corsair.kling.api.multiImageToImage.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model_name | kling-v2-1 | No | — |
prompt | string | No | — |
subject_image_list | object[] | Yes | — |
scene_image | string | No | — |
style_image | string | No | — |
n | number | No | — |
aspect_ratio | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | 3:2 | 2:3 | 21:9 | No | — |
watermark_info | object | No | — |
callback_url | string | No | — |
external_task_id | string | No | — |
subject_image_list full type
subject_image_list full type
{
subject_image: string
}[]
watermark_info full type
watermark_info full type
{
enabled: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
multiImageToImage.get
Fetch a multi-image task by id
Risk: read
await corsair.kling.api.multiImageToImage.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
multiImageToImage.list
List multi-image tasks by page
Risk: read
await corsair.kling.api.multiImageToImage.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Omni Image
create
omniImage.create
Create an omni-image generation task
Risk: write
await corsair.kling.api.omniImage.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model_name | kling-image-o1 | kling-v3-omni | No | — |
prompt | string | Yes | — |
image_list | object[] | No | — |
element_list | object[] | No | — |
resolution | 1k | 2k | 4k | No | — |
result_type | single | series | No | — |
n | number | No | — |
series_amount | number | auto | No | — |
aspect_ratio | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | 3:2 | 2:3 | 21:9 | auto | No | — |
watermark_info | object | No | — |
callback_url | string | No | — |
external_task_id | string | No | — |
image_list full type
image_list full type
{
image: string
}[]
element_list full type
element_list full type
{
element_id: number
}[]
watermark_info full type
watermark_info full type
{
enabled: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
omniImage.get
Fetch an omni-image task by id
Risk: read
await corsair.kling.api.omniImage.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
omniImage.list
List omni-image tasks by page
Risk: read
await corsair.kling.api.omniImage.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Omni Video
create
omniVideo.create
Create an omni-video generation task
Risk: write
await corsair.kling.api.omniVideo.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model | kling-3.0-omni | kling-o1 | Yes | — |
contents | object[] | Yes | — |
settings | object | No | — |
options | object | No | — |
contents full type
contents full type
{
type: string,
text?: string,
url?: string,
id?: string,
voice_id?: string,
element_id?: string
}[]
settings full type
settings full type
{
resolution?: string,
aspect_ratio?: string,
duration?: number,
audio?: string,
multi_shot?: boolean
}
options full type
options full type
{
callback_url?: string,
external_task_id?: string,
watermark_info?: {
enabled: boolean
}
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
omniVideo.get
Fetch an omni-video task by id
Risk: read
await corsair.kling.api.omniVideo.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
list
omniVideo.list
List omni-video and other video tasks by cursor
Risk: read
await corsair.kling.api.omniVideo.list({});
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | number | No | — |
end_time | string | number | No | — |
cursor | string | No | — |
limit | number | No | — |
filters | object[] | No | — |
filters full type
filters full type
{
key: status | product_type,
values: string[]
}[]
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
result: {
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[],
count?: number,
next_cursor?: string,
has_more?: boolean
}
Outpainting
create
outpainting.create
Create an image outpainting (expand) task
Risk: write
await corsair.kling.api.outpainting.create({});
| Name | Type | Required | Description |
|---|---|---|---|
image | string | Yes | — |
up_expansion_ratio | number | Yes | — |
down_expansion_ratio | number | Yes | — |
left_expansion_ratio | number | Yes | — |
right_expansion_ratio | number | Yes | — |
prompt | string | No | — |
n | number | No | — |
watermark_info | object | No | — |
callback_url | string | No | — |
external_task_id | string | No | — |
watermark_info full type
watermark_info full type
{
enabled: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
outpainting.get
Fetch an outpainting task by id
Risk: read
await corsair.kling.api.outpainting.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
outpainting.list
List outpainting tasks by page
Risk: read
await corsair.kling.api.outpainting.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Text To Video
create
textToVideo.create
Create a text-to-video generation task
Risk: write
await corsair.kling.api.textToVideo.create({});
| Name | Type | Required | Description |
|---|---|---|---|
model | kling-2.5-turbo | kling-2.6 | kling-3.0 | kling-3.0-turbo | Yes | — |
prompt | string | Yes | — |
settings | object | No | — |
options | object | No | — |
settings full type
settings full type
{
resolution?: string,
aspect_ratio?: string,
duration?: number,
audio?: string,
multi_shot?: boolean
}
options full type
options full type
{
callback_url?: string,
external_task_id?: string,
watermark_info?: {
enabled: boolean
}
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
textToVideo.get
Fetch a text-to-video task by id
Risk: read
await corsair.kling.api.textToVideo.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
list
textToVideo.list
List text-to-video and other video tasks by cursor
Risk: read
await corsair.kling.api.textToVideo.list({});
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | number | No | — |
end_time | string | number | No | — |
cursor | string | No | — |
limit | number | No | — |
filters | object[] | No | — |
filters full type
filters full type
{
key: status | product_type,
values: string[]
}[]
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
result: {
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[],
count?: number,
next_cursor?: string,
has_more?: boolean
}
Video Effects
create
videoEffects.create
Create a video effect task from a scene template
Risk: write
await corsair.kling.api.videoEffects.create({});
| Name | Type | Required | Description |
|---|---|---|---|
effect_scene | string | Yes | — |
input | object | Yes | — |
callback_url | string | No | — |
external_task_id | string | No | — |
input full type
input full type
{
image?: string,
images?: string[]
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
videoEffects.get
Fetch a video effect task by id
Risk: read
await corsair.kling.api.videoEffects.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}
list
videoEffects.list
List video effect tasks by page
Risk: read
await corsair.kling.api.videoEffects.list({});
| Name | Type | Required | Description |
|---|---|---|---|
pageNum | number | No | — |
pageSize | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
Virtual Try On
create
virtualTryOn.create
Create a virtual try-on task for a product and person
Risk: write
await corsair.kling.api.virtualTryOn.create({});
| Name | Type | Required | Description |
|---|---|---|---|
contents | object[] | Yes | — |
settings | object | No | — |
options | object | No | — |
contents full type
contents full type
{
type: product_image | person_image,
url: string
}[]
settings full type
settings full type
{
keep_face?: boolean,
keep_pose?: boolean,
keep_background?: boolean
}
options full type
options full type
{
callback_url?: string,
external_task_id?: string,
watermark?: {
enabled: boolean
}
}
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
task_info?: {
external_task_id?: string
}
}
get
virtualTryOn.get
Fetch a virtual try-on task by id
Risk: read
await corsair.kling.api.virtualTryOn.get({});
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object[] | Yes | — |
data full type
data full type
{
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[]
list
virtualTryOn.list
List virtual try-on tasks by cursor
Risk: read
await corsair.kling.api.virtualTryOn.list({});
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | number | No | — |
end_time | string | number | No | — |
cursor | string | No | — |
limit | number | No | — |
filters | object[] | No | — |
filters full type
filters full type
{
key: status,
values: string[]
}[]
| Name | Type | Required | Description |
|---|---|---|---|
code | number | Yes | — |
message | string | No | — |
request_id | string | No | — |
data | object | Yes | — |
data full type
data full type
{
result: {
id?: string,
task_id?: string,
status?: string,
task_status?: string,
message?: string,
task_status_msg?: string,
create_time?: number,
update_time?: number,
created_at?: number,
updated_at?: number,
external_id?: string,
outputs?: {
type: string,
id?: string,
url?: string,
watermark_url?: string,
duration?: string,
group_id?: string,
mp3_url?: string,
wav_url?: string,
mp3_duration?: string,
wav_duration?: string,
name?: string,
owned_by?: string,
status?: string
}[],
billing?: {
charge_type?: string,
cash_type?: string,
amount?: string,
currency?: string,
package_type?: string,
list_price?: string
}[],
final_unit_deduction?: string,
final_balance_deduction?: {
quota?: string,
list_price?: string
},
watermark_info?: {
enabled: boolean
},
task_info?: {
external_task_id?: string
},
task_result?: {
images?: {
index?: number,
url?: string,
watermark_url?: string
}[],
videos?: {
id?: string,
url?: string,
watermark_url?: string,
duration?: string
}[]
}
}[],
count?: number,
next_cursor?: string,
has_more?: boolean
}