返回模型调用 API 参考
POST/kling/v1/audio/text-to-audio

文生音效

API Key application/json

请求示例

curl -X POST https://top.qingyuntop.ai/kling/v1/audio/text-to-audio \
  -H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "描述风景的音频",
    "duration": 5.0,
    "external_task_id": "",
    "callback_url": ""
}'

请求参数

参数位置类型必填说明示例
Content-TypeHeaderstring-application/json
AuthorizationHeaderstring-Bearer {{YOUR_API_KEY}}
promptJSON bodystring文本提示词-
durationJSON bodystring生成音频的时长取值范围: ​​3.0秒至10.0秒​​,支持小数点后一位精度-
external_task_idJSON bodystring--
callback_urlJSON bodystring--

返回响应 (200)

此部分没有定义参数。

来源原始接口定义(用于追溯)

以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。

{
  "id": 495899811,
  "name": "文生音效",
  "type": "http",
  "serverId": "",
  "preProcessors": [],
  "postProcessors": [],
  "inheritPreProcessors": {},
  "inheritPostProcessors": {},
  "description": "",
  "operationId": "",
  "sourceUrl": "",
  "method": "post",
  "path": "/kling/v1/audio/text-to-audio",
  "tags": [],
  "status": -1,
  "requestBody": {
    "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"
      ]
    },
    "examples": [
      {
        "mediaType": "application/json",
        "value": "{\r\n    \"prompt\": \"描述风景的音频\",\r\n    \"duration\": 5.0,\r\n    \"external_task_id\": \"\",\r\n    \"callback_url\": \"\"\r\n}"
      }
    ],
    "mediaType": "",
    "oasExtensions": "",
    "required": true,
    "additionalContentTypes": []
  },
  "parameters": {
    "path": [],
    "query": [],
    "cookie": [],
    "header": [
      {
        "id": "DxmmZyxFkf",
        "name": "Content-Type",
        "required": false,
        "enable": true,
        "description": "",
        "type": "string",
        "sampleValue": "application/json"
      },
      {
        "id": "9w52vXw5kt",
        "name": "Authorization",
        "required": false,
        "enable": true,
        "description": "",
        "type": "string",
        "sampleValue": "Bearer {{YOUR_API_KEY}}"
      }
    ]
  },
  "commonParameters": {
    "query": [],
    "body": [],
    "cookie": [],
    "header": []
  },
  "auth": {},
  "responses": [
    {
      "id": 189936863,
      "name": "成功",
      "code": 200,
      "contentType": "json",
      "jsonSchema": {
        "type": "object",
        "properties": {},
        "x-apifox-orders": []
      },
      "itemSchema": {},
      "description": "",
      "mediaType": "",
      "headers": []
    }
  ],
  "responseExamples": [],
  "codeSamples": [],
  "projectId": 8662722,
  "moduleId": 8310462,
  "folderId": 92436152,
  "ordering": 0,
  "responsibleId": 0,
  "commonResponseStatus": {},
  "advancedSettings": {
    "disabledSystemHeaders": {}
  },
  "customApiFields": {},
  "oasExtensions": "",
  "mockScript": {},
  "createdAt": "2026-08-02T03:53:34.000Z",
  "updatedAt": "2026-08-06T12:15:55.000Z",
  "creatorId": 2863449,
  "editorId": 2863449,
  "creatorUserId": 2863449,
  "editorUserId": 2863449,
  "responseChildren": [],
  "visibility": "INHERITED",
  "securityScheme": {},
  "callbacks": ""
}