style (max 1000 chars), title (max 100 chars), lyrics / 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)custom_mode.upload_url, modelupload_url), generation can proceed; lyrics (formerly used via prompt), title, and style are optionallyrics takes priority over prompt as lyrics. If lyrics is omitted, prompt is used as lyrics when providedcontinue_at specifies the position in the original track where the extension should begin. It must be greater than 0 and less than the total duration of the uploaded audioinstrumental is true: generate instrumental music (no vocals). Do not pass lyrics, prompt, or vocal_genderupload_url: The URL of the audio file. The audio must not exceed 8 minutesupload_url.| Parameter | Type | Description |
|---|---|---|
lyrics | string | Lyrics for the extended audio. Optional. V6 maximum 5000 characters. Takes priority over prompt as lyrics. |
prompt | string | Used as lyrics only when lyrics is not provided. Optional. V6 maximum 5000 characters. Not required when instrumental is true. |
style | string | Music style specification. Optional. V6 maximum 1000 characters. |
title | string | Track title. Optional. Maximum 100 characters. |
vocal_gender | string | Vocal gender preference. m represents male vocals and f represents female vocals. |
style_weight | number | Controls adherence to the specified style. Range: 0–1, with up to two decimal places. Example: 0.65. |
weirdness_constraint | number | Controls the level of creativity. Range: 0–1, with up to two decimal places. Example: 0.65. |
audio_weight | number | Controls the weight of audio elements. Range: 0–1, with up to two decimal places. Example: 0.65. |
variety | integer | Diversity of generated results. Integer from 0–4, default 1. 0 off, 1 normal, 2 high, 3 extra, 4 max. |
persona_id | string | Persona ID or Voice ID to apply to the generated music. To generate a persona_id, visit Generate Persona. |
curl --location 'https://api.kie.ai/api/v1/jobs/createTask' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "ai-music-api/upload-and-extend-audio",
"callBackUrl": "https://api.example.com/callback",
"input": {
"upload_url": "https://storage.example.com/upload",
"instrumental": true,
"continue_at": 60,
"model": "V4",
"prompt": "Extend the music with more relaxing notes",
"style": "Classical",
"title": "Peaceful Piano Extended",
"negative_tags": "Relaxing Piano",
"vocal_gender": "m",
"style_weight": 0.65,
"weirdness_constraint": 0.65,
"audio_weight": 0.65,
"persona_id": "persona_123",
"persona_model": "style_persona",
"lyrics": "[Verse]\nKeep the melody flowing\nInto a gentle bridge\n[Chorus]\nLet the piano rise and fall",
"variety": 1
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}