Suno · Music

Replace & Auto-mergeNEW

One-shot replace_section + auto-merge: one replace produces two candidates, each is auto-merged back into a full track, directly yielding 2 complete songs — no manual replace_merge needed.

💡 When to use:Use when you want to redo a section but skip the manual merge step — get two finished full songs to pick from.

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/json
taskstringRequired
Fixed value: replace_auto
taskIdstringRequired
Task ID the source song belongs to — source: the taskId returned by the prior generation task (that response’s data.id)
clipIdstringRequired
Source song clip ID to edit — source: a song id from that taskId’s result (becomes this edit’s edit_session_id)
rangeStartSnumberRequired
Start second of the section to replace — source: chosen by you, must fall within the source track
rangeEndSnumberRequired
End second of the section to replace — source: chosen by you, must be greater than rangeStartS
infillLyricsstringRequired
New lyrics for the replaced section — source: your input (echoed to result concat_history.infill_lyrics)
tagsstring
Style tags — source: your input, shapes the replaced section’s style (written to result metadata.tags)
titlestring
New song title — source: your input (echoed in data.param.title; the finished song.title may keep the original name)
infillTypeenum
smart (default, smart stitching) / classic / fixed — source: your choice

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; always "replace_auto"
data.statusstring
Status: pending / succeeded / failed
data.errorMsgstring
Failure reason; empty on success
data.paramobject
Echo of your request params, plus the auto-merge progress and results
data.param.mergeTotal / mergeDonenumber
Candidates to auto-merge / already merged (both = 2 means both full songs are ready)
data.param.mergedResultsarray
Array of merged full songs; same content as data.result
data.resultarray
An array of 2 full songs (NOT replace_merge’s {clips:[…]} object) — each candidate auto-merged into a full track
data.result[].idstring
Full-song clipId; reusable for extend / cover / export
data.result[].audio_urlstring
Full-song audio URL (mp3)
data.result[].image_urlstring
Cover image URL (image_large_url is the large one)
data.result[].metadata.typestring
Always "concat_infilling" (replaced section merged back into the full song; carries a Full Song badge)
data.result[].metadata.durationnumber
Full-song duration (seconds); the two songs may match or differ
data.result[].metadata.edit_session_idstring
Edit session ID (= the clipId you passed); both songs share the same source
data.result[].metadata.concat_history[]array
Concat lineage: entry 1 (type=gen) is the replaced section (infill_start_s / infill_end_s / infill_dur_s / infill_lyrics / infill_context_start_s·end_s, matching the request); entry 2 is the source clip id it was stitched with
data.result[].batch_indexnumber
Always 0 — each song is merged independently, not indexed 0 / 1 like candidates
data.result[].media_urlsarray
Multi-format audio URLs (m4a-opus / mp3)
data.result[].major_model_versionstring
Model version used, e.g. v5 / v4.5
data.createTime / completeTimenumber
Task submit / completion time (epoch millis)