Skip to main content

Upload And Extend Audio

POST 

/api/v1/generate/upload-extend

This API extends audio tracks while preserving the original style of the audio track. It includes Suno's upload functionality, allowing users to upload audio files for processing. The expected result is a longer track that seamlessly continues the input style.

Parameter Usage Guide

  • When defaultParamFlag is true (Custom Parameters):

    • If instrumental is true: style, title, and uploadUrl are required
    • If instrumental is false: style, prompt, title, and uploadUrl are required
    • prompt length limit: 3000 characters
    • style length limit: 200 characters
    • title length limit: 80 characters
    • continueAt: the time point in seconds from which to start extending
    • uploadUrl: specifies the upload location for audio files; ensure uploaded audio does not exceed 2 minutes.
  • When defaultParamFlag is false (Default Parameters):

    • Regardless of instrumental setting, only uploadUrl and prompt are required
    • Other parameters will use the original audio's parameters

Developer Notes

  1. Generated files will be retained for 14 days
  2. Model version must be consistent with the source music
  3. This feature is ideal for creating longer works by extending existing music
  4. uploadUrl parameter specifies the upload location for audio files; provide a valid URL.

Request

Responses

Request successful

Callbacks

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",
"source_audio_url": "https://example.cn/****.mp3",
"stream_audio_url": "https://example.cn/****",
"source_stream_audio_url": "https://example.cn/****",
"image_url": "https://example.cn/****.jpeg",
"source_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
}
]
}
}

Callbacks Responses

Callback received successfully