MaaS_KL_3.0_turbo
Text-to-Video
Request URL
POST
https://genaiapi-m2.cloudsway.net/v1/ai/{endpointPath}/kling/videos/text-to-video/kling-3.0-turbo
Request Parameters
| Field | Type | Required | Default Value | Description |
|---|---|---|---|---|
| prompt | string | Required | None | Text prompt, which can include positive and negative descriptions
|
| settings | object | Optional | Empty | Output configuration-related parameters, such as clarity, duration, etc. |
| settings.resolution | string | Optional | 720p | Clarity of the generated video
|
| settings.aspect_ratio | string | Optional | 16:9 | The aspect ratio (width:height) of the generated video
|
| settings.duration | int | Optional | 5 | Generated video duration, unit: s
|
| options | object | Optional | Empty | General configuration, such as callback address, whether it contains a watermark, etc. |
| options.callback_url | string | Optional | Empty | Callback notification address for the results of this task. If configured, the server will actively notify when the task status changes.
|
| options.external_task_id | string | Optional | Empty | Custom Task ID
|
| options.watermark_info | object | Optional |
Empty | Whether to generate watermarked results simultaneously
|
Request Example
curl -g 'https://genaiapi-m2.cloudsway.net/v1/ai/{endpointPath}/kling/videos/text-to-video/kling-3.0-turbo' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "A golden retriever running on a sunny beach, cinematic lighting, slow motion",
"settings": {
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5
},
"options": {
"watermark_info": {
"enabled": false
}
}
}'
Return Example
{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "901930004609634393",
"status": "submitted",
"message": "",
"create_time": 1783065388949,
"update_time": 1783065388949
},
"request_id": "ed6ce13d-7c9b-48cc-ba5c-e4ba5c260a60"
}
Image-to-Video
Request URL
POST https://genaiapi-m2.cloudsway.net/v1/ai/{{endpointPath}}/kling/videos/image-to-video/kling-3.0-turbo
Request Parameters
| Field | Type | Required | Default Value | Description |
|---|---|---|---|---|
| contents | array | Required | None | Collection of reference creatives, such as prompts, images, etc.
|
| contents.type | string | Required | None | Creative types supported: prompts, first frame images
|
| contents.type=prompt | string | Optional | Empty | Text prompts, which can include positive and negative descriptions
|
| contents.type=first_frame | object | Required | None | Reference creatives for the first frame image
|
| settings | object | Optional | Empty | Output configuration-related parameters, such as clarity, duration, etc. |
| settings.resolution | string | Optional | 720p | Clarity of the generated video
|
| settings.duration | int | Optional | 5 | Generated video duration, unit: s
|
| options | object | Optional | Empty | General configuration, such as callback address, whether it contains a watermark, etc. |
| options.callback_url | string | Optional | Empty | Callback notification address for the results of this task. If configured, the server will actively notify when the task status changes.
|
| options.external_task_id | string | Optional | Empty | Custom Task ID
|
| options.watermark_info | object | Optional | Empty | Whether to generate watermarked results simultaneously
|
Request Example
curl -g 'https://genaiapi-m2.cloudsway.net/v1/ai/{{endpointPath}}/kling/videos/image-to-video/kling-3.0-turbo' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"contents": [
{
"type": "first_frame",
"url": "https://p0.ssl.img.360kuai.com/dmfd/__60/t018b8fd959340b4f00.jpg"
},
{
"type": "prompt",
"text": "A golden retriever running on a sunny beach, cinematic lighting, slow motion"
}
],
"settings": {
"resolution": "1080p",
"duration": 8
},
"options": {
“”
"watermark_info": {
"enabled": false
}
}
}'
Return Example
{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "901930004609634393",
"status": "submitted",
"message": "",
"create_time": 1783065388949,
"update_time": 1783065388949
},
"request_id": "ed6ce13d-7c9b-48cc-ba5c-e4ba5c260a60"
}
Query Task
Request URL
GET v1/ai/{endpointPath}/kling/tasks
Request Parameters
| Field | Type | Required | Default Value | Description |
|---|---|---|---|---|
| task_ids | string |
Optional | Empty | System-defined task ID to be queried
|
| external_task_ids | string | Optional | Empty | Custom task ID to be queried
|
Request Example
curl -g 'https://genaiapi-m2.cloudsway.net/v1/ai/{{endpointPath}}/kling/tasks?task_ids=899322227844730894&external_task_ids=' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
Return Example
{
"code": 0,
"message": "SUCCEED",
"data": [
{
"id": "901930004609634393",
"status": "succeeded",
"message": "",
"outputs": [
{
"type": "video",
"id": "901930006506119262",
"url": "https://v16-kling-fdl.klingai.com/bs2/upload-ylab-stunt-sgp/muse/883866880053346352/VIDEO/20260703/94a3076d1a66898e3a3a72d01b4f2016-701d1905-6ece-42a4-9911-b048e59bbecb.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAFZz2jGsYSosbSWIP3R2XC-GYayNpXyFD3QJI6oBd0THyzVqA6pNW7qLVAiOYOK5ibt3ZOnlrrL9T6nH8GARsuFQBjFHbjH-ufnoUvlFUJ3jSKC34LLXDrqZ_TqEKI0W_ng2qL1TndbgTQcz6zd7GjkdFa8mByHjwuEIOAvw7JU3aJKNIPs4yl-F5APlBPB97XPOspwX5-jlreTRS7LqSG0CD5DHIvBa0uv6VfX4arL7xoSBJLSFVs3h7NB0bSL9MQcdiMhIiDEUHKJ1Ka4p2DZgIHNu7l8JSrFv_6vaIaPGk3K0J4o3SgFMAE&x-kcdn-pid=112781&ksSecret=8004a4f0fb0d97309d0549abd6d5f54e&ksTime=6a6ef86e",
"duration": "5.041"
}
],
"billing": [
{
"amount": "5",
"charge_type": "unit",
"package_type": "video"
}
],
"create_time": 1783065388949,
"update_time": 1783065455355
}
],
"request_id": "e508ec0e-feb7-4d18-815d-47b52a57cad7"
}