Replace a specific time segment within existing music.
taskId: Original music’s parent task IDaudioId: Audio ID to replaceprompt: 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 excludefullLyrics: Complete lyrics after modification, combining both modified and unmodified lyricscallBackUrl: Callback address after task completioninfillStartS must be less than infillEndSprompt and tagsAll APIs require authentication via Bearer Token.
Get API Key:
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
Original task ID (parent task), used to identify the source music for section replacement
"2fac****9f72"
Unique identifier of the audio track to replace. This ID is returned in the callback data after music generation completes.
"e231****-****-****-****-****8cadc7dc"
Prompt for generating the replacement segment, typically text describing the audio content
"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"
Complete lyrics after modification, combining both modified and unmodified lyrics. This parameter contains the full lyrics text that will be used for the entire song after the section replacement.
"[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics"
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"