customMode. The two modes have mutually exclusive fields — do not mix them.ai-music-api/speech.customMode: false)customMode, prompt (1–3000 characters)prompt is a scene description (Idea prompt); the model writes the scriptcustomMode=false + prompt. Do not send script / tone / variety / vocalGender / backgroundMusiccustomMode: true)customMode, script (1–5000 characters, the text to be spoken)tone (0–1000), variety (integer 0–4), vocalGender, backgroundMusicprompt. Do not send prompt in AdvancedcustomMode=false + promptprompt and submit customMode=true + script, plus any optional fields| Case | Message |
|---|---|
| variety outside 0–4 | variety must be between 0 and 4 |
| variety sent in Simple | variety is only supported when customMode is true |
curl --location 'https://api.kie.ai/api/v1/jobs/createTask' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "ai-music-api/speech",
"callBackUrl": "https://your.domain/callback",
"input": {
"customMode": false,
"prompt": "A short morning news intro about sunny weather"
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "xxxxxxxx",
"recordId": "123456"
}
}