Kling VFX โ
Endpoint: POST https://vod.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, it is text-based; if you provide a video, it creates sound effects matching that video.
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 | Video-based generation input. Type / Url |
AdditionalParameters | Optional | String | bgm_prompt (background sound direction), asmr_mode, etc. |
Request Examples โ
{
"SubAppId": 123456789,
"ModelName": "Kling",
"SceneType": "sfx",
"Prompt": "rain falling on a tin roof, distant thunder"
}{
"SubAppId": 123456789,
"ModelName": "Kling",
"SceneType": "sfx",
"VideoInfos": [
{
"Type": "Url",
"Url": "https://<cos>/source.mp4"
}
],
"AdditionalParameters": "{\"bgm_prompt\": \"tense cinematic ambience\"}"
}Text-based Sound Effects โ
Create sound effects from a prompt alone. The length is specified with OutputConfig.Duration, in the range of [3, 10] seconds.
{
"SubAppId": 123456789,
"ModelName": "Kling",
"SceneType": "sfx",
"Prompt": "fireworks during a holiday celebration, distant crowd cheering",
"OutputConfig": {
"StorageMode": "Temporary",
"Duration": 6
}
}Response Example โ
{
"AigcAudioTask": {
"Status": "FINISH",
"ErrCode": 0,
"Output": {
"AudioInfos": [
{
"FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcAudioGenFile.mp3"
}
]
}
}
}Video Input Constraints (video-to-sfx) โ
These are the constraints when you put a video into Kling video-to-sfx.
| Item | Value |
|---|---|
| Format | MP4 / MOV |
| File size | 100MB or less |
| Video length | 3.0 seconds ~ 20.0 seconds |
| Length specification | OutputConfig.Duration is ignored and follows the video length |
Model-Specific Audio Options โ
| Model | Field | Description |
|---|---|---|
Kling (video-to-sfx) | bgm_prompt | Background music generation prompt |
Kling (video-to-sfx) | asmr_mode | ASMR mode. Emphasizes detailed sound effects |
Special Settings โ
Video-based Sound Effects โ
If you provide a video, it creates sound effects matching that video. Pass the video with VideoInfos, and specify the background sound direction and ASMR mode in the top-level AdditionalParameters.
{
"SubAppId": 123456789,
"ModelName": "Kling",
"SceneType": "sfx",
"VideoInfos": [
{
"Type": "Url",
"Url": "https://<cos>/source.mp4"
}
],
"Prompt": "gentle wind, distant birdsong, occasional footsteps, pages turning, rain tapping on the window",
"AdditionalParameters": "{\"bgm_prompt\": \" healing piano with soft strings, warm and gentle, suitable for a drama scene\", \"asmr_mode\": true}",
"OutputConfig": {
"StorageMode": "Temporary"
}
}AdditionalParameters fields:
| Field | Type | Description |
|---|---|---|
bgm_prompt | String | Prompt describing the background sound direction |
asmr_mode | Boolean | ASMR mode. Emphasizes detailed sound to create an immersive result |
Input Specifications โ
| Item | Constraint |
|---|---|
| Video format | MP4 / MOV |
| File size | 100MB or less |
| Video length | 3.0 seconds ~ 20.0 seconds |
Duration is ignored for video-based generation
The length of video-based sound effects follows the input video length.
Output Format โ
Use OutputConfig.OutputAudioFormat to specify the output format. If omitted, the model default is used.
{
"OutputConfig": {
"StorageMode": "Temporary",
"OutputAudioFormat": "wav"
}
}Additional Options โ
VideoInfos is entered in [{ "Type": "Url", "Url": "..." }] format.