curl https://api.60db.ai/songs/song-550e8400/download \
-H "Authorization: Bearer your-api-key" \
-o my-song.mp3
const audioBuffer = await client.music.download('song-550e8400');
// Save to file or play in browser
audio_bytes = client.music.download('song-550e8400')
with open('my-song.mp3', 'wb') as f:
f.write(audio_bytes)
Music
Download Song
Download the MP3 file for a completed song
GET
/
songs
/
:id
/
download
curl https://api.60db.ai/songs/song-550e8400/download \
-H "Authorization: Bearer your-api-key" \
-o my-song.mp3
const audioBuffer = await client.music.download('song-550e8400');
// Save to file or play in browser
audio_bytes = client.music.download('song-550e8400')
with open('my-song.mp3', 'wb') as f:
f.write(audio_bytes)
Download the song as an MP3 file. Only works for songs with
status: succeeded.
Request
Headers
string
required
Bearer token with your API key
Path Parameters
string
required
Song UUID
Response
200 OK:audio/mpeg bytes with Content-Disposition: attachment; filename="<title>.mp3"
404: Song not found or not in your workspace
409: Song is not ready yet (still generating or failed)
Example
curl https://api.60db.ai/songs/song-550e8400/download \
-H "Authorization: Bearer your-api-key" \
-o my-song.mp3
const audioBuffer = await client.music.download('song-550e8400');
// Save to file or play in browser
audio_bytes = client.music.download('song-550e8400')
with open('my-song.mp3', 'wb') as f:
f.write(audio_bytes)