Suno · Music
Replace Section
Redo only one part of a song (e.g. the second verse), keeping the rest.
💡 When to use:Use when most of a song is fine but one section needs redoing.
Submit task
POST/ api/ cqt/ generator/ suno
Query Result
GET/ api/ cqt/ info/ suno?id={taskId}
OpenAI-style call
The same capability is also available via POST /v1/audio/generations: add task to the body, other fields match the request body below (snake_case is accepted too); write model as suno-v6. Poll with GET /v1/audio/generations/{id}; non-audio results (lyrics, persona, timeline …) are in the result field.
Submit task
POST/ v1/ audio/ generations
Query Result
GET/ v1/ audio/ generations/ {id}
Authorization
AuthorizationstringheaderRequired
API key, sent as a Bearer token in the Authorization header.
Request body
application/jsontaskstringRequired
Fixed value: replace_section
taskIdstringRequired
Task ID the source song belongs to
clipIdstringRequired
Source song clip ID
rangeStartSnumberRequired
Start second of the section to replace
rangeEndSnumberRequired
End second of the section to replace
infillLyricsstringRequired
New lyrics for the replaced section
tagsstring
Style tags
titlestring
Song title
infillTypeenum
smart (default) / classic / fixed
Response Fields
codenumber
Status code; 200 = success
msgstring
Message
data.idstring
Task ID (the taskId returned on submit; used to poll)
data.taskTypestring
Task type; matches the submitted task
data.statusstring
Status: pending / succeeded / failed
data.errorMsgstring
Failure reason; empty on success
data.paramobject
Echo of the request params you submitted
data.resultarray
Results; returns 2 candidate clips
data.result[].idstring
The generated clipId; reusable for further extend / cover, etc.
data.result[].audio_urlstring
Audio file URL (mp3)
data.result[].video_urlstring
Video file URL (mp4); may be empty, re-query later
data.result[].image_urlstring
Cover image URL (image_large_url is the large one)
data.result[].titlestring
Song title
data.result[].statusstring
Clip status; "complete" = ready to download
data.result[].metadata.durationnumber
Total audio duration (seconds)
data.result[].metadata.tagsstring
Style tags
data.result[].metadata.taskstring
For replace_section, the clip metadata.task shows "infill" (section inpaint)
data.result[].metadata.infillbool
Whether it is a section inpaint; always true here
data.result[].metadata.infill_lyricsstring
New lyrics for the replaced section (echo of infillLyrics)
data.result[].metadata.edited_clip_idstring
Edited source clip ID (= the clipId you passed)
data.result[].metadata.history[].infill_start_s / infill_end_s / infill_dur_snumber
Start/end second and duration of the replaced section
data.result[].metadata.history[].infill_context_start_s / infill_context_end_snumber
Context range (seconds) referenced during generation
data.result[].metadata.is_remixbool
Whether it is a remix; always true for replace_section
data.result[].clip_rootsobject
Source (parent) clip info: title / cover / author
data.result[].media_urlsarray
Multi-format audio URLs (m4a-opus / mp3)
data.result[].batch_indexnumber
Candidate index (0, 1)
data.result[].major_model_versionstring
Model version used, e.g. v4.5 / v5.5
data.createTime / completeTimestring
Task submit time / completion time
其它字段—
action_config / model_badges / secondary_badges / ownership / avatar_image_url, etc. are for Suno UI and can be ignored