style (max 1000 chars), title (max 100 chars), prompt (max 5000 chars)style (max 1000 chars), title (max 100 chars), prompt (max 5000 chars)style (max 1000 chars), title (max 100 chars), prompt (max 5000 chars)style (max 1000 chars), title (max 80 chars), prompt (max 5000 chars)style (max 200 chars), title (max 80 chars), prompt (max 3000 chars)defaultParamFlag is true (Custom Parameter Mode):instrumental: true: Provide style, title, and uploadUrl. prompt and vocalGender are not requiredinstrumental: false: Provide style, title, and uploadUrl. prompt is optional and will be used as a prompt if provided. vocalGender is not requiredcontinueAt: The point in seconds where the audio extension begins. It must be greater than 0 and less than the total duration of the uploaded audiouploadUrl: The URL of the audio file. The audio must not exceed 8 minutesdefaultParamFlag is false (Non-Custom Parameter Mode):instrumental setting, only uploadUrl is requiredprompt is optional and will be used as a prompt if providedinstrumental is true, prompt and vocalGender are not requiredinstrumental is false and prompt is not provided, lyrics will be generated automaticallyuploadUrl.| Parameter | Type | Description |
|---|---|---|
prompt | string | Describes how the music should be extended. Optional. If provided, it will be used as a prompt. Not required when instrumental is true. |
vocalGender | string | Vocal gender preference. m represents male vocals and f represents female vocals. Not required for this API. |
styleWeight | number | Controls adherence to the specified style. Range: 0–1, with up to two decimal places. Example: 0.65. |
weirdnessConstraint | number | Controls the level of creativity. Range: 0–1, with up to two decimal places. Example: 0.65. |
audioWeight | number | Controls the weight of audio elements. Range: 0–1, with up to two decimal places. Example: 0.65. |
personaId | string | Available only when defaultParamFlag is true. To generate a personaId, visit Generate Persona. |
curl --location 'https://api.kie.ai/api/v1/generate/upload-extend' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uploadUrl": "https://storage.example.com/upload",
"defaultParamFlag": true,
"instrumental": true,
"continueAt": 60,
"model": "V4",
"callBackUrl": "https://api.example.com/callback",
"prompt": "Extend the music with more relaxing notes",
"style": "Classical",
"title": "Peaceful Piano Extended",
"negativeTags": "Relaxing Piano",
"vocalGender": "m",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"personaId": "persona_123",
"personaModel": "style_persona"
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}