Downloads and outputs

How to get files out of a finished job, which formats work, and how long links last.

When a job is playable

Today a job turns playable when its finished files are ready, about 2 to 3 minutes after a song request (we measured 130 to 180 seconds). playable and succeeded arrive in the same response, with every file in outputs.

Use playable to show your player and succeeded to download. With POST /v1/jobs/wait, until: "playable" and until: "complete" both wait for the finished files today.

Links last 1 hour

A download link works for 1 hour. url_expires_at says when it stops. Ask for a new link when one expires instead of storing it.

Links in job outputs are short-lived too. Copy the files you want to keep to your own storage.

Lost a job id

Send the same request again with the same idempotency-key within 24 hours: the API answers with the original job and charges nothing more. After that, GET /v1/songs lists your songs newest first, with their status.

Ids are opaque

Song and project ids are UUIDs, and job ids differ by job type (song jobs are 64 hex characters, stems and MIDI jobs are UUIDs, master jobs start with song-master-). Store ids exactly as you get them and never parse them.

Formats

  • MP3 and WAV work for every song. WAV is 44.1 kHz, 16-bit stereo.
  • For now, FLAC and M4A need a mastered song: for any other song they return 409 PUBLIC_API_CONFLICT. Master the song first, or download WAV. This is being fixed.

Waveforms

Each song has waveform_ready. While it is false, GET /v1/songs/{song_id}/waveform answers 409 PUBLIC_API_WAVEFORM_NOT_READY with details.retry_after_seconds: ask again after that. A song whose audio cannot be measured answers 404 PUBLIC_API_RESOURCE_NOT_FOUND, so do not retry it.

Mastering replaces the song's audio

A master does not add a new song. When POST /v1/songs/{song_id}/master succeeds, the master becomes the song's audio on the same song_id: playback, POST /v1/songs/{song_id}/download and the waveform all return the master. v1 cannot fetch the unmastered audio afterwards, so download the WAV first if you need it.

What a failed job costs

A failed or cancelled job that never held credits reports credits_charged: 0. A job refused by a key's daily credit limit fails at once with PUBLIC_API_KEY_CREDIT_LIMIT_REACHED and is never charged.

A failed job has status: "failed" and an error with code, message and next_step, for example {"status":"failed","error":{"code":"AI_GENERATION_FAILED","message":"Music generation failed. Please try again with different settings.","next_step":null},"credits_charged":null,"credits_refunded":false}. credits_refunded turns true once its held credits are back on your balance; read the job again with GET /v1/jobs/{job_id} to see it.

Stems

twoStem splits the vocals from the instrumental, as 1 to 3 stems: Vocals or Lead Vocals and Backing Vocals, plus Instrumental. fourStem returns up to nine labelled stems: Vocals, Bass, Drums, Guitars, Strings, Piano, Keys, Wind and Other.

The count varies with the song, because silent stems are left out. In our tests twoStem returned 1 to 3 files and fourStem 5 to 8. Read each output's label instead of expecting a fixed list.

Stems are full-length WAV files, aligned with the song. They are priced per started minute of the song, so check the price first with POST /v1/estimates.