Developer API v1.1

Build with the SoundGen API. Generation, stems, voices, MIDI, and collaboration — one RESTful API.

Integrate AI-powered music generation, stem separation, voice cloning, MIDI export, and real-time collaboration into your applications.

Sound Library

1000+ AI sounds

AI Generation

Text to music

Stem Separation

Isolate tracks

Voice Cloning

Custom voices

01Overview

Overview

The SoundGen API (v1.1) provides programmatic access to our AI music generation platform. Use it to generate custom music, access our sound library, separate stems from audio files, create custom voice clones, import/export MIDI, and manage collaborative projects with version branching, track locking, and timeline comments.

39

API Endpoints

192kHz

Max Sample Rate

11

Separable Stems

MIDI

Import/Export

Base URL
https://soundgen.ai/api/api-v1
02Authentication

Authentication

Most endpoints require authentication using an API key. Include your API key in theAuthorizationheader.

Request Header

Authorization: Bearer YOUR_API_KEY

Keep your API key secure

Never expose your API key in client-side code. Use environment variables and server-side requests. Create keys in Settings → Integrations → API Keys (it asks for your current password, and every new key is announced by email): a key is shown once, when it is created, because SoundGen stores only its SHA-256. If one leaks or is lost, delete it there (that revokes it at once) and create another.

Public Endpoints

No authentication required:

  • • GET /sounds
  • • GET /genres
  • • GET /stats
  • • GET /projects
  • • GET /voices

Protected Endpoints

API key required:

  • • POST /generate
  • • POST /stems
  • • POST /clone
  • • POST /synthesize
  • • GET /generations
03Sounds

Sounds

GET
/sounds

Retrieve a paginated list of publicly published sounds. Private sounds are never returned, even to their owner — this endpoint serves the public catalogue only.

Parameters

limitnumberNumber of sounds to return (max 100)(default: 20)
offsetnumberPagination offset(default: 0)
genrestringFilter by genre (e.g., 'electronic', 'ambient')
featuredbooleanReturn only featured sounds
searchstringSearch in title, artist, and description

Example Request

curl "https://soundgen.ai/api/api-v1/sounds?limit=10&genre=electronic"

Response

{
  "success": true,
  "data": {
    "sounds": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "title": "Cosmic Wave",
        "artist": "AI Producer",
        "genre": "electronic",
        "bpm": 128,
        "key": "Am",
        "duration": 180,
        "file_url": "https://...",
        "thumbnail_url": "https://...",
        "tags": ["synth", "ambient"],
        "like_count": 42,
        "download_count": 156,
        "is_featured": true,
        "is_free": true,
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "total": 150
    }
  }
}
GET
/sounds/{id}

Retrieve a single publicly published sound by its ID. Private sounds return 404.

Parameters

iduuidThe unique sound identifier
required

Example Request

curl "https://soundgen.ai/api/api-v1/sounds/550e8400-e29b-41d4-a716-446655440000"

Response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "Cosmic Wave",
    "artist": "AI Producer",
    "genre": "electronic",
    "bpm": 128,
    "key": "Am",
    "duration": 180,
    "file_url": "https://...",
    "thumbnail_url": "https://...",
    "waveform_url": "https://...",
    "description": "An atmospheric electronic track...",
    "tags": ["synth", "ambient"],
    "like_count": 42,
    "download_count": 156,
    "is_featured": true,
    "is_free": true,
    "created_at": "2024-01-15T10:30:00Z"
  }
}
GET
/genres

Get a list of all available genres

Example Request

curl "https://soundgen.ai/api/api-v1/genres"

Response

{
  "success": true,
  "data": {
    "genres": ["ambient", "cinematic", "electronic", "hip-hop", "jazz", "rock"],
    "count": 6
  }
}
GET
/stats

Get platform statistics

Example Request

curl "https://soundgen.ai/api/api-v1/stats"

Response

{
  "success": true,
  "data": {
    "total_sounds": 1250,
    "total_projects": 450,
    "top_genres": [
      { "genre": "electronic", "count": 320 },
      { "genre": "ambient", "count": 180 }
    ],
    "api_version": "v1",
    "last_updated": "2024-01-15T10:30:00Z"
  }
}
04AI Generation

AI Generation

Generate music or sound effects from text prompts. A generation runs to completion and the call answers with the finished track; send your own request_id so a dropped connection can be recovered with the same id instead of generating (and paying) twice.

POST
/generate

Generate music (ElevenLabs Music) or a sound effect from a text prompt, as the API key's owner — the same run as the generate_audio MCP tool. Runs to completion (usually one to three minutes; a long song can take up to about ten) and answers with the finished track (status "completed"; or "not_stored" with a warning and no audio_url when it generated but could not be saved, which is not charged). Music costs 30 s 20 · 1 min 38 · 2 min 69 · 3 min 94 · 5 min 125 credits by length (longer songs cost less per minute); a sound effect 5. Charged only when audio comes back. Every request has a request_id (send your own UUID, in the body or an Idempotency-Key header, to make retries safe): re-sending the same id never generates or charges twice — it returns the first result (recovered: true). If the outcome is unknown (your connection dropped, or the id is still running) the answer is 202 with status "unresolved" and a poll_url; read that rather than starting a new request. There are no webhooks: webhook_url is refused with 400 WEBHOOKS_UNSUPPORTED.

Parameters

promptstringThe sound: style, genre, mood, instrumentation. Not the lyrics
required
kindstring"music" or "sound-effects"(default: music)
durationnumberSeconds: music 3-300, sound effects 0.5-22; outside the range is 400 INVALID_DURATION(default: 30 (music), 5 (sound effects))
bpmnumberTempo, 20-400, written into the brief
keystringMusical key, e.g. "A minor"
genrestringGenre, written into the brief
moodstringMood, written into the brief
lyricsstringExact words to sing; omit to let the model write its own
instrumentalbooleanForce no vocals (ignored when lyrics are given)
titlestringTitle for the track (defaults to the prompt's start)
request_idstringUUID identifying this request (or send it as the Idempotency-Key header); generated and returned when omitted
musiciansstring[]Up to 4 AI musician ids (GET /musicians): their style, feel and skills are briefed into the take — never their names — and they are credited on it. Your own, published, or shared with your team.
stylestringThis version's name in a batch, e.g. "Drum & Bass" (up to 40 characters). Ratings and taste are kept per style; the sound itself is described in prompt
batch_idstringGroups versions of one song: a UUID, or up to 64 lowercase letters, digits and hyphens (e.g. daily-2026-11-16). The same for every version; read it back with GET /batches/{batch_id}
style_indexnumberWith batch_id: this version's 0-based position (0-19); its number in the batch is style_index + 1
use_tastebooleanAppend what your ratings say you like (GET /taste brief) to the prompt. Sends nothing until you have rated 3 songs; the result's taste_guided says whether it was applied(default: false)

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "prompt": "upbeat electronic track with synth arpeggios",
    "duration": 60,
    "bpm": 128,
    "genre": "electronic"
  }'

Response

{
  "success": true,
  "data": {
    "generation_id": "7d0f3c1e-…",
    "request_id": "0b6c2f9a-…",
    "status": "completed",
    "audio_url": "https://…",
    "duration": 60,
    "title": "upbeat electronic track with synth arpeggios",
    "credits_charged": 38
  }
}

// A retry with the same request_id returns this same result with
// "recovered": true and "credits_charged": 0 (the first call was charged).

// 202 — outcome unknown; poll, do not start a new request
{
  "success": true,
  "data": {
    "request_id": "0b6c2f9a-…",
    "status": "unresolved",
    "poll_url": "https://soundgen.ai/api/api-v1/generations?request_id=0b6c2f9a-…",
    "message": "…"
  }
}

// 402 — too few credits; nothing charged
{
  "success": false,
  "error": { "code": "INSUFFICIENT_CREDITS", "message": "…", "request_id": "0b6c2f9a-…" }
}
POST
/tools/edit_song

Extend one of your finished ElevenLabs songs, or rewrite one section of it, keeping the rest note-for-note. The result is a new generation; the original is unchanged. Priced on the song's length plus the result's, each at the music rate (30 s 20 · 1 min 38 · 2 min 69 · 3 min 94 · 5 min 125 credits by length; results up to 10 minutes). Charged only when audio comes back; a refusal before work starts (bad range, not editable, too few credits) charges nothing. Stable Audio songs and uploads cannot be edited. Runs to completion; if the connection drops, read get_generation with the same request_id rather than retrying under a new one. Also the edit_song MCP tool.

Parameters

generation_idstringThe song to edit (from generate_audio or list_generations)
required
modestring"extend" or "replace" (rewrite a section)
required
extend_secondsnumberextend: seconds of new music (3-120)
positionstringextend: "start" or "end"(default: end)
start_secondsnumberreplace: section start, seconds from the song's start
end_secondsnumberreplace: section end; the span must be 3-120 s
promptstringWhat the new part should sound like; defaults to the song's own style
lyricsstringOptional words for the new part
request_idstringUUID; generated when omitted. Reuse it to recover, never to start a second edit

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/tools/edit_song" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "generation_id": "GENERATION_UUID", "mode": "extend", "extend_seconds": 30, "prompt": "an outro that fades on the hook" }'

Response

{
  "success": true,
  "data": {
    "generation_id": "7d0f3c1e-…",
    "source_generation_id": "GENERATION_UUID",
    "request_id": "0b6c2f9a-…",
    "status": "completed",
    "audio_url": "https://…",
    "duration": 150,
    "credits_charged": 151
  }
}
GET
/generations

Your generation history, newest first — only the API key owner's rows. With request_id, the one generation started with that id (the way to recover a POST /generate whose connection dropped); 404 there means it never reached the server, so re-sending it with the same request_id is safe. status "pending" means claimed with no recorded outcome yet: not a failure, and not known to be charged or free.

Parameters

limitnumberResults per page (1-100)(default: 20)
offsetnumberPagination offset(default: 0)
statusstringFilter: pending, completed or failed
request_idstringReturn the one generation started with this UUID

Example Request

curl "https://soundgen.ai/api/api-v1/generations?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "generations": [
      {
        "id": "7d0f3c1e-…",
        "request_id": "0b6c2f9a-…",
        "type": "music",
        "model": "elevenlabs-music",
        "status": "completed",
        "prompt": "upbeat electronic track",
        "title": "upbeat electronic track",
        "audio_url": "https://…",
        "duration": 60,
        "parameters": { "genre": "electronic", "bpm": 128, "instrumental": false, "has_lyrics": false },
        "style": null,
        "batch_id": null,
        "credits_charged": 38,
        "error": null,
        "created_at": "2026-11-07T10:30:00Z",
        "updated_at": "2026-11-07T10:31:12Z"
      }
    ],
    "pagination": { "limit": 10, "offset": 0, "total": 25 }
  }
}
GET
/generations/{id}

One of your generations by its generation_id, in the same shape as the list. audio_url is set only when status is completed; error only when failed; credits_charged is null while pending. Another user's id is 404.

Parameters

idstringThe generation_id (a UUID)
required

Example Request

curl "https://soundgen.ai/api/api-v1/generations/GENERATION_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "id": "GENERATION_UUID",
    "request_id": "0b6c2f9a-…",
    "type": "music",
    "model": "elevenlabs-music",
    "status": "failed",
    "prompt": "upbeat electronic track",
    "title": "upbeat electronic track",
    "audio_url": null,
    "duration": 60,
    "parameters": { "genre": "electronic" },
    "style": null,
    "batch_id": null,
    "credits_charged": 0,
    "error": "…",
    "created_at": "2026-11-07T10:30:00Z",
    "updated_at": "2026-11-07T10:30:40Z"
  }
}
POST
/generate

A batch: one set of lyrics as up to 20 versions, one per style (breakbeat, drum & bass, acoustic, hip-hop …), to rate and pick from. Send one POST /generate per style with the same batch_id, that style's name and its style_index, each under its own Idempotency-Key; three at a time is what the app runs. Each song is an ordinary generation — its own charge, its own recovery by request_id — so there is no batch job to start or cancel, and a song that failed can be re-sent at the same style_index under a new key. Read the batch back with GET /batches/{batch_id}, rate each song with PUT /generations/{id}/rating, and pass use_taste: true so the next day's batch leans toward what you liked. Nothing runs server-side between your requests: keep the loop in your script (a daily cron is enough).

Parameters

batch_idstringOne id for the whole batch; a fresh UUID per day works
required
stylestringThe version's name (GET /style-lists gives a ready list)
required
style_indexnumber0-based position; number = style_index + 1
required
promptstringThe style's sound (a style list's prompt)
required
lyricsstringThe same approved lyrics for every version
use_tastebooleanSteer by your ratings(default: false)

Example Request

# Every style of your first style list, 3 at a time (needs jq and uuidgen).
export SOUNDGEN_API_KEY BASE="https://soundgen.ai/api/api-v1" BATCH="$(uuidgen | tr A-Z a-z)"
curl -s "$BASE/style-lists" -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  | jq -c '.data.style_lists[0].styles' > styles.json
jq -r 'keys[]' styles.json | xargs -P 3 -n 1 sh -c '
  jq --argjson i "$0" --arg batch "$BATCH" --rawfile lyrics lyrics.txt \
    "{prompt: .[\$i].prompt, style: .[\$i].name, style_index: \$i, batch_id: \$batch,
      lyrics: \$lyrics, duration: 120, use_taste: true}" styles.json \
  | curl -s -X POST "$BASE/generate" -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
      -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" -d @- \
  | jq -c "{number: ($0 + 1), status: .data.status, audio_url: .data.audio_url}"'
curl -s "$BASE/batches/$BATCH" -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "generation_id": "7d0f3c1e-…",
    "request_id": "0b6c2f9a-…",
    "status": "completed",
    "audio_url": "https://…",
    "duration": 120,
    "credits_charged": 69,
    "batch_id": "5f0c3a8e-…",
    "style": "Drum & Bass",
    "style_index": 1,
    "taste_guided": true
  }
}

// Each POST answers like any POST /generate (202 unresolved included), with the batch fields echoed.
GET
/batches

Your recent batches, newest first: how many songs each has, how many finished, when it started and its styles in order.

Parameters

limitnumberBatches to return (1-50)(default: 10)

Example Request

curl "https://soundgen.ai/api/api-v1/batches" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "batches": [
      { "batch_id": "5f0c3a8e-…", "songs": 20, "completed": 19, "started_at": "2026-11-16T08:00:04Z", "styles": ["Breakbeat", "Drum & Bass", "…"] }
    ]
  }
}
GET
/batches/{batch_id}

One batch's songs in order, numbered style_index + 1, each with its status, audio_url (when completed), generation_id and your rating. A re-sent song shares its number with the take it replaced. Only your own generations are read; an id none of them carries is 404.

Parameters

batch_idstringThe batch_id the songs were sent with
required

Example Request

curl "https://soundgen.ai/api/api-v1/batches/BATCH_ID" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "batch_id": "5f0c3a8e-…",
    "songs": [
      {
        "number": 1, "style": "Breakbeat", "style_index": 0, "status": "completed",
        "generation_id": "7d0f3c1e-…", "request_id": "0b6c2f9a-…", "audio_url": "https://…",
        "duration": 120, "error": null, "rating": "like", "note": "huge drums", "created_at": "2026-11-16T08:00:04Z"
      },
      {
        "number": 2, "style": "Drum & Bass", "style_index": 1, "status": "failed",
        "generation_id": "9a1b…", "request_id": "c3d4…", "audio_url": null,
        "duration": 120, "error": "…", "rating": null, "note": null, "created_at": "2026-11-16T08:00:05Z"
      }
    ],
    "counts": { "songs": 2, "completed": 1, "failed": 1, "pending": 0, "rated": 1 }
  }
}
PUT
/generations/{id}/rating

Like or dislike one of your finished songs, with an optional note in your own words ("drums too busy"). Rating again replaces it; DELETE /generations/{id}/rating clears it. Ratings are what GET /taste and use_taste learn from, per style. Someone else's generation is 404; one that has not finished is 409 NOT_RATEABLE.

Parameters

idstringThe generation_id (in the path)
required
ratingstring"like" or "dislike"
required
notestringUp to 500 characters

Example Request

curl -X PUT "https://soundgen.ai/api/api-v1/generations/GENERATION_UUID/rating" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating": "like", "note": "huge drums, keep the bassline"}'

Response

{
  "success": true,
  "data": { "generation_id": "GENERATION_UUID", "rating": "like", "note": "huge drums, keep the bassline", "style": "Breakbeat", "batch_id": "5f0c3a8e-…" }
}
DELETE
/generations/{id}/rating

Clear your rating of one of your generations. Someone else's generation is 404.

Parameters

idstringThe generation_id (in the path)
required

Example Request

curl -X DELETE "https://soundgen.ai/api/api-v1/generations/GENERATION_UUID/rating" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": { "generation_id": "GENERATION_UUID", "rating": null, "note": null, "style": "Breakbeat", "batch_id": "5f0c3a8e-…" }
}
GET
/taste

What your ratings say you like: how many songs you rated, liked and disliked, each style's likes and a smoothed score (best first), your notes, and brief — the text use_taste appends to a prompt (empty until you have rated 3 songs). With style_list_id, also which of that list's styles to keep (liked three times in four) or replace (disliked three in four), and the order to make them in, favourites first.

Parameters

style_list_idstringA list from GET /style-lists, for suggestions and order
stylestringShape the brief for one style, as use_taste does for that song

Example Request

curl "https://soundgen.ai/api/api-v1/taste?style_list_id=my-styles" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "rated": 40, "liked": 22, "disliked": 18,
    "styles": [
      { "style": "Breakbeat", "liked": 5, "disliked": 0, "score": 0.857 },
      { "style": "Trap", "liked": 0, "disliked": 4, "score": 0.167 }
    ],
    "liked_notes": ["huge drums"],
    "disliked_notes": ["too dark"],
    "brief": "Listener taste, learned from 40 rated songs (a guide; the style above comes first): …",
    "style_list_id": "my-styles",
    "suggestions": { "keep": ["Breakbeat"], "replace": ["Trap"] },
    "order": ["Breakbeat", "Drum & Bass", "…", "Trap"]
  }
}
GET
/style-lists

Your saved style lists, most recently edited first (up to 20 lists of up to 20 styles). Each style is a short name and the prompt its song is generated from. An account with none gets the 20-style starter list (id my-styles, saved: false) — usable as it is, saved once you PUT it. GET /style-lists/{id} reads one.

Example Request

curl "https://soundgen.ai/api/api-v1/style-lists" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "style_lists": [
      {
        "id": "my-styles", "name": "My styles", "saved": false, "updated_at": null,
        "styles": [
          { "id": "breakbeat", "name": "Breakbeat", "prompt": "Breakbeat, chopped funk breaks, rolling bassline, big drum fills, 130 bpm" },
          { "id": "drum-and-bass", "name": "Drum & Bass", "prompt": "Drum and bass, fast rolling breaks at 174 bpm, deep sub bass, liquid pads" }
        ]
      }
    ]
  }
}
PUT
/style-lists/{id}

Create a style list, or replace the one with this id. styles is a list of names ("lo-fi hip-hop") or {name, prompt} objects; duplicates by name are dropped. 20 lists at most: one more is 409 STYLE_LIST_LIMIT.

Parameters

idstring1-64 letters, digits, - or _ (in the path)
required
namestringUp to 60 characters
required
stylesarray1-20 styles: a name (up to 40 characters) or {name, prompt} (prompt up to 300; defaults to the name)
required

Example Request

curl -X PUT "https://soundgen.ai/api/api-v1/style-lists/daily" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Daily", "styles": ["Breakbeat", {"name": "Drum & Bass", "prompt": "Liquid drum and bass, 174 bpm"}, "Acoustic", "Hip-hop"]}'

Response

{
  "success": true,
  "data": {
    "id": "daily", "name": "Daily", "saved": true, "updated_at": null,
    "styles": [
      { "id": "breakbeat", "name": "Breakbeat", "prompt": "Breakbeat" },
      { "id": "drum-bass", "name": "Drum & Bass", "prompt": "Liquid drum and bass, 174 bpm" }
    ]
  }
}
DELETE
/style-lists/{id}

Delete one of your saved style lists. An id you have not saved is 404.

Parameters

idstringThe list id (in the path)
required

Example Request

curl -X DELETE "https://soundgen.ai/api/api-v1/style-lists/daily" -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": { "id": "daily", "deleted": true }
}
05Stem Separation

Stem Separation

Separate audio files into individual stems: vocals, drums, bass, and more. Powered by AI-based source separation technology.

Available Stems

vocals
drums
bass
other
piano
guitar
kick
snare
toms
hihat
cymbals
POST
/stems

Separate an audio file into stems with Demucs. Synchronous: the reply carries the finished stems (a long song can take a few minutes). Asking for piano or guitar runs the deep six-source model. The drum parts (kick, snare, toms, hihat, cymbals) are accepted, but the drum split is not switched on: they come back as the whole drums stem, with deepCascadeApplied false. Costs 6 credits (deep 9), charged only when stems come back; the balance is checked first (402 INSUFFICIENT_CREDITS, nothing run). creditsCharged in the reply is what was taken; creditChargeError means the debit did not go through and is collected later — do not pay it another way. Send an Idempotency-Key header (a UUID) to make a retry safe: the same key returns the first result without running or charging again, and answers 409 REQUEST_IN_PROGRESS while the first attempt is still running.

Parameters

audio_urlstringPublic http(s) URL of the audio file to process
required
request_idstringYour id for this request (a UUID; or send it as the Idempotency-Key header). A retry with the same id returns the first stems
stemsarrayWhich stems to extract: vocals, drums, bass, other, piano, guitar (kick, snare, toms, hihat and cymbals are accepted and return the whole drums stem)(default: ["vocals", "drums", "bass", "other"])
qualitystringfast, standard or high(default: "standard")

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/stems" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "audio_url": "https://example.com/song.mp3",
    "stems": ["vocals", "drums", "bass", "other"]
  }'

Response

{
  "success": true,
  "data": {
    "success": true,
    "jobId": "6f1c2a9e-1b2d-4c5e-9f3a-7d8e9f0a1b2c",
    "status": "completed",
    "stems": {
      "vocals": { "url": "https://…/vocals.wav", "duration": null },
      "drums": { "url": "https://…/drums.wav", "duration": null },
      "bass": { "url": "https://…/bass.wav", "duration": null },
      "other": { "url": "https://…/other.wav", "duration": null }
    },
    "message": "AI-powered stem separation completed using Demucs.",
    "processingTime": 41.2,
    "isDemo": false,
    "mode": "standard",
    "deepCascadeApplied": false,
    "persisted": true,
    "billing": "server",
    "creditsCharged": 6
  }
}
POST
/tools/transcribe_speech

Speech or sung lyrics to text (ElevenLabs Scribe), with timed lines and words. Billed by length, about 2 credits per minute (1 minimum), only when a transcript comes back. Up to 60 minutes. Also the transcribe_speech MCP tool.

Parameters

audio_urlstringHosted URL of the audio
required
duration_secnumberLength in seconds (quotes the charge); measured when omitted
language_codestringISO 639-1/3 code; omitted = auto-detect
diarizebooleanLabel speakers(default: false)
tag_audio_eventsbooleanInclude (laughter)-style event tags in the text(default: false)
request_idstringUUID; reuse it on retry so the charge is not taken twice

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/tools/transcribe_speech" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "audio_url": "https://example.com/vocal.wav" }'

Response

{
  "success": true,
  "data": {
    "text": "Hold on to me. Never let go",
    "languageCode": "en",
    "durationSec": 180,
    "lines": [
      { "text": "Hold on to me.", "start": 0.5, "end": 1.6 },
      { "text": "Never let go", "start": 3.2, "end": 4.2 }
    ],
    "words": [
      { "text": "Hold", "start": 0.5, "end": 0.8 }
    ],
    "creditsCharged": 6,
    "billing": "server"
  }
}
06Voice Cloning

Voice Cloning

Create custom AI voices from audio samples, or use our pre-built voices for text-to-speech synthesis.

GET
/voices

List the voices you can synthesize with: ElevenLabs' stock voices plus the ones you cloned. Free.

Example Request

curl "https://soundgen.ai/api/api-v1/voices" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "voices": [
      { "voice_id": "21m00Tcm4TlvDq8ikWAM", "name": "Rachel", "category": "premade", "description": null, "preview_url": "https://…/preview.mp3", "labels": {} },
      { "voice_id": "Xb7hH8MSUJpSbSDYk0k2", "name": "My Voice", "category": "cloned", "description": "Custom voice for narration", "preview_url": null, "labels": { "soundgen_owner": "your-user-id" } }
    ],
    "count": 2
  }
}
POST
/clone

Clone a voice (ElevenLabs instant voice clone) from audio you stored with SoundGen. Synchronous: the voice is ready when the reply arrives. Costs 30 credits, charged only when the voice is created; the balance is checked first (402 INSUFFICIENT_CREDITS). Send an Idempotency-Key header (a UUID) to make a retry safe: the same key returns the first result without running or charging again, and answers 409 REQUEST_IN_PROGRESS while the first attempt is still running.

Parameters

namestringName for the cloned voice
required
audio_urlsarray1-25 URLs of audio stored with SoundGen (your uploads or recordings, or published sounds)
required
descriptionstringOptional description
labelsobjectOptional string labels kept on the voice

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/clone" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "name": "My Voice",
    "audio_urls": ["https://…/sounds/voice-samples/your-user-id/take-1.webm"],
    "description": "Custom voice for narration"
  }'

Response

{
  "success": true,
  "data": {
    "voice_id": "Xb7hH8MSUJpSbSDYk0k2",
    "name": "My Voice",
    "description": "Custom voice for narration",
    "status": "ready",
    "sample_count": 1,
    "credits_charged": 30
  }
}
POST
/synthesize

Speak text in a stock voice or one you cloned. Synchronous: the reply carries the finished MP3 as audio_url, a signed link (about an hour) to the copy stored in your SoundGen storage. Costs 6 credits per request, charged only when audio comes back; the balance is checked first (402 INSUFFICIENT_CREDITS). credit_charge_error means the debit did not go through and is collected later. Send an Idempotency-Key header (a UUID) to make a retry safe: the same key returns the first result without running or charging again, and answers 409 REQUEST_IN_PROGRESS while the first attempt is still running.

Parameters

textstringText to synthesize (max 5000 chars)
required
voice_idstringA voice_id from GET /voices
required
speednumber0.7-1.2 (clamped)(default: 1)
stabilitynumber0-1(default: 0.5)
similarity_boostnumber0-1(default: 0.75)
output_formatstringmp3 only(default: mp3)

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/synthesize" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "text": "Welcome to SoundGen, your AI music creation platform.",
    "voice_id": "21m00Tcm4TlvDq8ikWAM"
  }'

Response

{
  "success": true,
  "data": {
    "synthesis_id": "4b7e1f0c-2a3d-4e5f-8a9b-0c1d2e3f4a5b",
    "status": "completed",
    "voice_id": "21m00Tcm4TlvDq8ikWAM",
    "text_length": 52,
    "output_format": "mp3",
    "content_type": "audio/mpeg",
    "bytes": 61440,
    "audio_url": "https://…/audio/voice/your-user-id/4b7e1f0c-….mp3?…",
    "credits_charged": 6
  }
}
07Projects

Projects

Access public projects created on SoundGen, including their tracks, settings, and metadata.

GET
/projects

List public projects

Parameters

limitnumberNumber of results(default: 20)
offsetnumberPagination offset(default: 0)

Example Request

curl "https://soundgen.ai/api/api-v1/projects?limit=10"

Response

{
  "success": true,
  "data": {
    "projects": [
      {
        "id": "proj_abc123",
        "name": "Summer Vibes EP",
        "description": "A collection of summer-themed tracks",
        "bpm": 120,
        "key": "C",
        "duration": 180,
        "tags": ["summer", "electronic"],
        "thumbnail_url": "https://...",
        "is_public": true,
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "pagination": { "limit": 10, "offset": 0, "total": 25 }
  }
}
GET
/projects/{id}

Get details of a public project

Parameters

iduuidThe project ID
required

Example Request

curl "https://soundgen.ai/api/api-v1/projects/550e8400-e29b-41d4-a716-446655440000"

Response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Summer Vibes EP",
    "description": "A collection of summer-themed tracks",
    "bpm": 120,
    "key": "C",
    "duration": 180,
    "tags": ["summer", "electronic"],
    "thumbnail_url": "https://...",
    "tracks": [...],
    "settings": {...},
    "is_public": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T12:00:00Z"
  }
}
08AI Processing

AI Audio Processing

One endpoint fronts every AI audio operation — mixing, mastering, chord and tempo detection, stem work, sound design and more. Pick the operation with theactionfield.

POST
/ai-process

Run one of the AI audio actions. The `action` field selects which; everything else in the body is forwarded to it. `prompt-to-loop` and `text-to-sfx` render audio; the others are written by a language model from the text fields (genre, bpm, key, prompt) and do not listen to `audio_url`, so chord-detection and melody-extraction suggest a progression or melody that suits the description, not the one in a file (the reply's `note` says so). Removed actions (`audio-upscale`, `reference-match`) answer 410 with code ACTION_REMOVED and what replaced them.

Parameters

actionstringOne of: auto-mix, mastering, chord-detection, melody-extraction, melody-continuation, lyrics-generation, vocal-tuning, noise-removal, beat-match, arrangement-suggest, fill-generation, sound-design, vocal-harmonize, prompt-to-loop, text-to-sfx, instrument-separation, tempo-key-detection
required
promptstringWhat to make or suggest (with genre, bpm and key for the written actions)
audio_urlstringAccepted for compatibility; no action listens to it

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/ai-process" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"chord-detection","genre":"lofi","key":"A minor","bpm":80}'

Response

{
  "success": true,
  "generated": true,
  "chords": {
    "chords": [{ "time": 0, "duration": 2, "chord": "Am7", "confidence": 0.8 }],
    "key": "A",
    "scale": "minor"
  },
  "note": "Suggested from tempo/key/genre — the audio was not analysed."
}
09AI Musicians

AI Musicians

Persistent AI performer profiles — a drummer with a feel, a bassist with a style — that you can reuse across projects. Every request is scoped to the authenticated caller.

GET
/musicians

List your AI musicians. Always scoped to the authenticated caller — a user_id in the request is ignored.

Example Request

curl "https://soundgen.ai/api/api-v1/musicians" -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "musicians": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Session Drummer",
        "role": "drummer",
        "style": "neo-soul",
        "personality": "laid back, behind the beat",
        "skills": ["ghost notes", "brushes"],
        "profile": { "groove": "swung", "swing": 62 },
        "is_active": true,
        "collaborations": 4,
        "brief": "Drums: neo-soul style; swung groove; plays behind the beat, relaxed; ghost notes; brushes.",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ]
  }
}
POST
/musicians

Create an AI musician. Only `name` and `role` are required; every other field shapes what it plays. The response includes `brief` — the text it adds to a generation (pass its id in POST /generate `musicians`). At most 50 per account, 30 created per hour.

Parameters

namestringDisplay name
required
rolestringsinger, drummer, bassist, guitarist, synth, producer, mixer or mastering ("Vocalist", "Sound designer" and similar map to the nearest)
required
descriptionstringFree-text brief
stylestringGenre or stylistic leaning
personalitystringHow they play — feel, dynamics, tendencies
skillsstring[]Specific techniques (up to 20)
profileobjectMusical settings: traits[], genres[] (genre ids), tempoMin/tempoMax, keys[], swing (MPC % 50–75), complexity 1–5, humanize 0–1, groove, bassStyle, voicing, synthRecipe, lyricThemes, rhyme, vocabulary, mixTemplate, masterLufs, masterTone, arrangement, avoid. Unknown keys are dropped; values are clamped.
is_activebooleanOn stage: offered in the app's Generate picker(default: true)

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/musicians" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Session Drummer","role":"drummer","style":"neo-soul"}'

Response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Session Drummer",
    "role": "drummer",
    "style": "neo-soul",
    "is_active": true,
    "created_at": "2024-01-15T10:30:00Z"
  }
}
GET
/musicians/{id}

Fetch one AI musician. Returns 404 if it exists but belongs to someone else.

Parameters

idstringMusician UUID
required

Example Request

curl "https://soundgen.ai/api/api-v1/musicians/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Session Drummer",
    "role": "drummer",
    "style": "neo-soul",
    "is_active": true,
    "created_at": "2024-01-15T10:30:00Z"
  }
}
POST
/musicians/{id}

Update an AI musician (PATCH or PUT). Ownership is verified first — editing someone else's musician returns 403. `id`, `user_id` and the use counters in the body are ignored. Each content edit keeps the previous version in the musician's history.

Parameters

idstringMusician UUID (in the path)
required
namestringDisplay name
rolestringOne of the eight roles
stylestringGenre or stylistic leaning
personalitystringFeel, dynamics, tendencies
skillsstring[]Specific techniques
profileobjectMerged into the existing profile
is_activebooleanOn stage
is_publicbooleanfalse unpublishes. To publish use POST /musicians/{id}/publish (reviewed first) — true here answers 409 REVIEW_REQUIRED. Editing a published musician takes it down until it is reviewed again.
team_idstring | nullShare with a team you are in; null stops

Example Request

curl -X PATCH "https://soundgen.ai/api/api-v1/musicians/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"style":"hard bop"}'

Response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Session Drummer",
    "style": "hard bop",
    "is_active": true
  }
}
POST
/musicians/{id}

Delete an AI musician (DELETE). Ownership is verified first; 403 if it isn't yours. Soft: `POST /musicians/{id}/restore` brings it back.

Parameters

idstringMusician UUID (in the path)
required

Example Request

curl -X DELETE "https://soundgen.ai/api/api-v1/musicians/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "restore": "/musicians/550e8400-e29b-41d4-a716-446655440000/restore" }
}
POST
/musicians/{id}/restore

Bring back a musician you deleted. Refused when your band is already at 50.

Parameters

idstringMusician UUID (in the path)
required

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/musicians/550e8400-e29b-41d4-a716-446655440000/restore" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Session Drummer", "deleted_at": null }
}
POST
/musicians/{id}/publish

Publish a musician to the community, or unpublish it with public: false. Publishing is reviewed first (impersonating a real person, hate, sexual content, personal data, spam); a refusal is a 200 with approved: false and the reason. 503 REVIEW_UNAVAILABLE when the review can't run — nothing is published. 20 reviews per 10 minutes. Editing a published musician takes it down until it is published again.

Parameters

idstringMusician UUID (in the path)
required
publicbooleantrue to publish (reviewed), false to unpublish
required

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/musicians/550e8400-e29b-41d4-a716-446655440000/publish" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"public":true}'

Response

{
  "success": true,
  "data": {
    "approved": false,
    "reason": "Presents itself as a real, named artist.",
    "musician": { "id": "550e8400-e29b-41d4-a716-446655440000", "is_public": false, "moderation_status": "rejected" }
  }
}
10Account

Account & Credits

Check the credit balance an API key draws against before running a paid operation.

GET
/credits

Read the authenticated caller's SoundGen credit balance: `balance` (the total) and `balances` (each wallet row). When the AW3 Electrum credit is on for the account, `shared_balance` is its Electrum balance, shown apart and never added: a paid request is also covered by Electrum when SoundGen credits fall short.

Example Request

curl "https://soundgen.ai/api/api-v1/credits" -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "balance": 250,
    "balances": [{ "balance": 250 }]
  }
}
11Studio Tools

Studio Tools — make music over HTTP

Every MCP tool is also a REST call: tracks and instruments, measured audio clips, MIDI clips in bars and beats, notes, AI-composed parts, inserts one at a time, the master bus and automation. GET /toolslists each with its JSON schema; batch many edits into one atomic save withPOST /projects/{id}/edits.

GET
/tools

Every studio/MCP tool with its description and JSON input schema — the same operations the MCP server offers. GET /tools/{name} returns one.

Example Request

curl "https://soundgen.ai/api/api-v1/tools" -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "count": 92,
    "tools": [
      { "name": "add_track", "description": "Append a track to a project…", "inputSchema": { "type": "object", "properties": { … } } }
    ]
  }
}
POST
/tools/{name}

Run one tool as the key's owner; the body is the tool's arguments. Audio placed with add_clip is measured by the server (WAV/MP3), so clips are exactly as long as their files. A refusal answers 422 with the tool's explanation; 409 when the project changed since it was read.

Parameters

namestringTool name, e.g. add_track, add_midi_clip, add_effect
required

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/tools/add_midi_clip" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id":"…","track":"Bass","start_bar":1,"length_bars":4,
       "notes":[{"pitch":40,"start_beat":0,"duration_beats":1}]}'

Response

{
  "success": true,
  "data": {
    "added": { "id": "clip_…", "startTime": 0, "duration": 8, "startBeat": 0, "lengthBeats": 16, "noteCount": 1 },
    "track": "Bass",
    "tempo": { "bpm": 120, "timeSignature": [4, 4] }
  }
}
POST
/projects/{id}/edits

Many tool steps as ONE atomic save: every step applies or nothing is written. A string argument "$N.path" takes a value from step N's result. Optional expected_version refuses a stale write; dry_run reports without writing. Billed tools cannot run in a batch.

Parameters

stepsarray[{ tool, args }] — tool arguments as for /tools/{name}
required
expected_versionnumberThe version your read returned
dry_runbooleanRun and report, write nothing(default: false)

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/projects/$PROJECT_ID/edits" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"steps":[
    {"tool":"add_track","args":{"name":"Keys","type":"midi","instrument":"epiano"}},
    {"tool":"add_midi_clip","args":{"track":"$0.added.id","start_bar":1,"length_bars":4}},
    {"tool":"add_notes","args":{"clip_id":"$1.added.id","notes":[{"pitch":60,"start_beat":0,"duration_beats":4}]}},
    {"tool":"add_effect","args":{"track":"master","type":"limiter"}}
  ]}'

Response

{
  "success": true,
  "data": { "applied": 4, "changed": ["tracks", "settings"], "version": 8, "results": [ … ] }
}
POST
/song-json/validate

Check a Song JSON v1 file (soundgen.ai/song-json) without importing it: errors, warnings with their JSON paths, what would be created, and counts. The body's `song` is the object, or the text a model wrote (code fences and small JSON slips are tolerated). Writes nothing, charges nothing.

Parameters

songobject | stringThe Song JSON
required

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/song-json/validate" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"song":{"format":"soundgen-song","version":1,"bpm":90,"tracks":[{"type":"drums","pattern":{"kick":"x---x---x---x---"}}]}}'

Response

{
  "success": true,
  "data": {
    "valid": true,
    "errors": [],
    "warnings": ["tracks[1].notes[3]: pitch \"H4\" isn't a note (like \"C4\", \"F#3\" or 60); skipped"],
    "summary": ["Drums (drums) — drums · 1 clip · 16 notes · 4 bars"],
    "stats": { "tracks": 1, "notes": 16, "bars": 4, "clips": 1 }
  }
}
POST
/song-json/import

Create a NEW project from Song JSON, ready to edit in the Studio. Never charges: an audio part with `generate` becomes an empty track to generate later. Audio may only be your own sounds/generations (by id) or links to your own SoundGen storage, each measured before it is placed.

Parameters

songobject | stringThe Song JSON
required
namestringProject name (default: the song's title)

Example Request

curl -X POST "https://soundgen.ai/api/api-v1/song-json/import" \
  -H "Authorization: Bearer $SOUNDGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d @song.json

Response

{
  "success": true,
  "data": {
    "project_id": "550e8400-e29b-41d4-a716-446655440000",
    "studio_url": "https://soundgen.ai/studio?project=550e8400-e29b-41d4-a716-446655440000",
    "summary": ["Drums (drums) — techno-kit · 2 clips · 200 notes · 16 bars", "…"],
    "warnings": []
  }
}
GET
/projects/{id}/song-json

A project as Song JSON v1 — for a model to read and revise, then POST /song-json/import. What the format can't hold (automation, sends, clip fades, plugin instruments…) is listed in its `notes`.

Parameters

idstringProject UUID
required

Example Request

curl "https://soundgen.ai/api/api-v1/projects/$PROJECT_ID/song-json" -H "Authorization: Bearer $SOUNDGEN_API_KEY"

Response

{
  "success": true,
  "data": {
    "song": { "format": "soundgen-song", "version": 1, "title": "Night Drive", "bpm": 100, "tracks": [ … ] },
    "omitted": ["\"Lead\": 1 automation lane"]
  }
}
12Webhooks

Webhooks

SoundGen does not send webhooks. Calls run to completion and answer with their result:POST /generate returns the finished track (one to three minutes, so allow a long client timeout). A webhook_url field is refused with400 WEBHOOKS_UNSUPPORTED rather than silently ignored.

If the connection drops

Send your own request_id (or an Idempotency-Key header) with every generation. If the reply is lost, or the answer is 202 with statusunresolved, readGET /generations?request_id=… — or send the same request again with the same id, which returns the first result and is never generated or charged twice. Never retry under a new id.

13Errors

Error Handling

All API responses include a successboolean. When an error occurs, the response includes an errorobject with a code and message.

Error Response Format

{
  "success": false,
  "error": {
    "code": "INVALID_PROMPT",
    "message": "prompt is required (a non-empty string)"
  }
}
CodeStatusDescription
INVALID_PROMPT400The prompt is missing or blank
INVALID_DURATION400Duration is outside the range (music 3-300 s, sound effects 0.5-22 s)
INVALID_BPM400BPM is outside the range (20-400)
INVALID_REQUEST_ID400request_id / Idempotency-Key is not a UUID, or the two differ
SAFETY_REJECTION400The provider's safety filter blocked the prompt; nothing was charged
WEBHOOKS_UNSUPPORTED400webhook_url was sent; there are no webhooks — POST /generate answers with the result
MISSING_AUDIO_URL400Required audio_url field is missing
INVALID_STEMS400Invalid stem types requested
INVALID_REQUEST400Request body is malformed
TEXT_TOO_LONG400Text exceeds maximum length
INVALID_ACTION400POST /ai/process: action is not one of the listed actions
QUERY_FAILED400A list or read was refused by the database; the message says why
INSERT_FAILED400A create was refused by the database (a field out of range, a duplicate); the message says why
UPDATE_FAILED400An update was refused by the database; the message says why
DELETE_FAILED400A delete was refused by the database; the message says why
UNAUTHORIZED401Missing or invalid API key
INVALID_API_KEY401The sgk_ key is unknown or was deleted; create a new one in Settings → Integrations → API Keys
FORBIDDEN403API key lacks required permissions
INSUFFICIENT_CREDITS402Your balance is below the price (the body gives creditsRequired and creditsAvailable) — or, with creditsHeld in the body, another of your requests still running is already using those credits (a paid request reserves its price until it ends); nothing was charged. A song priced by its length also names the longest length the balance covers, in the message and as affordableSeconds and affordableCredits
NOT_FOUND404Requested resource not found
REQUEST_ALREADY_FAILED409This request_id already holds a failed outcome; start again with a new id
REQUEST_IN_PROGRESS409The same request_id is still running; retry with it in a minute to get its result — it will not run or charge twice
STYLE_LIST_LIMIT409PUT /style-lists/{id}: you already have 20 style lists; delete one first (replacing an existing id still works)
NOT_RATEABLE409PUT /generations/{id}/rating: only a finished (completed) song can be liked or disliked
REVIEW_REQUIRED409An AI musician is made public through POST /musicians/{id}/publish, which reviews it first, not by an update
ACTION_REMOVED410POST /ai/process: that action was retired; the message names what replaced it
RATE_LIMITED429Too many requests, slow down
INTERNAL_ERROR500Unexpected server error
GENERATION_FAILED502The provider failed; the generation's row records the failure
PROVIDER_UNAVAILABLE503POST /generate: SoundGen's account with the provider is refusing requests (our side, not your balance); nothing was charged — try again later
BALANCE_UNCONFIRMED503Your credit balance could not be read; nothing was charged — try again
CREDITS_UNAVAILABLE503GET /credits: the credits service could not be reached; nothing changed — try again
14MCP

MCP Server

SoundGen exposes a Model Context Protocol (MCP) server, allowing AI agents and LLM-powered tools (like Claude Desktop, Cursor, or custom agents) to interact with your sounds, projects, AI musicians, and audio generation programmatically.

MCP Endpoint (Streamable HTTP)
https://soundgen.ai/api/mcp-server

Uses the MCP Streamable HTTP transport — compatible with any MCP-compliant client. Clients that support MCP sign-in (OAuth 2.1 with PKCE, such as claude.ai, Claude Desktop and Claude Code) connect with just the URL and ask you to sign in; the connection then shows under Settings → Integrations, where you can revoke it. Any other client sends Authorization: Bearer sgk_… with an API key from Settings → Integrations.

Use SoundGen in Claude

  • claude.ai and Claude Desktop: Settings → Connectors → Add custom connector, URL https://soundgen.ai/api/mcp-server, then Connect and sign in with your SoundGen account.
  • The SoundGen skill teaches Claude the prices, licensing and request-id rules: download soundgen-skill.zip and upload it under Settings → Capabilities → Skills.
  • Claude Code: /plugin marketplace add aw3-technology/soundgen-claude, then /plugin install soundgen@soundgen and /mcp to sign in.

Paid actions spend your SoundGen credits; Claude states the price before it runs one.

Editing only: https://soundgen.ai/api/mcp-studio serves just the Studio tools (projects, tracks, MIDI, effects, automation, your sound library and help). It generates nothing and spends no credits; it is the one submitted for Claude's connector directory.

Available Tools (92)

Arrangement

Build a song step by step — tracks, instruments, measured audio clips, MIDI clips in bars — or many edits as one atomic save.

  • • get_arrangement
  • • get_track
  • • list_clips
  • • add_track
  • • update_track
  • • delete_track
  • • list_instruments
  • • add_clip
  • • add_midi_clip
  • • update_clip
  • • delete_clip
  • • set_tempo
  • • apply_edits
  • • list_markers
  • • add_marker
  • • delete_marker

Song JSON

A whole song as one JSON file a model can write: check it, import it as a new editable project, or export a project to revise.

  • • validate_song_json
  • • import_song_json
  • • export_song_json

MIDI & Automation

Notes in beats, AI-composed parts, automation curves, warp markers and comping.

  • • list_notes
  • • set_notes
  • • add_notes
  • • delete_notes
  • • transpose_notes
  • • quantize_notes
  • • generate_midi_part
  • • list_automation
  • • set_automation
  • • set_warp_markers
  • • list_takes
  • • select_take

Mixing

Inserts one at a time on any track or the master bus, sends, modulators and master level.

  • • list_effect_types
  • • add_effect
  • • update_effect
  • • remove_effect
  • • set_track_effects
  • • set_track_sends
  • • set_track_modulators
  • • set_master

Projects

Create, read and manage projects, their versions and collaborators.

  • • list_projects
  • • get_project
  • • create_project
  • • update_project
  • • delete_project
  • • list_project_versions
  • • create_project_version
  • • list_project_collaborators
  • • invite_collaborator

Sounds

The sound library: upload, search, tag and delete audio.

  • • list_sounds
  • • get_sound
  • • create_sound
  • • update_sound
  • • delete_sound
  • • list_genres

AI Generation

Generate audio from a prompt, extend or rewrite a section of a song, and track generation jobs.

  • • generate_audio
  • • edit_song
  • • list_generations
  • • get_generation

Batches & Taste

One song in up to 20 styles: generate_audio once per style with one batch_id, read the batch back, like or dislike each version, and let use_taste steer the next ones by what you liked.

  • • list_style_lists
  • • save_style_list
  • • delete_style_list
  • • list_batches
  • • get_batch
  • • rate_generation
  • • get_taste_profile

Audio Processing

Stem separation, speech and lyrics to text, and the AI audio pipeline (mixing, mastering, cleanup). Paid work is charged server-side, only when it delivers.

  • • separate_stems
  • • transcribe_speech
  • • ai_audio_process

Voice

Clone a voice from a sample and synthesise speech with it; synthesis returns a link to the stored MP3. Clone and synthesis are charged server-side, only when they deliver.

  • • list_voices
  • • clone_voice
  • • synthesize_voice
  • • delete_voice

AI Musicians

Performer and engineer personas. Pass their ids as generate_audio `musicians` and their style, feel and skills are briefed into the take (never the name); get_ai_musician returns the brief, mix/master plan and part hints. Delete is soft (restore_ai_musician); update can publish or share with a team.

  • • list_ai_musicians
  • • get_ai_musician
  • • create_ai_musician
  • • update_ai_musician
  • • publish_ai_musician
  • • delete_ai_musician
  • • restore_ai_musician

Model Training

Train custom models on your own audio and follow the job.

  • • list_training_jobs
  • • get_training_job
  • • create_training_job
  • • cancel_training_job

Video

A link that opens the free Audio Visualizer with a look and one of your songs; the video is made in the browser, nothing renders server-side.

  • • visualizer_link

Product Knowledge

Search SoundGen's own documentation — what a feature does and how to reach it.

  • • search_help
  • • get_help_topic
  • • list_help_topics

Account

Profile, credit balance, your invite link and platform statistics.

  • • get_user_profile
  • • update_user_profile
  • • get_user_credits
  • • get_referral_link
  • • get_platform_stats

Connect from Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "soundgen": {
      "transport": "streamable-http",
      "url": "https://soundgen.ai/api/mcp-server",
      "headers": { "Authorization": "Bearer sgk_YOUR_API_KEY" }
    }
  }
}

Connect from Codex

# ~/.codex/config.toml
[mcp_servers.soundgen]
url = "https://soundgen.ai/api/mcp-server"
bearer_token_env_var = "SOUNDGEN_API_KEY"

# then set the env var, e.g. PowerShell:
# $env:SOUNDGEN_API_KEY = "sgk_YOUR_API_KEY"

Test with MCP Inspector

npx @modelcontextprotocol/inspector

Enter the MCP endpoint URL above to browse and test all available tools interactively.

15SDKs

SDKs & Libraries

JS

JavaScript SDK

npm install soundgen-js

Coming Soon
Py

Python SDK

pip install soundgen

Coming Soon
Go

Go Client

go get soundgen

Coming Soon
16Credits & Pricing

Credits & Pricing

API requests draw from the same credit balance as the SoundGen app — there are no separate API plans or subscriptions. New accounts start with 100 free credits, and one-time credit packs are available on the pricing page.

ActionCredits
Music generation20per 30s (billed per second)
Stem separation6per job
Stem separation (deep)9per job
Voice clone30one-time per voice
Voice synthesis (TTS)6per request
Track recreation (AI Cover)45per track

Lightweight AI actions (auto-mix, mastering, chord detection, and similar) cost 1–2 credits; vocal tuning and noise removal are free. Charges apply only when a job succeeds.

Ready
to build?

Get your API key and start integrating SoundGen into your application today.