POST
/
api
/
v1
/
generate
/
upload-extend
Upload And Extend Audio
curl --request POST \
  --url https://api.sunoapi.org/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,
  "prompt": "Extend the music with more relaxing notes",
  "style": "Classical",
  "title": "Peaceful Piano Extended",
  "continueAt": 60,
  "model": "V3_5",
  "negativeTags": "Relaxing Piano",
  "callBackUrl": "https://api.example.com/callback"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

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 (must be greater than 0 and less than the uploaded audio duration)
    • 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.

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json

Response

200
application/json

Request successful

The response is of type object.