文生音效
POST /kling/v1/audio/text-to-audio
概览
| Method | POST |
|---|---|
| Path | /kling/v1/audio/text-to-audio |
| Type | http |
| Status | -1 |
| Module | 2102810 |
| Folder | 72917261 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "DxmmZyxFkf", "enable": true, "name": "Content-Type", "sampleValue": "application/json" }, { "required": false, "description": "", "type": "string", "id": "9w52vXw5kt", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词" }, "duration": { "type": "string", "description": "生成音频的时长取值范围: 3.0秒至10.0秒,支持小数点后一位精度" }, "external_task_id": { "type": "string" }, "callback_url": { "type": "string" } }, "required": [ "prompt", "duration" ], "x-apifox-orders": [ "prompt", "duration", "external_task_id", "callback_url" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"prompt\": \"描述风景的音频\",\r\n \"duration\": 5.0,\r\n \"external_task_id\": \"\",\r\n \"callback_url\": \"\"\r\n}" } ], "oasExtensions": "" }
响应
[ { "id": 132058924, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]