Kling VFX โ
Endpoint: POST https://mps.intl.tencentcloudapi.comAction: CreateAigcAudioTask
Kling VFX is a sound effect generation capability: it generates sound effects from a text description, or automatically adds effects that match an input video.
Basic Information โ
| Item | Value |
|---|---|
| ModelName | Kling |
| SceneType | sfx |
If you provide only a prompt, generation is text-based; if you provide a video, sound effects matching that video are generated.
Request Parameters โ
| Parameter | Required | Type | Description |
|---|---|---|---|
ModelName | Required | String | Fixed value: Kling |
SceneType | Required | String | sfx |
Prompt | Optional | String | Used for text-based generation |
VideoInfos.N | Optional | Array | Input for video-based generation. Url |
Duration | Optional | Integer | Duration (seconds). 0~60 |
AdditionalParameters | Optional | String | bgm_prompt (background sound direction), asmr_mode, etc. |
You can use bgm_prompt to specify the background music direction separately, and asmr_mode is also supported.
Request Example โ
bash
curl -X POST https://mps.tencentcloudapi.com \
-H "X-TC-Action: CreateAigcAudioTask" \
-H "Content-Type: application/json" \
-H "X-TC-Version: 2019-06-12" \
-H "X-TC-Region: ap-guangzhou" \
-H "Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<Date>/mps/tc3_request, SignedHeaders=content-type;host, Signature=<Signature>" \
-d '{
"ModelName": "Kling",
"SceneType": "sfx",
"Prompt": "rain and distant thunder, cinematic atmosphere",
"Duration": 10,
"Operator": "admin"
}'bash
curl -X POST https://mps.tencentcloudapi.com \
-H "X-TC-Action: CreateAigcAudioTask" \
-H "Content-Type: application/json" \
-H "X-TC-Version: 2019-06-12" \
-H "X-TC-Region: ap-guangzhou" \
-H "Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<Date>/mps/tc3_request, SignedHeaders=content-type;host, Signature=<Signature>" \
-d '{
"ModelName": "Kling",
"SceneType": "sfx",
"VideoInfos": [
{
"Url": "https://<cdn>/source.mp4"
}
],
"AdditionalParameters": "{\"bgm_prompt\":\"tense cinematic ambience\",\"asmr_mode\":false}",
"Operator": "admin"
}'AdditionalParameters fields:
| Field | Type | Description |
|---|---|---|
bgm_prompt | String | Prompt describing the background sound direction |
asmr_mode | Boolean | ASMR mode. Emphasizes fine-grained sound details to produce a more immersive result |
Response Example โ
json
{
"Response": {
"Status": "DONE",
"Message": "ok",
"AudioInfos": [
{
"Url": "https://aigc-output-audio-file-<id>.cos.<region>.myqcloud.com/<file>.mp3?q-sign-algorithm=sha1&..."
}
],
"VideoInfos": ,
"RequestId": "<request-id>"
}
}Special Configuration โ
Additional Options โ
Duration is ignored in video-based generation
The duration of video-based sound effects follows the length of the input video.