gcui-art / suno-api

Use API to call the music generation AI of suno.ai, and easily integrate it into agents like GPTs.
https://suno.gcui.ai
GNU Lesser General Public License v3.0
1.13k stars 257 forks source link

Download Wav Format #128

Open tasimski opened 1 month ago

tasimski commented 1 month ago

Screenshot 2024-07-12 182054

How can I get a link to wav format?

karpoveech commented 1 month ago

@tasimski On suno.com when tapping the "Download .wav Audio" button, the /api/gen/<song_id>/convert_wav/ request is sent. After that, their job is checking whether the .wav audio is ready by calling api/gen/<song_id>/wav_file/ request. When .wav audio is ready, the latter request instead of responding with "wav_file_url": null responds with:

{
    "wav_file_url": "https://cdn1.suno.ai/<song_id>.wav"
}

That's the way you can extend this