Skip to content

Kling VFX โ€‹

Updated

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 โ€‹

ItemValue
ModelNameKling
SceneTypesfx

If you provide only a prompt, generation is text-based; if you provide a video, sound effects matching that video are generated.

Request Parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value: Kling
SceneTypeRequiredStringsfx
PromptOptionalStringUsed for text-based generation
VideoInfos.NOptionalArrayInput for video-based generation. Url
DurationOptionalIntegerDuration (seconds). 0~60
AdditionalParametersOptionalStringbgm_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:

FieldTypeDescription
bgm_promptStringPrompt describing the background sound direction
asmr_modeBooleanASMR 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.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages