Kling VFX
Endpoint: POST https://mps.intl.tencentcloudapi.comAction: CreateAigcAudioTask
Kling VFX 是音效生成能力,可根据文本描述生成音效,也可为输入视频自动配上匹配画面的音效。
基本信息
| 项目 | 取值 |
|---|---|
| ModelName | Kling |
| SceneType | sfx |
仅传入 Prompt 时为文本驱动,传入视频时则生成与该视频相匹配的音效。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
ModelName | 必填 | String | 固定值 Kling |
SceneType | 必填 | String | sfx |
Prompt | 选填 | String | 用于文本驱动生成 |
VideoInfos.N | 选填 | Array | 视频驱动生成的输入。Url |
Duration | 选填 | Integer | 时长(秒)。0~60 |
AdditionalParameters | 选填 | String | bgm_prompt(背景音方向)、asmr_mode 等 |
可通过 bgm_prompt 单独指定背景音乐方向,同时支持 asmr_mode。
请求示例
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 字段:
| 字段 | 类型 | 说明 |
|---|---|---|
bgm_prompt | String | 描述背景音方向的 Prompt |
asmr_mode | Boolean | ASMR 模式。强化细节声音,营造更具沉浸感的结果 |
响应示例
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>"
}
}特殊配置
附加选项
视频驱动场景下 Duration 会被忽略
视频驱动音效的时长以输入视频的时长为准。