English
English
Appearance
English
English
Appearance
kling-v2-6kling-video and the image model kling-imagekling uses the official APItext-to-image image-to-image text-to-video image-to-videoOnline Test section belowOnline Test 1. Visit https://kling.ddaiai.com (if blocked, try changing the subdomain prefix to suibian)
2. If you find it blocked, you can change the address yourself โ replace suibian in https://suibian.ddaiai.com with something else, e.g. https://20245.ddaiai.com โ all variants work


kling-v1 at 5s duration in std mode is the base price10s duration costs 2x the base pricepro mode costs 3.5x the base pricekling-v1-5 and kling-v1-6 cost 2x the base pricekling-v2-master costs 10x the base pricekling-v1-5 at 10s in pro mode = base price x2 x3.510s duration costs 2x the base priceAuthorization: Bearer hk-your-keycurl --request POST \
--url https://api.openai-hk.com/kling/v1/images/generations \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"prompt": "ๆผซ็ปๅ
ๅญๅ่",
"negative_prompt":''
,"image":''
,"image_fidelity":0.5
,"n":1
,"aspect_ratio":"4:3"
,"notify_hook":""
}'curl --request POST \
--url https://api.openai-hk.com/kling/v1/images/generations \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"prompt": "ๆผซ็ปๅ
ๅญๅ่",
"negative_prompt":''
,"image":''
,"image_fidelity":0.5
,"n":1
,"aspect_ratio":"4:3"
,"notify_hook":""
}'Parameter descriptions
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Positive text prompt โ required, max 500 characters |
| negative_prompt | string | Negative text prompt โ optional, max 200 characters |
| image | string | Reference image โ optional, supports Base64 or image URL, supports .jpg / .jpeg / .png, max 10MB |
| image_fidelity | number | Reference strength for the uploaded image during generation โ optional, range: [0,1] |
| n | number | Number of images to generate โ optional, range: [1,9] |
| aspect_ratio | string | Aspect ratio of the generated image โ optional, values: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 |
| notify_hook | string | Notification callback URL โ optional, no notification if omitted |
Response body
{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}The returned data.task_id is used to query the result.
curl --request POST \
--url https://api.openai-hk.com/kling/v1/videos/text2video \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"prompt": "ๅคช็ฉบ้ฃ่นๅจ่ช่ก"
}'curl --request POST \
--url https://api.openai-hk.com/kling/v1/videos/text2video \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"prompt": "ๅคช็ฉบ้ฃ่นๅจ่ช่ก"
}'Request body โ full format
{
"model_name": "kling-v1",
"prompt": "ๅคช็ฉบ้ฃ่นๅจ่ช่ก",
"negative_prompt": "",
"cfg_scale": 0,
"mode": "std",
"aspect_ratio": "1:1",
"duration": "5",
"camera_control": {
"type": "simple",
"config": {
"horizontal": 1 //only one can be set at a time, and it cannot be 0
// "vertical": 1,
// "pan": 1,
// "tilt": -1,
// "roll": 1,
// "zoom": -1
}
},
"notify_hook": ""
}{
"model_name": "kling-v1",
"prompt": "ๅคช็ฉบ้ฃ่นๅจ่ช่ก",
"negative_prompt": "",
"cfg_scale": 0,
"mode": "std",
"aspect_ratio": "1:1",
"duration": "5",
"camera_control": {
"type": "simple",
"config": {
"horizontal": 1 //only one can be set at a time, and it cannot be 0
// "vertical": 1,
// "pan": 1,
// "tilt": -1,
// "roll": 1,
// "zoom": -1
}
},
"notify_hook": ""
}Notes
| Parameter | Type | Description |
|---|---|---|
| model_name | string | Model name โ values: kling-v1 kling-v2-master kling-v1-5 kling-v1-6 kling-v2-6 |
| prompt | string | Positive text prompt โ required, max 500 characters |
| sound | string | Default is off. off: no audio, on: with audio. Only supported by kling-v2-6; audio costs 2x the base price |
| negative_prompt | string | Negative text prompt โ optional, max 200 characters |
| cfg_scale | number | Reference strength for the uploaded image during generation โ optional, range: [0,1] |
| mode | string | Generation mode โ optional, values: std (high performance), pro (high quality); not supported by kling-v2-master |
| aspect_ratio | string | Aspect ratio โ optional, values: 16:9, 9:16, 1:1 |
| duration | string | Video duration โ optional, in seconds |
| camera_control | Object | Protocol for controlling camera movement โ optional; if not specified, auto-matched. As of 20240809: camera control is only supported for 5s + std mode |
| camera_control.type | string | Optional, values: simple down_back forward_up right_turn_forward left_turn_forward โ see details below |
| camera_control.config | Object | Contains six fields for specifying camera movement or changes |
| camera_control.config.horizontal | int | Horizontal dolly โ optional, range: [-10, 10] |
| camera_control.config.vertical | int | Vertical dolly โ optional, range: [-10, 10] |
| camera_control.config.pan | int | Horizontal pan โ optional, range: [-10, 10] |
| camera_control.config.tilt | int | Vertical tilt โ optional, range: [-10, 10] |
| camera_control.config.roll | int | Roll โ optional, range: [-10, 10] |
| camera_control.config.zoom | int | Zoom โ optional, range: [-10, 10] |
| notify_hook | string | Notification callback URL โ optional, no notification if omitted |
camera_control.type parameter descriptions
| Parameter | Description |
|---|---|
| simple | Simple camera movement โ choose one of the six options in "config" |
| down_back | Camera tilts down and pulls back โ no config needed |
| forward_up | Camera moves forward and tilts up โ no config needed |
| right_turn_forward | Camera turns right then moves forward โ no config needed |
| left_turn_forward | Camera turns left then moves forward โ no config needed |
Response body
{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}The returned data.task_id is used to query the result.
curl --request POST \
--url https://api.openai-hk.com/kling/v1/videos/image2video \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"image": "https://pics2.baidu.com/feed/fc1f4134970a304e8662f052c91a3188c8175c32.jpeg"
}'curl --request POST \
--url https://api.openai-hk.com/kling/v1/videos/image2video \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"image": "https://pics2.baidu.com/feed/fc1f4134970a304e8662f052c91a3188c8175c32.jpeg"
}'Request body โ full format
{
"image": "https://pics2.baidu.com/feed/fc1f4134970a304e8662f052c91a3188c8175c32.jpeg",
"image_tail": "",
"prompt": "",
"negative_prompt": "",
"cfg_scale": 0,
"mode": "std",
"aspect_ratio": "1:1",
"duration": "5",
"notify_hook": ""
}{
"image": "https://pics2.baidu.com/feed/fc1f4134970a304e8662f052c91a3188c8175c32.jpeg",
"image_tail": "",
"prompt": "",
"negative_prompt": "",
"cfg_scale": 0,
"mode": "std",
"aspect_ratio": "1:1",
"duration": "5",
"notify_hook": ""
}Parameter descriptions
| Parameter | Type | Description |
|---|---|---|
| model_name | string | Model name โ values: kling-v1, kling-v1-5, kling-v1-6 |
| image | string | Reference image โ required, supports Base64 or image URL, supports .jpg / .jpeg / .png, max 10MB, min resolution 300x300px |
| image_tail | string | Reference image for the last frame โ optional, supports Base64 or image URL, supports .jpg / .jpeg / .png, max 10MB, min resolution 300x300px |
| prompt | string | Positive text prompt โ optional, max 500 characters |
| negative_prompt | string | Negative text prompt โ optional, max 200 characters |
| cfg_scale | number | Reference strength for the uploaded image during generation โ optional, range: [0,1] |
| mode | string | Generation mode โ optional, values: std (high performance), pro (high quality) |
| aspect_ratio | string | Aspect ratio โ optional, values: 16:9, 9:16, 1:1 |
| duration | string | Video duration โ optional, in seconds |
| notify_hook | string | Notification callback URL โ optional, no notification if omitted |
Response body
{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"data": {
"task_id": "Cl6Mq2bftxoAAAAAAA_SxQ",
"task_status": "submitted",
"created_at": 1725974776706,
"updated_at": 1725974776706
}
}The returned data.task_id is used to query the result.
get https://api.openai-hk.com/kling/v1/{act1}/{act2}/{task_id}
| Parameter | Required | Description |
|---|---|---|
| act1 | Yes | images (text-to-image) or videos |
| act2 | Yes | generations (text-to-image), text2video, image2video |
| task_id | Yes | The data.task_id returned from the creation request |
Response body
{
"code": 0,
"message": "ๆๅ",
"request_id": "Clo_MGbfunoAAAAAABB5XA",
"data": {
"task_id": "Clo_MGbfunoAAAAAABB5XA",
"task_status": "succeed",
"task_status_msg": "",
"created_at": 1725977118293,
"updated_at": 1725977125849,
"task_result": {
"images": [
{
"index": 0,
"url": "https://cdn.klingai.com/bs2/upload-kling-api/9575341070/image/Clo_MGbfunoAAAAAABB5XA-0_raw_image_0.png"
}
],
"videos": null
}
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "Clo_MGbfunoAAAAAABB5XA",
"data": {
"task_id": "Clo_MGbfunoAAAAAABB5XA",
"task_status": "succeed",
"task_status_msg": "",
"created_at": 1725977118293,
"updated_at": 1725977125849,
"task_result": {
"images": [
{
"index": 0,
"url": "https://cdn.klingai.com/bs2/upload-kling-api/9575341070/image/Clo_MGbfunoAAAAAABB5XA-0_raw_image_0.png"
}
],
"videos": null
}
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "CmZ4r2bfunIAAAAAABDEJw",
"data": {
"task_id": "CmZ4r2bfunIAAAAAABDEJw",
"task_status": "succeed",
"task_status_msg": "",
"created_at": 1725977783786,
"updated_at": 1725978074639,
"task_result": {
"images": null,
"videos": [
{
"id": "cb6a5273-e12b-4731-98e7-c6fd45302027",
"url": "https://cdn.klingai.com/bs2/upload-kling-api/9575341070/text2video/CmZ4r2bfunIAAAAAABDEJw-0_raw_video_1.mp4",
"duration": "5.1"
}
]
}
}
}{
"code": 0,
"message": "ๆๅ",
"request_id": "CmZ4r2bfunIAAAAAABDEJw",
"data": {
"task_id": "CmZ4r2bfunIAAAAAABDEJw",
"task_status": "succeed",
"task_status_msg": "",
"created_at": 1725977783786,
"updated_at": 1725978074639,
"task_result": {
"images": null,
"videos": [
{
"id": "cb6a5273-e12b-4731-98e7-c6fd45302027",
"url": "https://cdn.klingai.com/bs2/upload-kling-api/9575341070/text2video/CmZ4r2bfunIAAAAAABDEJw-0_raw_video_1.mp4",
"duration": "5.1"
}
]
}
}
}mode is pro, the price multiplier is 4/3video_list contains a video reference, the price multiplier is 1.5mode = pro, duration 5s, with video reference = 4/3 * 9000 * 1.5 * 5 = 90,000 credits{
"prompt": "ๅคง้ช็บท้ฃ",
"model_name": "kling-video-o1",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"notify_hook": "https://pdf2.openai-hk.com/test/2024/mqrunway"
}{
"prompt": "ๅคง้ช็บท้ฃ",
"model_name": "kling-video-o1",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"notify_hook": "https://pdf2.openai-hk.com/test/2024/mqrunway"
}For field descriptions, refer to the official documentation for Omni-Video (O1)
Response body
{
"code": 0,
"message": "SUCCEED",
"request_id": "8363283e-bcfb-4057-ad42-8717d9b2ea53",
"data": {
"task_id": "847130448077000794",
"task_status": "submitted",
"updated_at": 1770000156527
}
}{
"code": 0,
"message": "SUCCEED",
"request_id": "8363283e-bcfb-4057-ad42-8717d9b2ea53",
"data": {
"task_id": "847130448077000794",
"task_status": "submitted",
"updated_at": 1770000156527
}
}data.task_id is used as the task_id for querying the result.get https://api.openai-hk.com/kling/v1/videos/omni-video/{task_id} get https://api.openai-hk.com/kling/v1/videos/omni-video/847130448077000794
{
"code": 0,
"data": {
"created_at": 1770000156527,
"final_unit_deduction": "4",
"task_id": "847130448077000794",
"task_info": {},
"task_result": {
"videos": [
{
"duration": "5.041",
"id": "847130448194441245",
"url": "https://v1-fdl.kechuangai.com/ksc2/F8mGkPgRjiK-INld7fvcJ_n8cwV_RjzxpIpm3m5kfwXLKQ4cn67WRMeyQMfuifV4rDNFjPX1PH5rbEoTfez0ddZv4m9sTur4snzKvXctXEOP0YARviRTHGsZhv-FNN5f30bHvU2VueI0lTdW1j5h512RFVZ4Q431efx9g8QLeyedlPXk5-5NpZO8AGsXomErm8gntYIM0Xp_B-bdcOA_OA.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAFB5FBBP68KklQlUWwwNC2TY0QQDjQPuwEes_26pzj-PNlcCxiEgPN1eNF8MSOOuZfqozg2ctZkzSvCC-at3XF-oyAPYMoTqs_X2s260Mqs76wb3HBAXh7pmlEKjvFrXNBqUT2vkF067ZoUFVO8lrJP5jy1HMUngVqrKN3CBZVG9VstNCOV_EIpRnCBM4NaCgVy-m7B7lh7egg6MtB8NUMi6z6AlTLcRWDPHp4dYUdu-hoSxWNjcgh9zqt_zDfpYBGATs3tIiA61EFyWCk9ny8N_13chrXWqfMvlGRP-k9eAJkMUL4bHCgFMAE&x-kcdn-pid=112757&pkey=AAVMKTXi-QYUPSnB1Zz5tHF-RbwKZxy6eEAgu_w2II3u3xxMy-3Ul-ai0XWtq-Ea0zAbT_E66gRxCxSBsKW2ct33_uHIzyE_bEAujw0dTnzN54WxGNA7aY18vYuWs1vwg6w"
}
]
},
"task_status": "succeed",
"task_status_msg": "",
"updated_at": 1770000219604
},
"message": "SUCCEED",
"request_id": "3a856e3c-7f79-45cf-a97a-a73630712883"
}{
"code": 0,
"data": {
"created_at": 1770000156527,
"final_unit_deduction": "4",
"task_id": "847130448077000794",
"task_info": {},
"task_result": {
"videos": [
{
"duration": "5.041",
"id": "847130448194441245",
"url": "https://v1-fdl.kechuangai.com/ksc2/F8mGkPgRjiK-INld7fvcJ_n8cwV_RjzxpIpm3m5kfwXLKQ4cn67WRMeyQMfuifV4rDNFjPX1PH5rbEoTfez0ddZv4m9sTur4snzKvXctXEOP0YARviRTHGsZhv-FNN5f30bHvU2VueI0lTdW1j5h512RFVZ4Q431efx9g8QLeyedlPXk5-5NpZO8AGsXomErm8gntYIM0Xp_B-bdcOA_OA.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAFB5FBBP68KklQlUWwwNC2TY0QQDjQPuwEes_26pzj-PNlcCxiEgPN1eNF8MSOOuZfqozg2ctZkzSvCC-at3XF-oyAPYMoTqs_X2s260Mqs76wb3HBAXh7pmlEKjvFrXNBqUT2vkF067ZoUFVO8lrJP5jy1HMUngVqrKN3CBZVG9VstNCOV_EIpRnCBM4NaCgVy-m7B7lh7egg6MtB8NUMi6z6AlTLcRWDPHp4dYUdu-hoSxWNjcgh9zqt_zDfpYBGATs3tIiA61EFyWCk9ny8N_13chrXWqfMvlGRP-k9eAJkMUL4bHCgFMAE&x-kcdn-pid=112757&pkey=AAVMKTXi-QYUPSnB1Zz5tHF-RbwKZxy6eEAgu_w2II3u3xxMy-3Ul-ai0XWtq-Ea0zAbT_E66gRxCxSBsKW2ct33_uHIzyE_bEAujw0dTnzN54WxGNA7aY18vYuWs1vwg6w"
}
]
},
"task_status": "succeed",
"task_status_msg": "",
"updated_at": 1770000219604
},
"message": "SUCCEED",
"request_id": "3a856e3c-7f79-45cf-a97a-a73630712883"
}