Extend Music
POST/api/v1/generate/extend
Extend or modify existing music by creating a continuation based on a source audio track.
Usage Guide
- This endpoint allows you to extend existing music tracks
- You can choose to use original parameters or set new custom parameters
- Extended music will maintain style consistency with the source track
Parameter Details
-
With Custom Parameters (
defaultParamFlag: true
):prompt
,style
,title
andcontinueAt
are requiredprompt
length limit: 3000 charactersstyle
length limit: 200 characterstitle
length limit: 80 characters
-
With Original Parameters (
defaultParamFlag: false
):- Only
audioId
is required - Other parameters will be inherited from the source audio
- Only
Developer Notes
- Generated files are retained for 14 days
- Model version must match the source audio's model version
- Callback process follows the same pattern as the music generation endpoint
Request
Responses
- 200
- 500
Request successful
Server Error
Callbacks
- POST audioExtend
POST{$request.body#/callBackUrl}
System will call this callback when audio generation is complete.
Callback Example
{
"code": 200,
"msg": "All generated successfully.",
"data": {
"callbackType": "complete",
"task_id": "2fac****9f72",
"data": [
{
"id": "8551****662c",
"audio_url": "https://example.cn/****.mp3",
"stream_audio_url": "https://example.cn/****",
"image_url": "https://example.cn/****.jpeg",
"prompt": "[Verse] Night city lights shining bright",
"model_name": "chirp-v3-5",
"title": "Iron Man",
"tags": "electrifying, rock",
"createTime": "2025-01-01 00:00:00",
"duration": 198.44
},
{
"id": "bd15****1873",
"audio_url": "https://example.cn/****.mp3",
"stream_audio_url": "https://example.cn/****",
"image_url": "https://example.cn/****.jpeg",
"prompt": "[Verse] Night city lights shining bright",
"model_name": "chirp-v3-5",
"title": "Iron Man",
"tags": "electrifying, rock",
"createTime": "2025-01-01 00:00:00",
"duration": 228.28
}
]
}
}
Callbacks Responses
- 200
Callback received successfully