Docs / Music Series / Suno / Workflow
Suno Workflow Guide
Suno async workflows covering generation, extension, concatenation, covers, stem separation, and post-processing.
This guide chains Suno's common actions into a few call flows that you can put into practice directly. https://api.apimax.ai in this document is automatically replaced on the documentation page based on the selected API service address.
Use the gateway's unified music entry points: submit with POST /v1/music/* and query tasks with GET /v1/tasks/{id}. A submission returns a gateway-generated public task ID, not a Suno upstream task ID.
1. Generate a Complete Song#
1.1 Submit the Generation Task First#
Simple mode only needs model and prompt. Explicitly set model to suno_music; to pin a specific Suno version, use suno/<version>.
curl --request POST \
--url 'https://api.apimax.ai/v1/music/generations' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno_music",
"prompt": "An upbeat summer pop song with female vocals about a sunset by the sea",
"instrumental": false
}'To customize lyrics, title, and style, use lyrics, title, and style (passing lyrics switches the request to custom-lyrics mode):
{
"model": "suno_music",
"lyrics": "[Verse]\nDriving down the coast at dusk\n[Chorus]\nChasing the summer starlight",
"title": "Summer Dream",
"style": "pop, electronic, upbeat, female vocal",
"instrumental": false
}A successful submission returns a task ID immediately:
{
"code": "success",
"message": "",
"data": "task_bLUMYaMRPxeUIdKwpfCnBycFRDbta8Qf"
}The submission response differs by endpoint. /v1/music/generations and the other music endpoints (extend, cover, sound effects, stems) return the {code, message, data} shape above; the lyrics and post-processing endpoints (lyrics, wav, mp4, concat, crop, fade, speed, remaster, downbeats, reverse, waveform, midi, timing) return:
{
"created_at": 1795404482,
"id": "task_dkJXH4S9CaTd6mHmFZBzM99CuGu99m8I",
"model": "suno_lyrics",
"status": "queued",
"task_id": "task_dkJXH4S9CaTd6mHmFZBzM99CuGu99m8I"
}In both shapes the task ID is the public task ID generated by the gateway.
1.2 Query the Task Through the Unified Endpoint#
Query the task with the task ID from the submission response (data or task_id, depending on the endpoint); do not treat the clip ID returned by the upstream as the task ID:
curl --request GET \
--url 'https://api.apimax.ai/v1/tasks/task_01KABCDEF0123456789XYZ' \
--header 'Authorization: Bearer <API_KEY>'Task status usually moves through the following stages:
| Status | Meaning | Terminal? |
|---|---|---|
queued | Task created, waiting to run | No |
in_progress | The upstream is processing | No |
completed | Task finished; results are in data | Yes |
failed | Task failed; the reason is in error | Yes |
While in the in_progress stage, music tasks may already return intermediate results with an audio_url. You can preview early, but keep polling until completed or failed. Example result after completion:
{
"id": "task_01KABCDEF0123456789XYZ",
"object": "task",
"type": "music",
"platform": "music",
"status": "completed",
"progress": 100,
"model": "suno_music",
"data": [
{
"id": "clip_01",
"title": "Summer Dream",
"audio_url": "https://cdn.example.com/music/clip_01.mp3",
"image_url": "https://cdn.example.com/music/clip_01.jpg",
"duration": 186.4
}
]
}data[].id is the clip_id used later for extension, covers, stem separation, and post-processing.
1.3 Generate Lyrics or Sound Effects First#
If you do not have lyrics yet, submit a lyrics task first, then feed the lyrics text from the completed result into the actual song generation:
~~~bash cURL curl --request POST \ --url 'https://api.apimax.ai/v1/music/lyrics' \ --header 'Authorization: Bearer <API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "Write Chinese pop lyrics about a summer night city walk, gentle in mood with a touch of nostalgia" }' ~~~
Lyrics tasks only need a prompt; after submitting, query them the same way with GET /v1/tasks/{id}. In the completed result, data is a single object (one set of lyrics) and the lyrics text is in data.text.
To create short sound effects, use the dedicated sound effect entry point:
~~~bash curl --request POST \ --url 'https://api.apimax.ai/v1/music/sound' \ --header 'Authorization: Bearer <API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "Ocean waves on a quiet beach", "title": "Calm Sea", "tags": "ocean, ambience", "callback_url": "https://your-app.example/hooks/music" }' ~~~
Sound effect tasks also return a public task ID; poll them with the same task status flow and take the audio_url from data once complete.
2. Extend and Concatenate into a Longer Track#
A single generation usually yields one song segment. To make it longer, first extend from a chosen start point in the existing clip, then concatenate the extended segment into a complete track.
2.1 Extend#
curl --request POST \
--url 'https://api.apimax.ai/v1/music/extend' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"clip_id": "clip_01",
"continue_at": 120,
"prompt": "Push the final chorus forward with a brighter mood",
"title": "Summer Dream - Extended",
"style": "pop, electronic",
"callback_url": "https://your-app.example/hooks/music"
}'The endpoint returns a new task ID. When the extend task completes, take the latest clip ID produced by the extension from data.
2.2 Concatenate#
Pass the latest clip ID from the previous step to POST /v1/music/concat:
curl --request POST \
--url 'https://api.apimax.ai/v1/music/concat' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"clip_id": "clip_01_extended",
"is_infill": false
}'Use the clip ID produced by the extension when concatenating. Passing the originally generated clip usually leaves no extend chain to concatenate and returns a task error.
2.3 Export to Other Formats#
Export actions also run as async tasks, all using clip_id:
| Need | Endpoint |
|---|---|
| Lossless WAV audio | POST /v1/music/wav |
| MP4 video | POST /v1/music/mp4 |
| MIDI file | POST /v1/music/midi |
After submitting, keep querying with GET /v1/tasks/{id}. Once the task completes, use the media URLs in the result directly; the gateway has no separate download endpoint.
3. Adapt Existing Audio#
3.1 Import the Audio as a Clip First#
Cover-style actions revolve around clip_id, which must be a clip inside the Suno ecosystem. It has two sources: Suno-generated songs — the data[].id of a finished Suno music task (suno_music generation, extension, cover, etc.) is already a clip_id and can be used directly; uploaded audio — local files or files you own must first be imported as a clip through the upload endpoint. data[].id values returned by other music services (such as stepaudio-3-music) are not Suno clips and cannot be used for cover. If you already have a local audio file, use the recommended upload entry point:
curl --request POST \
--url 'https://api.apimax.ai/v1/music/upload/audio' \
--header 'Authorization: Bearer <API_KEY>' \
--form 'file=@./song.mp3'Uploading is an async task. When it completes, take the imported clip_id from data and use it for subsequent actions. The endpoint also supports the audio file field, a binary stream, Base64 JSON, and audio_url; see the upload endpoint documentation for the specific limits.
3.2 Cover#
The clip_id can be the clip imported by the upload step above, or the data[].id of any Suno-generated song (for example clip_01 from the suno_music generation in section 1):
curl --request POST \
--url 'https://api.apimax.ai/v1/music/cover' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"clip_id": "clip_uploaded",
"prompt": "Keep the melody and reinterpret it with warm acoustic female vocals",
"title": "Acoustic Cover",
"style": "acoustic pop, warm female vocal",
"instrumental": false
}'For a partial cover, cover_start_s and cover_end_s must both be provided, and the end time must be greater than the start time.
A missing required field returns 400 with error.code set to invalid_request; the cover_clip_id named in the message is the same field as the clip_id in the request.
3.3 Sampling, Mashups, and Style Prompts#
| Goal | Endpoint | Key fields |
|---|---|---|
| Extract a sample from an existing song | POST /v1/music/sample | chop_sample_clip_id |
| Mash up two clips | POST /v1/music/mashup | mashup_clip_ids (two IDs) |
| Get creative inspiration | GET /v1/music/prompts/suggestions | No request body |
| Refine style tags | POST /v1/music/prompts/upsample | original_tags, lyrics |
| Refresh a clip's audio link | POST /v1/music/relink | clip_id |
prompts/suggestions, prompts/upsample, and relink are synchronous endpoints that create no async task; the other actions follow the unified task flow for querying.
4. Stem Separation and Rearrangement#
4.1 Separate Vocals or Instruments#
POST /v1/music/stem supports three modes:
mode=all: extract all available stems.mode=vocals_instrumental: separate vocals from the instrumental.mode=extract: extract one specified track;stemmust also be passed.
{
"continue_clip_id": "clip_01",
"mode": "extract",
"stem": "electric_guitar"
}4.2 Add Vocals or an Instrumental#
| Goal | Endpoint | Required fields |
|---|---|---|
| Add vocals to an instrumental track | POST /v1/music/add-vocals | clip_id, prompt |
| Add an instrumental to vocals or a melody | POST /v1/music/add-instrumental | clip_id, prompt |
| Rewrite a middle section of a song | POST /v1/music/replace-section | continue_clip_id, time-range fields |
Each of these actions returns a task ID after submission, in the same {code, message, data} shape as music generation. A missing required field returns 400; the underpainting_clip_id and overpainting_clip_id named in the message are the same field as the clip_id in the request. Example replace-section request body:
{
"continue_clip_id": "a1cfafb6-687a-472d-8493-35d0d621667f",
"infill_context_start_s": 60,
"infill_context_end_s": 90,
"infill_start_s": 65,
"infill_end_s": 85,
"infill_duration_s": 20,
"prompt": "[Verse]\nProbe replacement line one\nProbe replacement line two\n"
}Here continue_clip_id is the source clip; infill_context_start_s / infill_context_end_s is the context range the model listens to; infill_start_s / infill_end_s is the range to replace, which must lie inside the context range; infill_duration_s is the length of the replacement in seconds and must be greater than 0; prompt holds the new lyrics for that section.
5. Reuse a Voice#
Suno's voice workflow offers two approaches:
| Approach | Step 1 | Step 2 | Final result |
|---|---|---|---|
| Real-person sample verification | POST /v1/music/voice/sample | POST /v1/music/voice/create | persona_id |
| Extract from an existing song | POST /v1/music/voice/from-clip | — | persona_id |
In the first approach, voice/sample returns a verification phrase. A real person must read the phrase aloud, and the recording is passed to voice/create; synthesized speech or replaying the original audio may fail verification. Both steps are queried with GET /v1/tasks/{id}.
Once you have a persona_id, pass it in the music generation request:
{
"model": "suno_music",
"prompt": "A soothing late-night jazz piece",
"persona_id": "persona_01"
}6. Post-Processing and Analysis#
All post-processing actions target an existing clip_id; after submitting, poll the task as usual. These endpoints answer a submission with {id, task_id, status, model, created_at} (see 1.1):
| Capability | Endpoint | Key fields |
|---|---|---|
| Adjust speed | POST /v1/music/speed | speed_multiplier, keep_pitch |
| Crop or remove a range | POST /v1/music/crop | crop_start_s, crop_end_s, is_crop_remove |
| Fade in/out | POST /v1/music/fade | fade_in_time, fade_out_time |
| Remaster or upsample | POST /v1/music/remaster | clip_id |
| Reverse playback | POST /v1/music/reverse | clip_id |
| Lyrics timeline | POST /v1/music/timing | clip_id |
| Waveform data | POST /v1/music/waveform | clip_id |
| Downbeat analysis | POST /v1/music/downbeats | clip_id |
For example, add a fade in/out to a song:
{
"clip_id": "clip_01",
"fade_in_time": 2,
"fade_out_time": 3
}7. Callbacks, Billing, and FAQ#
Callbacks#
Async requests can carry a callback_url, which must be a publicly accessible HTTPS address. On the generation endpoints an invalid address is rejected with 400 invalid_callback_url; on the lyrics and post-processing endpoints it does not raise an error, but the task receives no callback. When you receive multiple callbacks for the same task, handle them idempotently by task ID. Without a callback, simply poll GET /v1/tasks/{id} at 2-5 second intervals.
Billing#
Music generation and further processing are billed at the corresponding model or action price, such as suno_music, suno_extend, or suno_cover. Exact unit prices follow the model details and your current account configuration; the synchronous prompt-assist and link-refresh endpoints (prompts/suggestions, prompts/upsample, relink) are currently free of charge.
FAQ#
- Concatenation fails: confirm that
concatuses the clip generated by the most recentextend, not the original clip. - A task never reaches a terminal state: keep polling the same gateway
task_id; do not switch to an upstream task ID. When the upstream does not process a task for a long time, the task turnsfailedautomatically witherror.messageset totask_timeout(observed: about 5 minutes if it never started, about 15 minutes while in progress), and the charge is refunded. - Upload times out: the upload endpoint processes the transfer and import first, so clients should set a longer timeout and make sure
audio_urlis directly downloadable from the public internet. - Result links expire: download or transfer files promptly after receiving
audio_url,video_url, or other file URLs, and keep the task ID for troubleshooting.

