Skip to content

MaaS_KL_v3

Competency Map

Function Classification Subfunction 3std (3\~15s) pro (3\~15s) 4k (3s\~15s)
Text-to-Video Single-shot Video Generation
Multi-shot Video Generation
Voice Control (Human Voice Control)
Image-to-Video Single-shot video generation (first frame only)
Multi-shot Video Generation
First and last frames (one-shot)
Subject Control (Video Character Subject + Multi-Image Subject)
Motion Control
Voice Control (Human Voice Control)

Request Protocol

http

Parameter Name Type Description
anthorization string Authentication

Text-to-Video

Create Task

POST

https://genaiapi.cloudsway.net/v1/ai/{endpoinPath}/kling/videos/text2video

Request Method

POST

Request Parameters

Field Type Required Default Value Description
model_name string Optional kling-v1
Model Name ● Enumerated Values: MaaS_KeLing_V2.1_master, MaaS_KeLing_V2.5_turbo, MaaS_KeLing_V2.6, MaaS_KeLing_3.0_video
multi_shot boolean Optional false Whether to generate multi-shot video
● When the current parameter is true, the prompt parameter is invalid
● When the current parameter is false, the shot_type parameter and the multi_prompt parameter are invalid
shot_type
string Optional Empty Storyboard Method
● Enumerated values: customize, intelligence
● When the multi_shot parameter is true and the shot_type parameter is customize, the current parameter must be filled in
prompt
string Optional Empty Text prompt, which can include positive and negative descriptions
● Prompt templates can be used to meet different video generation requirements
● Must not exceed 2500 characters. The Omni model can achieve various capabilities through Prompt with content such as subjects, images, and videos:
1. Specify a certain subject, image, or video through the format of <<<>>>, for example: <<<element_1>>>, <<<image_1>>>, <<<video_1>>>
● When the multi_shot parameter is false or the shot_type parameter is intelligence, the current parameter must be filled in
multi_prompt
array Optional Empty Each shot prompt may include positive and negative descriptions
● Define the shot number, corresponding prompt, and duration through the index, prompt, and duration parameters, where:
○ Supports up to 6 shots and at least 1 shot
○ The maximum length of each shot-related content does not exceed 512 characters.
○ The duration of each shot is no greater than the total duration of the current task and no less than 1
○ The sum of the durations of all storyboards equals the total duration of the current task
● Carried by key:value, as follows:
"multi_prompt":[
{
"index":int,
"prompt": "string",
"duration": "5"
},
{
"index":int,
"prompt": "string",
"duration": "5"
}
]
● When the multi_shot parameter is true and the shot_type parameter is customize, the current parameter must not be empty
negative_prompt
string Optional Empty Negative text prompt
● It is recommended to incorporate negative prompts into positive prompts using negative descriptions.
● Must not exceed 2,500 characters
sound string Optional off Whether to generate sound simultaneously when generating a video
● Enumerated values:on, off
Only models of version V2.6 and above support the current parameters
mode string Optional std Mode of generating videos
  • Enumerated values: std, pro, 4k. Among them:

    • std: Standard Mode (Standard), Basic Mode, High Cost-Effectiveness, Output Video Resolution is 720P
    • pro: Expert Mode (High Quality), High Performance Mode, generates videos with better quality, and the output video resolution is 1080P.
    • 4k: 4K mode, high performance (same as pro), generates better video quality, and outputs video with a resolution of 4K.
Different model versions support different ranges of capabilities, see the above capability map for details
aspect_ratio string Optional 16:9 Aspect ratio (width:height) of the generated video
● Enumerated values:16:9, 9:16, 1:1
duration string Optional 5 Generated video duration, unit: s
● Enumerated values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Different model versions support different ranges of capabilities, see the above capability map for details
watermark_info
array Optional Empty Whether to generate watermarked results simultaneously
● Defined by the enabled parameter, carried with key:value, as follows:
"watermark_info": {
"enabled": boolean // true for generation, false for no generation
}
● Custom watermarks are not currently supported
external_task_id string Optional None Custom Task ID● User-defined task ID. Passing it in will not overwrite the system-generated task ID, but it supports task query via this ID● Please note that uniqueness must be ensured for a single user

Request Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/videos/text2video' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "kling-v3",
    "prompt": "Epic BBC natural history documentary style, 4K ultra-high-definition quality. In the twilight of the African savannah, dust swirls as a brutal struggle for survival unfolds. A massive lion with a disheveled mane unleashes a thunderous roar, its powerful muscles rippling in the golden sunset light as it swings its claws to fend off attackers. Surrounding it are a dozen cunning, relentless spotted hyenas — snarling, eyes gleaming with greed — employing encirclement tactics as they dart, feint, and bite with fluid agility. The scene pulses with raw, untamed tension, capturing flying saliva, drifting dust, the authentic texture of animal fur, and dramatically dramatic lighting and shadow.",
    "mode": "pro",
    "sound": "on",
    "aspect_ratio": "16:9",
    "duration": "5"
}'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868602593017598033",
        "task_status": "processing",
        "created_at": 1775119514814,
        "updated_at": 1775119524744,
        "task_status_msg": "",
        "task_info": {
            "parent_video": null
        },
        "task_result": {}
    },
    "request_id": "ea45fa79-c2bf-4545-922f-5647c5d5218d"
}

Query Task

Request URL

https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/kling/videos/text2video/{taskid}

Request Method

GET

Query Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/videos/text2video/788832073707958348' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868890153925369900",
        "task_status": "succeed",
        "created_at": 1775188074674,
        "updated_at": 1775188152228,
        "task_status_msg": "",
        "task_info": {
            "parent_video": null
        },
        "task_result": {
            "videos": [
                {
                    "id": "868890154063794228",
                    "url": "https://v1-fdl.kechuangai.com/ksc2/ZAonwibnVSsBTR4-QxHkB_YKEZYFgoXG7A1Yc_QAHKLPUhcyhqnHwDkXz8SOypZVFWUWmkMV5vgE2_RPLamgd8hbrpSyZMvLD9HNIJgllXd_Os1Pm8FAbZC9U5Vx1oXBagSCUo74dn4qUUxeBY51PsuY9saFYEzqVbF6-Nj7JYEMmaWse-t0Y3HhguP8F94apKw3etnebmgbbPvwnfcLdQ.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAGNmVFX1dR7C1hY15zrRNFzFjI5aofE-lzF1oDvKvIqM0OhWaD0ipqFMqaI75q8h6ZGomvHttKNOSHbzyUUB783SkDz5C93U9DthHmAe5p-Mk4eO1Ho_-IpPzNHi3CpO0AmA49If-ezk1EojNt60UydPG4UAv-IhaRExr7NmggcQ8H_9hLSwdk2zK3Bl6uvHlXlKigQjXqhqgGHT_satElXetMR4TdWgIPaPZHO09C3wxoSoUWhYgsuBTfVWszBdm10UXP1IiARoGmF2lj1HtncEsVuFUSywo_hctF_p02rvkGmfCq8jigFMAE&x-kcdn-pid=112757&pkey=AAWwW6x4NpkyPyk7rDNAIf_3OgO5G5fpH2EiRAc872uEP3bKL9mQuD0FnoccREcZbsFtOnoVDKY9uwMKewzhSWEsHKlXFWU4NCVCRhypHV4zgbVqnmADqeW_tca0ihiVWs0",
                    "duration": "5.041",
                    "watermark_url": null
                }
            ]
        },
        "final_unit_deduction": "6"
    },
    "request_id": "21ff9a73-562f-4b7e-9f9a-4e12994cc080"
}

Image-to-Video

Create Task

Request URL

https://genaiapi.cloudsway.net/v1/ai/{endpoinPath}/kling/videos/image2video

Request Method

POST

Request Parameters

Field Type Required Default Value Description
model_name
string Optional kling-v1 Model Name
● Enumerated Values:kling-v1, kling-v1-5, kling-v1-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo, kling-v2-6, kling-v3
image string Optional Empty
Reference Image
● Supports passing in Base64-encoded images or image URLs (ensure they are accessible)
● Image formats supported:.jpg /.jpeg /.png
● The size of the image file cannot exceed 10MB
● The width and height of the image are not less than 300px
● The aspect ratio of the image should be between 1:2.5 and 2.5:1
● The image parameter and the image_tail parameter are mutually exclusive, and both cannot be empty at the same time
● Different model versions support different ranges of capabilities. For details, see the capabilities map above.
image_tail string Optional Empty Reference Image: Final Frame Image
● Supports passing in Base64-encoded images or image URLs (ensure they are accessible)
● Image formats supported:.jpg /.jpeg /.png
● The size of the image file cannot exceed 10MB
● The width and height of the image are not less than 300px
● The aspect ratio of the image should be between 1:2.5 and 2.5:1
● The image parameter and the image_tail parameter are mutually exclusive, and both cannot be empty at the same time
● Different model versions support different ranges of capabilities. For details, see the capabilities map above.
multi_shot boolean Optional false Whether to generate multi-shot video
● When the current parameter is true, the prompt parameter is invalid
● When the current parameter is false, the shot_type parameter and the multi_prompt parameter are invalid
shot_type string Optional Empty Storyboard Method
● Enumerated values:customize, intelligence
● When the multi_shot parameter is true and the shot_type parameter is customize, the current parameter must be filled in
prompt
string Optional Empty
Text prompt, which can include positive and negative descriptions
● Prompt templates can be used to meet different video generation requirements
● Must not exceed 2500 characters. The Omni model can achieve various capabilities through Prompt with content such as the main body, images, and videos:
1. Specify a certain subject, image, or video in the format of <<<>>>, for example: <<<element_1>>>, <<<image_1>>>, <<<video_1>>>
● Use <<<voice_id>>> to specify the voice timbre, with the sequence number corresponding to the order of the voice timbres referenced by the voice_list parameter
● A single video generation task may reference at most 2 voice tones. When specifying a voice tone, the value of the sound parameter must be on.
● The simpler the grammatical structure, the better, e.g., <man><<<voice_id>>> says: "Hello"
● When the voice_list parameter is not empty and the prompt parameter references a voice ID, the video generation task is billed based on "specified voice".
● When the multi_shot parameter is false or the shot_type parameter is intelligence, the current parameter must be filled in
multi_prompt array Optional
Empty Each shot prompt may include positive and negative descriptions
● Define the shot number and corresponding prompt and duration through the index, prompt, and duration parameters, where:
○ Supports up to 6 shots and at least 1 shot
○ The maximum length of each shot-related content does not exceed 512 characters.
○ The duration of each shot is no greater than the total duration of the current task and no less than 1
○ The sum of the durations of all storyboards equals the total duration of the current task
● Carried by key:value, as follows:
"multi_prompt":[
{
"index":int,
"prompt": "string",
"duration": "5"
},
{
"index":int,
"prompt": "string",
"duration": "5"
}
]
● When the multi_shot parameter is true and the shot_type parameter is customize, the current parameter must not be empty
negative_prompt string Optional Empty Negative text prompt
● It is recommended to incorporate negative prompts into positive prompts using negative descriptions.
● Must not exceed 2,500 characters
element_list
array Optional Empty Reference Subject List
● Based on the ID configuration of the entities in the entity library, it is carried by key:value, as follows:
"element_list":[
{
"element_id":long
},
{
"element_id":long
}
]
● The number of reference subjects is related to the number of reference images, and the sum of the number of reference subjects and the number of reference images shall not exceed 10.
sound string Optional off Whether to generate sound simultaneously when generating a video
● Enumerated values:on, off
Only models of version V2.6 and above support the current parameters
mode string Optional std Mode of generating videos
  • Enumerated values: std, pro, 4k. Among them:

    • std: Standard Mode (Standard), Basic Mode, High Cost-Effectiveness, Output Video Resolution is 720P
    • pro: Expert Mode (High Quality), High Performance Mode, generates videos with better quality, and the output video resolution is 1080P.
    • 4k: 4K mode, high performance (same as pro), generates better video quality, and outputs video with a resolution of 4K.
Different model versions support different ranges of capabilities, see the above capability map for details
aspect_ratio string Optional 16:9 Aspect ratio (width:height) of the generated video
● Enumerated values:16:9, 9:16, 1:1
duration
string Optional 5 Generated video duration, unit: s
● Enumerated values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Different model versions support different ranges of capabilities, see the above capability map for details
watermark_info array Optional Empty
Whether to generate watermarked results simultaneously
● Defined by the enabled parameter, carried with key:value, as follows:
"watermark_info": {
"enabled": boolean // true for generation, false for no generation
}
● Custom watermarks are not currently supported
external_task_id string Optional None Custom Task ID
● User-defined task ID. Passing it in will not overwrite the system-generated task ID, but it supports task query via this ID.
● Please note that uniqueness must be ensured under single-user mode

Request Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/videos/image2video' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "kling-v2.6",
    "prompt": "Hollywood blockbuster-level visual effects, 8K ultra-high resolution. In a neon-drenched, rain-soaked city nightscape, Kong and Godzilla erupt into an explosive death match. Kong roars as he hurls a massive punch, every muscle in his arm bulging with raw power, while Godzilla gapes its jaws and its dorsal fins blaze with searing atomic blue light, ready to fire. The moment of impact unleashes a staggering shockwave, shattering surrounding skyscraper windows and sending countless chunks of debris and cascading sparks flying through the air. Raindrops hitting the monsters’ skin instantly vaporize into mist. The scene is drenched in apocalyptic, earth-shattering tension and sheer destructive force.",
    "image": "https://img2.baidu.com/it/u=2688005144,1651821809&fm=253&fmt=auto&app=120&f=JPEG?w=666&h=500",
    "mode": "pro",
    "sound": "on",
    "aspect_ratio": "16:9",
    "duration": "5",
    "external_task_id": "external_task_id"
}'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868890892747673686",
        "task_status": "submitted",
        "created_at": 1775188250826,
        "updated_at": 1775188250826,
        "task_info": {
            "parent_video": null
        }
    },
    "request_id": "e9eb1aff-f64a-40bf-b9a5-b9ff45adaa8e"
}

Query Task

Request URL

https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/kling/videos/image2video/{taskid}

Request Method

GET

Query Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/videos/image2video/788872612687921228' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868890892747673686",
        "task_status": "succeed",
        "created_at": 1775188250826,
        "updated_at": 1775188467595,
        "task_status_msg": "",
        "task_info": {
            "parent_video": null
        },
        "task_result": {
            "videos": [
                {
                    "id": "868890892911263836",
                    "url": "https://v4-fdl.kechuangai.com/ksc2/5H8Q9rkwbJYc2hNASa3tJedZI32pLHm-wtvwWAOWVXvt-W_CvEoPdYQYy-y8Rcn019YPqfY1K69VJ1db2gmknn9rogIFtul-JsV1fAS6bSMuRhDpii2SnbwshFXZF2riJhhAoUhciWT87Xf4ZbhqehgmUmHkLOQIJJRVBWPOhjV2m-waf_If2DakIPMVUXiftr7tDbV7QJVbQHYS3GSpNw.mp4?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAE1joX4zIbPH-Cm67NtCYBec22XBXK3wJaPFIn_cCxkJjsULN77k5Oy5DWq1hZpVhhEatwts5cuQEKUosHrT-RSbWU5IlkipC0sBnjcvG3hPs8CCxGHqS2z8Q1xFCmgEQ3Hd1ebXp3WxUnxgUf3W9XnVb9wQ5-hJ6I-YwXR1cl8DHcXiAvIhghP17cxWEAyJtCch6g9zE6WRPeX3h_4dPOtWOji4Z1R9hpxBL0NawdnvhoSbgFFnrpiqTZzapT733K7iU3CIiCbrd1zxr8zitaTO1HVhGmBRZYGGvO3Zwxs9lEcZ4dM4ygFMAE&x-kcdn-pid=112757&pkey=AAXJ_qjKB4mdRvnsGFL-z-loytZSITXZvXm3x8ULgTZRHdMZBticEIOze4CgFO41M44uHnvbDPS_4qgwfKrKgGqEkIq3t0TNQgQ-hXTmLIoBgD6rh7Dajx9a2OO2OLAeShM",
                    "duration": "5.041",
                    "watermark_url": null
                }
            ]
        },
        "final_unit_deduction": "6"
    },
    "request_id": "091dc51b-589d-4d5b-9c1a-430ab0ba4cce"
}

Image Generation

Create Task

Request URL

https://genaiapi.cloudsway.net/v1/ai/{endpoinPath}/kling/images/generations

Request Method

POST

Request Parameters

Field Type Required Default Value Description
model_name
string Optional kling-v1 Model Name
● Enumerated values: kling-v1, kling-v1-5, kling-v2, kling-v2-new, kling-v2-1, kling-v3
prompt string must
None
Text prompt, which can include positive and negative descriptions
● Must not exceed 2,500 characters
negative_prompt string
Optional Empty Negative text prompt
  • cannot exceed 2500 characters
  • It is recommended to incorporate negative prompts into positive prompts using negative descriptions

Note: Negative prompts are not supported in the image-to-image scenario (i.e., when the image field is not empty)

image
string
Optional
Empty
Reference Image
  • Supports passing in Base64-encoded images or image URLs (ensure they are accessible)
Please note that if you use the base64 method, ensure that all image data parameters you pass are in Base64 encoding format. When submitting data,do not add any prefix to the Base64-encoded string, such as data:image/png;base64,. The correct parameter format should be directly the Base64-encoded string.
Example:
Correct Base64 encoding parameter:
iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
Invalid Base64 encoding parameter (including data: prefix):
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
Please provide only the Base64-encoded string part so that the system can correctly process and parse your data.
  • Image formats supported:.jpg /.jpeg /.png
  • The size of the image file cannot exceed 10MB, the width and height of the image must be no less than 300px, and the aspect ratio of the image must be between 1:2.5 and 2.5:1
  • When the image_reference parameter is not empty, the current parameter is required
element_list array Optional Empty Subject Reference List
  • Based on the ID configuration of entities in the entity library, carried by key:value, as follows:
"element_list":[
        {
           "element_id":long
  },
  {
           "element_id":long
  }
]
  • The number of reference subjects is related to the number of reference images, and the sum of the number of reference subjects and the number of reference images must not exceed 10
resolution
string Optional 1k Clarity of the generated image
  • Enumerated values: 1k, 2k

    • 1k: 1K Standard Definition
    • 2K: 2K High Definition

Different model versions support different ranges; for details, refer to the official documentation's capabilities map

n int Optional
1 Number of Generated Images
  • Value range: [1,9]
aspect_ratio string Optional 16:9 Aspect ratio (width:height) of the generated image
  • Enumerated values: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9

Different model versions support different ranges; for details, refer to the official documentation's capabilities map

watermark_info
array
Optional Empty
Whether to generate watermarked results simultaneously
  • Defined by the enabled parameter, carried by key:value, as follows:
"watermark_info": {
         "enabled": boolean // true to generate, false to not generate
}
  • Custom watermarks are not currently supported
callback_url string Optional None Callback notification address for the results of this task. If configured, the server will proactively notify when the task status changes.
  • See "Callback Protocol" for the message schema of specific notifications
external_task_id string Optional None Custom Task ID
  • User-defined task ID. Passing it in will not overwrite the system-generated task ID, but it supports task querying via this ID
  • Please note that uniqueness must be ensured under single-user mode

Request Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/images/generations' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "kling-v3",
    "prompt": "Generate images of the numbers 1 through 9",
    "element_list": [
        {
            "element_id": "160"
        },
        {
            "element_id": "161"
        },
        {
            "element_id": "159"
        }
    ],
    "image": "xxx",
    "resolution": "2k",
    "n": "9",
    "aspect_ratio": "3:2",
    "external_task_id": "",
    "callback_url": ""
}'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868892585292099640",
        "task_status": "submitted",
        "created_at": 1775188654357,
        "updated_at": 1775188654357,
        "task_info": {
            "parent_video": null
        }
    },
    "request_id": "68329d65-ee21-4013-9aa6-f0bc2cc07744"
}

Query Task (Single)

Request URL

https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/kling/images/generations/{taskId}

Request Method

GET

Query Example

curl --location 'https://genaiapi.cloudsway.net/v1/ai/${Your Endpoint}/kling/images/generations/858114895710539873' \
--header 'Authorization: Bearer ${Your AK}' \
--header 'Content-Type: application/json'

Return Value Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "868892585292099640",
        "task_status": "failed",
        "created_at": 1775188654357,
        "updated_at": 1775188656386,
        "task_status_msg": "Image format is invalid",
        "task_info": {
            "parent_video": null
        },
        "task_result": {
            "images": null,
            "result_type": null,
            "series_images": null
        },
        "final_unit_deduction": "0"
    },
    "request_id": "a699ea31-8369-4b80-a796-7ca574d5ddf8"
}

Text-to-Sound Effect

Create a text-to-sound effect task

Request URL

POST v1/ai/{endpointPath}/kling/audio/text-to-audio

Request Parameters

Field Type Required Default Value Description
prompt string Required None Text prompt • Content length does not exceed 200 characters
duration float Required None Duration of the generated audio • Value range: 3.0 seconds to 10.0 seconds, supporting one decimal place of precision
external_task_id string Optional None Custom Task ID • User-defined task ID. Passing it in will not overwrite the system-generated task ID, but it supports task querying via this ID. • Please note that uniqueness must be ensured for a single user.
callback_url string Optional None Callback notification address for the results of this task. If configured, the server will proactively notify when the task status changes.

Request Example

curl -g 'https://genaiapi.cloudsway.net/v1/ai/{{endpointPath}}/kling/audio/text-to-audio' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
-d '{
    "prompt": "The sound of fireworks during Spring Festival celebrations.",
    "duration": 3,
    "external_task_id": "",
    "callback_url": ""
  }'

Return Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "871457979416604766",
        "task_status": "submitted",
        "created_at": 1775800291981,
        "updated_at": 1775800291981,
        "task_info": {}
    },
    "request_id": "828f9782-d2e1-4550-a36d-e715ae2ae037"
}

Query text-to-sound effect task

Request URL

GET v1/ai/{endpointPath}/kling/audio/text-to-audio/{id}

task_id

Task ID for text-to-audio: a request path parameter, directly fill the value in the request path, and choose one of the two query methods with external_task_id

external_task_id

User-defined task ID. When creating a task, either fill in the external_task_id or use task_id as the query method, with only one of the two options available

Request Example

curl -g 'https://genaiapi.cloudsway.net/v1/ai/{{endpointPath}}/kling/audio/text-to-audio/{id}' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json'

Return Example

{
    "code": 0,
    "message": "SUCCEED",
    "data": {
        "task_id": "871457647223545935",
        "task_status": "succeed",
        "created_at": 1775800212780,
        "updated_at": 1775800228263,
        "task_status_msg": "",
        "task_info": {},
        "task_result": {
            "audios": [
                {
                    "id": "871457647265472604",
                    "url": null,
                    "duration": null,
                    "url_mp3": "https://v1-fdl.kechuangai.com/ksc2/ErHLIqeozb1WHdz1Izp1XGMBtJebQoG3Cp-2dvW1aWViY8RLKpP-tk5x7W6eeTn2b9GYO9YFP-o6znENuMnJ_gfCTlDfVz_FxCmXqGQ_q9-dhYwdNq2aZ8d7OHlPbYDwz0EsdeQnxcY_WktB6fbeiN5oHMdZZX8Uptz-fQGeBJWReQzcvLau7vxSQFcBf1rU1kGJZD3nRhuRJ-QT0NE0SA.mp3?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAFXEmxe-C5r1GsrJ4R_tFpMHnPrbjCJDG0KIp-dlRASzaKKVZPnTgDc4lOQw0tb7j0a6SuaZpiXsbq5v7GDhAdOjAaaMEFTIEhrKwILiBTZGoMM-l7cRD7Ak1Ijpt7KdddfiPC78jYKpRJEQVhp4DUtiyq8gzSrs6IOPskVBlbkMrhYZjRCYaJlswSacwFokyXfVoigHmoCox4tWOKtHuxwm5f_cNbqIxHkA6_Z19xqBhoSj4dfrTYhUzYe6jlYP2ZR__D3IiDmgbsrWNwPG28XCgRF7KfT3EKY6rUhktnmmeKY_OffqCgFMAE&x-kcdn-pid=112757&pkey=AAXEF3UtKZpRO5SOnZyIm1g87c3z1b0907OuSWpmsuDt4YCj95yjTniBUsV4LWeF5xlebOHfqK04MbbxPGXsyKVxpOqoVRq45ysb_TG_D6tKUSyb4zwibeQsYkSxRnmsFQw",
                    "url_wav": "https://v1-fdl.kechuangai.com/ksc2/ax60xYdmxPhWhrgqKcjG_R9nmqBtwZMYjs5jpC56Q5hVdN5Oae3O7d7kzmoEMhSJ-9Xv7-jrsi3v2DL0aHod0XOhTY8qoSofHRwh02DrXweWPL3JnQlUb13iVF2821muQ1O_-1-cbKUP1pg-QpQUOHvhd_FydZUe36F6bnvEW3E9AvbB95J6K0py-whjEerp2Z59LoNZAo2cHPtKS0ncHQ.wav?cacheKey=ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQSsAHMhoi-CYC9uUILiob74ZeXGkx3LSdWf7QCCBzpAdPiIjTaWxyhiErxhtb1mMQxCeT-YmlFsuqdVOJ73bXn5w7A6kLgO27kbl4uM5IjmZV5_dwTGhllwW_B2UXMdfwFxKIfRPu93U3-2M-Y3chNNOd0GhtUteZ9KIQn9Xc9bSpncu6HeNoMhIVm76XCDYyldt54EFfx8yLB51QV6LFCnnOtiAzbD-srIaG7HPJtH5j5tRoSqwnSbF-azU9cbKSOb8doGVG2IiAf7HRWbkMraGIU3pE62uCrWJoBkKaBwUWwUTOYw9nlhCgFMAE&x-kcdn-pid=112757&pkey=AAVm6lQUh6-ZOYrSRgFdt0zru0pJpiVxoeU820BANf98nNF4I4T8nG-q9lNdkw01UgQWYSR7L3cr6v6MVHiyN3UfBhNJJ9SFSS9f4E4z1eAlaLm8L8p3Ew6-nhILspq7oQU",
                    "duration_mp3": "3.056",
                    "duration_wav": "3.0"
                }
            ]
        },
        "final_unit_deduction": "0.25"
    },
    "request_id": "5571ddf9-0c33-44cd-8087-300bb47688ab"
}