All Documentation

Music

Generate loops, beds, stings and full cues from a description, and save them to your library

Overview

The Music page turns a description into a finished piece of music: "tense military sci-fi combat loop, driving percussion, low brass stabs, 120 bpm", "calm exploration ambience, warm pads, sparse piano, no drums", "victory fanfare, bright horns, timpani roll". Tracks can be auditioned, downloaded, and saved to Saved Content, where the Sound agent can trim, fade and loop them.

Length is free

Music is charged per generation, not per second — a fifteen-second sting and a six-minute cue cost exactly the same. Ask for the length your game actually needs; there is nothing to save by generating short and looping it yourself.

Generating a Track

  1. 1Pick a model. Both are Stable Audio 3; they differ in quality ceiling and maximum length (see below).
  2. 2Describe the music. Name the genre, the instruments, the mood and the tempo.
  3. 3Set the length with the slider, or use a preset — 15s sting, 30s loop, 1 min bed, 2 min, 4 min.
  4. 4Optionally open advanced for a negative prompt, a seed, or prompt expansion.
  5. 5Generate, then audition it in the player. Generation typically takes a few seconds.
  6. 6Download the file, or Save Music to add it to Saved Content — as a new item or a new version of an existing track.

Models

ModelTypeDescription
music-sa3-mediumup to 6m 20sStable Audio 3 Medium. The better checkpoint and the only one that reaches full-length cues.
music-sa3-smallup to 2mStable Audio 3 Small (Music). Cheaper, music-specialised, enough for loops, beds and stings.

The list is operator-editable, so read it from the page's dropdown or GET /api/v1/music/catalog rather than hard-coding a model id.

Generation options

OptionTypeDescription
durationSeconds*numberLength in seconds, up to the model maximum. Does not affect the price.
negativePromptstringQualities to avoid — "vocals", "distortion", "applause".
seednumberReuse a returned seed with the same prompt to get the same track back. Change one word and keep the seed to get a variation.
expandPromptbooleanLet the model fill out a terse brief before generating. Useful for one-liners; skip it when your prompt is already specific.

Writing good music prompts

  • •Lead with function and genre: "tense combat loop", "ambient exploration bed", "victory sting".
  • •Name the instruments you want to hear: "low brass, taiko percussion, dark synth pulse".
  • •Give a tempo in bpm when the music has to sit against gameplay pacing.
  • •Say what should be absent — "no drums", "no vocals" — either in the prompt or as a negative prompt.
  • •For a bed that will sit under dialogue, ask for something sparse and mid-scooped rather than dense.

Pricing

A flat credit price per generation, taken from the model you chose and shown on the page before you generate. It is derived from what the generation costs Tonetta, so the number you are quoted is the number you are charged. Credits are reserved before generation and refunded automatically if it fails, so a failed generation never costs anything.

This is deliberately unlike sound effects, which are priced per second. The music upstream bills per clip, so pricing it per second would have made long tracks expensive for no extra cost.

Saved tracks are made game-ready

Every track you save is handed to the Sound agent as it lands. It levels the track to -20 LUFS with a -3 dBTP ceiling — the room a music bed needs under everything else — trims only true silence (a quiet intro or a long tail is the music, not padding), cleans the edges and delivers 48 kHz 16-bit stereo WAV. That export becomes the item's next active version; the version you saved stays underneath it. A track named or described as a loop is left untouched at its seams.

Pass gameReady: false on the save (or saveGameReady on the MCP tool) to keep a track exactly as generated. The pass is a Sound turn and is billed like one.

Making it loop

Game music usually has to loop seamlessly, and a generated track ends when it ends. Save the track, open it from Saved Content, and use Post-process with the Sound agent: it can find a loop point, crossfade the seam, trim the tail and match the loudness to the rest of your mix. Each step you keep becomes a new version of the same track, and the original stays.

Generating a longer take and asking the Sound agent to cut a loop out of the middle often works better than asking for a short loop directly — and since length is free, it costs the same.

You can also start with the agent rather than the form: Talk to the Sound agent takes a brief, generates with the same Stable Audio 3 models (a paid call it proposes with its price unless you asked for the track), compares takes, shapes the one you choose to the scene, and exports it game-ready. By API: POST /api/v1/sound/sessions with a message and contentType: "music", or the start_sound_session MCP tool.

Saving to Your Library

Saved tracks live in Saved Content under the Music filter, with the generation prompt as their description and the decoded duration. Saving supports Save as New and Update Existing; updating appends a version and makes it active.

Previews are temporary

A generated track you do not save is a preview and is not kept indefinitely. Save anything you want to come back to, or download it.

API Access

Music generation requires the music:write scope, and the catalog music:read. The API uploads the result to storage and returns a URL (not base64); pass save to also store it in Saved Content.

GET/api/v1/music/catalogmusic:read

The available models, cheapest first: model, name, maxDurationSeconds and credits.

POST/api/v1/music/generatemusic:write
FieldTypeDescription
prompt*stringGenre, instruments, mood and tempo
durationSeconds*numberLength in seconds (model max applies); does not affect the price
modelstringA model id from the catalog. Omit for the cheapest.
negativePromptstringQualities to avoid
seednumberReproduce a previous track
expandPromptbooleanExpand a terse brief before generating
saveobjectOptional { name, projectId?, tags? } — also save to Saved Content, or { contentId } — save it as the next active version of that track

Generate and save in one call:

curl -s https://<host>/api/v1/music/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Tense military sci-fi combat loop, driving percussion, low brass stabs, dark synth pulse, 120 bpm",
    "durationSeconds": 90,
    "negativePrompt": "vocals",
    "save": { "name": "Combat Loop A", "tags": ["combat", "loop"] }
  }'

Response:

{
  "success": true,
  "result": {
    "audioUrl": "https://<r2-public>/music/<org>/unassigned/<uuid>.mp3",
    "audioKey": "music/<org>/unassigned/<uuid>.mp3",
    "contentType": "audio/mpeg",
    "filename": "music_<uuid>.mp3",
    "model": "music-sa3-medium",
    "seed": 16425460,
    "request": { "prompt": "Tense military sci-fi...", "durationSeconds": 90 },
    "tokensCharged": 8,
    "savedContent": { "id": "...", "name": "Combat Loop A", "contentType": "music", ... }
  }
}

MCP

The same operations are available to AI agents as the get_music_catalog and generate_music MCP tools — see MCP Server.