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
| Field | Type | Required | Notes |
|---|---|---|---|
| clip_id | string | yes | The clip to download. music_id is accepted as an alias. |
| formats | string[] | no | Any 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.
Request
- Base URLhttps://api.musicapi.ai
- URLhttps://api.musicapi.ai/api/v1/sonic/download
- AuthHTTP bearer
Request body
Response
Every requested format is ready.
Changes
No recorded changes to this operation across all 1 revision of this API.