Skip to content

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 NameTypeRequiredDescriptionExample
Content-TypestringOptionalapplication/json
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

Parameter NameTypeRequiredDescription
promptstringRequired
durationstringRequiredDuration of generated audio. Value range: 3.0 to 10.0 seconds, supports one decimal place precision
external_task_idstringOptional
callback_urlstringOptional

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
{}