Replace a specific time segment within existing music.
Documentation Index
Fetch the complete documentation index at: https://docs.sunoapi.org/llms.txt
Use this file to discover all available pages before exploring further.
taskId: Original music’s parent task IDaudioId: Audio ID to replace (selected from the generated music list)prompt: Prompt describing the replacement segment contenttags: Music style tagstitle: Music titleinfillStartS: Start time point for replacement (seconds, 2 decimal places)infillEndS: End time point for replacement (seconds, 2 decimal places)negativeTags: Music styles to excludecallBackUrl: Callback address after task completioninfillStartS must be less than infillEndSprompt and tagsAll endpoints require authentication using Bearer Token.
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
Original task ID (parent task), used to identify the source music for section replacement
"2fac****9f72"
Audio ID of the track to replace.
"e231****-****-****-****-****8cadc7dc"
Replaced lyrics
"A calm and relaxing piano track."
Music style tags, such as jazz, electronic, etc.
"Jazz"
Music title
"Relaxing Piano"
Start time point for replacement (seconds), 2 decimal places. Must be less than infillEndS. The time interval (infillEndS - infillStartS) must be between 6 and 60 seconds.
x >= 010.5
End time point for replacement (seconds), 2 decimal places. Must be greater than infillStartS. The time interval (infillEndS - infillStartS) must be between 6 and 60 seconds.
x >= 020.75
Excluded music styles, used to avoid specific style elements in the replacement segment
"Rock"
Callback URL for task completion. The system will send a POST request to this URL when replacement is complete, containing task status and results.
"https://example.com/callback"
Request successful
Response status code
200, 401, 402, 404, 409, 422, 429, 451, 455, 500 Error message when code != 200
"success"