Get Full Song API (full-length stitching)
Endpoint description
Full-length stitching joins "the original song + the newly generated fragment" into one complete song: after Extend it appends the following section, and after Replace Section it sews the new fragment back into the original. The official web UI calls this capability Get Full Song.
Endpoint: POST /api/music/concat
Billing: Paid, a flat 0.05 CNY per call. Stitching is decoupled from generation pricing and does not take part in Max Mode or voice-profile multipliers; the amount actually charged follows the back-office price configuration.
Wait times and timeouts (important): this is a synchronous endpoint — the order is only accepted and handed to stitching when the response arrives. Set your client timeout to 300 seconds or more; no response does not mean nothing was stitched, and do not retry immediately after a timeout (that duplicates the order and charges again). If the connection dropped, confirm later with
GET /api/music/songs.
Authentication
| Parameter | Type | Required | Notes |
|---|---|---|---|
| Authorization | string | yes | Bearer YOUR_API_KEY |
| Content-Type | string | yes | application/json |
Request parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| song_id | string | yes | - | The song_id of the fragment to stitch (an extend result or a replace-section result); it must be completed |
| is_infill | boolean | no | false | false = extend stitching; true = replace (infill) stitching |
| source_audio_url | string | no | - | Source audio address, when the fragment comes from an external account |
| source_file_name | string | no | - | Source file name, when the fragment comes from an external account |
| source_title | string | no | - | Source title, when the fragment comes from an external account |
audio_id, source_clip_id and sourceClipId are equivalent spellings of song_id; use any one of them.
Request example
curl -X POST https://www.suno-api.io/api/music/concat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"song_id": "extended_or_replaced_clip_id",
"is_infill": false
}'
To stitch after replacing a section, set is_infill to true:
{ "song_id": "infilled_clip_id", "is_infill": true }
Response
{
"code": 200,
"message": "success",
"data": {
"clips": [
{
"song_id": "concat_clip_id",
"song_title": "Source song title",
"status": "queued"
}
]
}
}
Stitching returns only 1 result (it does not produce 2 songs at once). Save clips[].song_id, then poll the song query API until complete before fetching the audio.
Where the result duration comes from
Stitching does not simply butt two files together end to end; it trims the source song according to the time points recorded in the fragment's history:
| Mode | Result composition |
|---|---|
is_infill: false |
source song [0 .. continue_at] + the full length of the extend fragment |
is_infill: true |
source song [0 .. start] + the replaced new fragment + source song [end .. end of track] |
The original audio after the continue point is therefore discarded, so a whole section is never duplicated.
Notes
- Only completed fragments can be stitched; for a fragment still generating, wait until it finishes first.
- The result is a new record; the original fragment is kept and remains usable.
- To combine two different songs into one, use the mashup API; to keep only one section, use the crop API.
Get an API key
Create an API key in the console after signing up. ¥0.6 per run returns 2 tracks, downloads are unlimited, and no phone number is required.
Get API key Back to overview