sonic

download (mp3 / m4a / wav)

Download a finished track as mp3, m4a, and/or wav.

This replaces POST /api/v1/sonic/wav, which remains available but is no longer the recommended way to fetch a WAV. A WAV requested here resolves to the same stored file, so if you have already downloaded one through /wav it is returned immediately.

Credits

2 credits per call, regardless of how many formats you request. Asking for all three costs the same as asking for one, so request everything you need in a single call rather than one call per format.

You are charged only when every requested format is returned. A 202 response costs nothing.

Request

FieldTypeRequiredNotes
clip_idstringyesThe clip to download. music_id is accepted as an alias.
formatsstring[]noAny of mp3, m4a, wav. Defaults to ["mp3"].

An unrecognised value in formats returns 400 — the request is rejected rather than partially fulfilled.

Responses

200 — every requested format is ready. data.files contains one entry per format.

202 — the files are being prepared. Retry the same request in a few seconds. No credits are charged for a 202, so retrying is free.

404 — the clip could not be downloaded. Source audio is retained for a limited period after generation, so an older clip may no longer be downloadable; regenerate the track or use a more recent clip_id.

403 — insufficient credits.

Notes

  • Files are served from our own CDN. The URLs are stable and safe to store.
  • Requesting a format you have already downloaded returns instantly and does not re-prepare the file.
post/api/v1/sonic/download

Request

  • Base URL
    https://api.musicapi.ai
  • URL
    https://api.musicapi.ai/api/v1/sonic/download
  • Auth
    HTTP bearer

Request body

clip_idstring required

The clip to download. music_id is accepted as an alias.

formatsstring[]

Any of mp3, m4a, wav. Defaults to ["mp3"].

Response

Every requested format is ready.

messagestring required

Changes

No recorded changes to this operation across all 1 revision of this API.