CometAPI에서 Kling Text to Audio API를 사용해 텍스트 프롬프트를 음성 스타일 제어, 길이 옵션, 스트리밍 지원 출력과 함께 오디오로 변환합니다.
curl --request POST \
--url https://api.cometapi.com/kling/v1/audio/text-to-audio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Soft ambient ocean waves at sunrise.",
"duration": 5
}
'{
"code": 0,
"message": "SUCCEED",
"data": {
"task_id": "861254119619698760",
"task_status": "submitted",
"task_info": {},
"created_at": 1773367502225,
"updated_at": 1773367502225
}
}prompt는 간결하고 직접적으로 작성하세요duration은 3초에서 10초 사이로 시작하세요callback_url과 external_task_id는 핵심 필수 항목이 아니라 선택적 통합 도우미로 간주하세요작업 폴링
prompt와 duration만 포함한 최소 요청이 허용되었고 task_status: submitted를 반환하는 것이 확인되었습니다.Bearer token authentication. Use your CometAPI key.
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.
curl --request POST \
--url https://api.cometapi.com/kling/v1/audio/text-to-audio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Soft ambient ocean waves at sunrise.",
"duration": 5
}
'{
"code": 0,
"message": "SUCCEED",
"data": {
"task_id": "861254119619698760",
"task_status": "submitted",
"task_info": {},
"created_at": 1773367502225,
"updated_at": 1773367502225
}
}