Generate a track
generate_trackGenerate a royalty-free track from a prompt, a playlist, or an image.
Provide exactly one of prompt, playlist_index, or an image. Call
get_capabilities first — the allowed bitrates, formats, modes and the
maximum duration are per-license, and this consumes quota.
A brief that says what NOT to have ("no drums", "nothing percussive",
"no vocals") is exclude_stems / exclude_instruments, and "straight
into the drop" is start_from_part — both are honoured by the
generator itself, so prefer them over generating and editing afterwards.
This waits for the render and returns a downloadable URL. Prefer
playlist_index with one of the instant durations when the brief allows
it: that path can return in a single round trip instead of rendering.
The audio expires — download it as soon as this returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | No | Only valid with playlist_index. | |
| key | No | Musical key, e.g. 'C' or 'Am'. Only with playlist_index. | |
| mode | No | track (default), loop for seamless looping, jingle or mix — the last two only with playlist_index. | |
| format | No | mp3 or wav, if the license allows. | |
| prompt | No | Text description of the music, in English. Needs the 'ttm' feature. Cannot be combined with bpm or key. | |
| bitrate | No | ||
| duration | Yes | Length in seconds, at least 5. Durations of 5, 6, 8, 10, 15, 20, 30, 40, 60, 180, 240, 300 can be served instantly from the pre-rendered store when generating from a playlist_index without bpm/key; any other value always costs a full render. The upper bound is per-license — see get_capabilities. | |
| image_url | No | Public http(s) URL of an image to score. Needs the 'itm' feature. PNG/JPEG/WEBP/BMP, between 50 KB and 10 MB. | |
| intensity | No | ||
| image_base64 | No | Image bytes as base64, as an alternative to image_url. | |
| wait_seconds | No | How long to wait before handing back a track id. | |
| exclude_stems | No | Stems the track is generated WITHOUT, the negative brief: DRUMS (drums, percs, hats, claps), BASS, LEADS (mids, leads, pads), VOCALS, FX. 'No drums' is this, not an edit afterwards - the track is built without them from the first bar. Only with playlist_index. | |
| playlist_index | No | Channel from list_playlists, e.g. '6.4.0'. Cheapest and fastest option — only this input can be served from the instant store, and only it accepts bpm and key. | |
| start_from_part | No | Open the track on this part instead of its intro: DROP ('straight into the drop', 'no intro', 'skip the build-up'), BREAK or MAIN. Only with playlist_index; loops and jingles have no intro to skip. | |
| exclude_instruments | No | Single parts to leave out: DRUMS, PERCS, HATS, CLAPS, BASS, MIDS, LEADS, FX, VOCALS, PADS, RISER, IMPACT. Finer than exclude_stems - 'no hi-hats' is HATS, 'no vocals' is VOCALS. Only with playlist_index. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | No | ||
| key | No | ||
| url | No | Download link once done. | |
| mode | No | ||
| format | No | ||
| prompt | No | ||
| status | Yes | done, failed or pending. | |
| bitrate | No | ||
| duration | No | ||
| track_id | No | ||
| important | No | ||
| expires_at | No | After this the audio is deleted and the URL stops working. | |
| session_id | No | ||
| edited_from | No | The track this one was derived from. Edits and variations never modify the original — they mint a new track, and this is the link back. | |
| playlist_index | No | ||
| how_it_was_served | Yes |