Kling
Create Kling text-to-audio
Use Kling Text to Audio API in CometAPI to convert text prompts into audio with voice style controls, duration options, and streaming-ready output.
POST
cURL
Use this endpoint to generate a short audio clip from a text prompt through Kling.
Before you call it
- Keep
promptconcise and direct - Start with
durationbetween 3 and 10 seconds - Treat
callback_urlandexternal_task_idas optional integration helpers, not core requirements
Task flow
Poll the task
Continue with Get a Kling task using the Kling audio query path until the task reaches a terminal state.
Authorizations
Bearer token authentication. Use your CometAPI key.
Body
application/json
Text prompt describing the audio to generate. Max 200 characters.
Duration of the generated audio in seconds. Range: 3.0–10.0, supports one decimal place.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.
Webhook URL for task status notifications. The server sends a callback when the task status changes.