CQTAI
Suno · Music

Replace & Auto-mergeNEW

📌 What is thisOne-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 useUse when you want to redo a section but skip the manual merge step — get two finished full songs to pick from.

Endpoints

UsageMethodPath
Submit taskPOST/api/cqt/generator/suno
Query ResultGET/api/cqt/info/suno?id={taskId}

Request Parameters

ParamTypeRequiredDescription
taskstringRequiredFixed value: replace_auto
taskIdstringRequiredTask ID the source song belongs to — source: the taskId returned by the prior generation task (that response’s data.id)
clipIdstringRequiredSource song clip ID to edit — source: a song id from that taskId’s result (becomes this edit’s edit_session_id)
rangeStartSnumberRequiredStart second of the section to replace — source: chosen by you, must fall within the source track
rangeEndSnumberRequiredEnd second of the section to replace — source: chosen by you, must be greater than rangeStartS
infillLyricsstringRequiredNew lyrics for the replaced section — source: your input (echoed to result concat_history.infill_lyrics)
tagsstringStyle tags — source: your input, shapes the replaced section’s style (written to result metadata.tags)
titlestringNew song title — source: your input (echoed in data.param.title; the finished song.title may keep the original name)
infillTypeenumsmart (default, smart stitching) / classic / fixed — source: your choice

Request Example

curl -X POST https://api.cqtai.com/api/cqt/generator/suno \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "task": "replace_auto",
    "taskId": "680886fa5bb94a8d8e4f8630a09f560e",
    "clipId": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
    "rangeStartS": 8,
    "rangeEndS": 16,
    "infillType": "smart",
    "infillLyrics": "窗前明月光光 疑是地上霜霜",
    "tags": "Happy",
    "title": "两只老虎(自动替换)"
  }'
# -> { "code":200, "data":"<taskId>" }

Response Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "680886fa5bb94a8d8e4f8630a09f560e",
    "taskType": "replace_auto",
    "status": "succeeded",
    "errorMsg": "",
    "param": {
      "task": "replace_auto",
      "taskId": "680886fa5bb94a8d8e4f8630a09f560e",
      "clipId": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
      "rangeStartS": 8,
      "rangeEndS": 16,
      "infillType": "smart",
      "infillLyrics": "窗前明月光光 疑是地上霜霜",
      "tags": "Happy",
      "title": "两只老虎(自动替换)",
      "mergeTotal": 2,
      "mergeDone": 2,
      "mergedResults": [
        { "id": "6d4ba59f-f409-4148-a597-eeea04c6c6a7", "title": "两只老虎", "audio_url": "https://cdn1.suno.ai/6d4ba59f-f409-4148-a597-eeea04c6c6a7.mp3", "batch_index": 0 },
        { "id": "de32f599-1379-4421-9833-97e7774648f5", "title": "两只老虎", "audio_url": "https://cdn1.suno.ai/de32f599-1379-4421-9833-97e7774648f5.mp3", "batch_index": 0 }
      ]
    },
    "result": [
      {
        "id": "6d4ba59f-f409-4148-a597-eeea04c6c6a7",
        "title": "两只老虎",
        "handle": "t43vcfowv8aq3",
        "status": "complete",
        "user_id": "f1e1b014-33db-4d8b-88c2-a9acaeb1d7b6",
        "metadata": {
          "tags": "Happy",
          "type": "concat_infilling",
          "prompt": "无",
          "duration": 24.96,
          "is_remix": true,
          "can_remix": true,
          "concat_history": [
            {
              "id": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
              "type": "gen",
              "infill": true,
              "source": "ios",
              "infill_dur_s": 8,
              "infill_end_s": 16,
              "infill_start_s": 8,
              "infill_lyrics": "窗前明月光光 疑是地上霜霜",
              "include_future_s": 2,
              "include_history_s": 2,
              "infill_context_end_s": 24.96,
              "infill_context_start_s": 0
            },
            { "id": "b3f18617-a00a-48f0-91d0-eca6c21ae24f" }
          ],
          "edit_session_id": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
          "secondary_badges": [ { "icon_key": "full_song", "display_name": "Full Song" } ]
        },
        "audio_url": "https://cdn1.suno.ai/6d4ba59f-f409-4148-a597-eeea04c6c6a7.mp3",
        "image_url": "https://cdn2.suno.ai/image_b3f18617-a00a-48f0-91d0-eca6c21ae24f.jpeg",
        "video_url": "",
        "clip_roots": { "clip_attribution_type": "remix" },
        "media_urls": [
          { "url": "https://d2lwuy8qc234o3.cloudfront.net/1/clip/6d4ba59f-f409-4148-a597-eeea04c6c6a7.m4a", "delivery": "progressive", "content_type": "m4a-opus" },
          { "url": "https://cdn1.suno.ai/6d4ba59f-f409-4148-a597-eeea04c6c6a7.mp3", "delivery": "progressive", "content_type": "mp3" }
        ],
        "model_name": "chirp-crow",
        "batch_index": 0,
        "created_at": "2026-07-30T09:18:44.943Z",
        "image_large_url": "https://cdn2.suno.ai/image_large_b3f18617-a00a-48f0-91d0-eca6c21ae24f.jpeg",
        "major_model_version": "v5"
      },
      {
        "id": "de32f599-1379-4421-9833-97e7774648f5",
        "title": "两只老虎",
        "handle": "mv78d6mpj5tpr",
        "status": "complete",
        "user_id": "4274bb10-a9a7-4ca2-aa30-b3b02e63d568",
        "metadata": {
          "tags": "Happy",
          "type": "concat_infilling",
          "prompt": "无",
          "duration": 24.96,
          "is_remix": true,
          "can_remix": true,
          "concat_history": [
            {
              "id": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
              "type": "gen",
              "infill": true,
              "source": "ios",
              "infill_dur_s": 8,
              "infill_end_s": 16,
              "infill_start_s": 8,
              "infill_lyrics": "窗前明月光光 疑是地上霜霜",
              "include_future_s": 2,
              "include_history_s": 2,
              "infill_context_end_s": 24.96,
              "infill_context_start_s": 0
            },
            { "id": "ca564b42-af29-472e-a3df-fb7828c94366" }
          ],
          "edit_session_id": "31732e8d-996c-4b4a-b2ae-ca3efaed5af9",
          "secondary_badges": [ { "icon_key": "full_song", "display_name": "Full Song" } ]
        },
        "audio_url": "https://cdn1.suno.ai/de32f599-1379-4421-9833-97e7774648f5.mp3",
        "image_url": "https://cdn2.suno.ai/image_ca564b42-af29-472e-a3df-fb7828c94366.jpeg",
        "video_url": "",
        "media_urls": [
          { "url": "https://d2lwuy8qc234o3.cloudfront.net/1/clip/de32f599-1379-4421-9833-97e7774648f5.m4a", "delivery": "progressive", "content_type": "m4a-opus" },
          { "url": "https://cdn1.suno.ai/de32f599-1379-4421-9833-97e7774648f5.mp3", "delivery": "progressive", "content_type": "mp3" }
        ],
        "model_name": "chirp-crow",
        "batch_index": 0,
        "created_at": "2026-07-30T09:18:45.472Z",
        "image_large_url": "https://cdn2.suno.ai/image_large_ca564b42-af29-472e-a3df-fb7828c94366.jpeg",
        "major_model_version": "v5"
      }
    ],
    "createTime": 1785403004000,
    "completeTime": 1785403125472
  }
}

Response Fields

FieldTypeDescription
codenumberStatus code; 200 = success
msgstringMessage
data.idstringTask ID (the taskId returned on submit; used to poll)
data.taskTypestringTask type; always "replace_auto"
data.statusstringStatus: pending / succeeded / failed
data.errorMsgstringFailure reason; empty on success
data.paramobjectEcho of your request params, plus the auto-merge progress and results
data.param.mergeTotal / mergeDonenumberCandidates to auto-merge / already merged (both = 2 means both full songs are ready)
data.param.mergedResultsarrayArray of merged full songs; same content as data.result
data.resultarrayAn array of 2 full songs (NOT replace_merge’s {clips:[…]} object) — each candidate auto-merged into a full track
data.result[].idstringFull-song clipId; reusable for extend / cover / export
data.result[].audio_urlstringFull-song audio URL (mp3)
data.result[].image_urlstringCover image URL (image_large_url is the large one)
data.result[].metadata.typestringAlways "concat_infilling" (replaced section merged back into the full song; carries a Full Song badge)
data.result[].metadata.durationnumberFull-song duration (seconds); the two songs may match or differ
data.result[].metadata.edit_session_idstringEdit session ID (= the clipId you passed); both songs share the same source
data.result[].metadata.concat_history[]arrayConcat 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_indexnumberAlways 0 — each song is merged independently, not indexed 0 / 1 like candidates
data.result[].media_urlsarrayMulti-format audio URLs (m4a-opus / mp3)
data.result[].major_model_versionstringModel version used, e.g. v5 / v4.5
data.createTime / completeTimenumberTask submit / completion time (epoch millis)

Billing & Credits

4 credits (x your user rate). Auto-refunded on failure.