POST /kling/v1/audio/tts
Method: POSTEndpoint: /kling/v1/audio/tts
This document is not updated in real time. For the full version, see the official documentation: https://app.klingai.com/cn/dev/document-api/apiReference/model/TTS
Request Parameters
Header Parameters
text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
object
Example
{
}Example Request
Shell
bash
curl --location --request POST '/kling/v1/audio/tts' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{}'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
code
integer
Required
Error code. See the error-code definitions for details.
message
string
Error Message
Required
request_id
string
Required
Request ID, generated by the system for tracking and troubleshooting.
data
object
Required
task_id
string
Required
Task ID, generated by the system.
task_status
enum<string>
Required
Task status. Enum values: submitted, processing, succeed, failed.
Enum Values:
submitted (submitted)
processing (in progress)
succeed (success)
failed (failure)
created_at
integer
Required
Task creation time, Unix timestamp in milliseconds.
updated_at
integer
Required
Task update time, Unix timestamp in milliseconds.Example
json
{
"code": 0, // error code; see the error-code definitions for details
"message": "string", //Error Message
"request_id": "string", //Request ID, generated by the system for tracking and troubleshooting.
"data": {
"task_id": "string", //Task ID, generated by the system.
"task_info": { // parameters used when the task was created
"external_task_id": "string" // customer-defined task ID
},
"task_status": "string", //Task status. Enum values: submitted, processing, succeed, failed.
"created_at": 1722769557708, //Task creation time, Unix timestamp in milliseconds.
"updated_at": 1722769557708 //Task update time, Unix timestamp in milliseconds.
}
}