Skip to main content
POST /api/generate_stems
Requests Suno to separate an existing song into its component audio stems — typically a vocal track and an instrumental (backing) track. Stems are useful for remixing, karaoke, music production, or any workflow that requires the voice and the music to be handled independently.
The server reads your Suno session from the SUNO_COOKIE environment variable. Pass a Cookie header containing a valid __client value to use a different Suno account on a per-request basis.
audio_id is required. The server returns 400 Bad Request if it is missing.

Request body

audio_id
string
required
The ID of the existing Suno song to generate stems for. The song must already exist in your Suno account.

Response

An array of stem clip objects. Suno typically returns two clips: one for the vocal track and one for the instrumental track.
[].id
string
Unique identifier for the stem clip.
[].status
string
Generation status of the stem clip: submitted, queued, streaming, complete, or error.
[].created_at
string
ISO 8601 timestamp of when the stem clip was created.
[].title
string
Title of the stem clip, typically indicating whether it is the vocal or instrumental track.
[].stem_from_id
string
The ID of the original song this stem was derived from. Matches the audio_id you supplied in the request.
[].duration
string
Duration of the stem clip in seconds.

Error responses

StatusMeaning
400audio_id is missing
402Out of Suno credits — payment required
500Internal server error
503Network error connecting to Suno

Examples

Request

curl -X POST http://localhost:3000/api/generate_stems \
  -H "Content-Type: application/json" \
  -d '{
    "audio_id": "c3d4e5f6-a7b8-9012-cdef-123456789012"
  }'

Response

[
  {
    "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
    "status": "complete",
    "created_at": "2024-01-15T12:00:00.000Z",
    "title": "Ocean Wanderer (Vocals)",
    "stem_from_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "duration": "183.4"
  },
  {
    "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "status": "complete",
    "created_at": "2024-01-15T12:00:00.000Z",
    "title": "Ocean Wanderer (Instrumental)",
    "stem_from_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "duration": "183.4"
  }
]

Build docs developers (and LLMs) love