Theme
Text-to-Audio
POST
https://www.kkiai.com/kling/v1/audio/text-to-audio
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | application/json | |
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | |
duration | string | Required | Duration of generated audio. Value range: 3.0 to 10.0 seconds, supports one decimal place precision |
external_task_id | string | Optional | |
callback_url | string | Optional |
Request Example
json
{
"prompt": "Generate audio describing the scenery.",
"duration": 5.0,
"external_task_id": "",
"callback_url": ""
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/kling/v1/audio/text-to-audio' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "Generate audio describing the scenery.",
"duration": 5.0,
"external_task_id": "",
"callback_url": ""
}'Response
🟢 200 Success
Response Example
json
{}