Malith-Rukshan / Suno-API

SunoAI Unofficial Python API Library and REST API for Suno.ai — Create Music with Generative AI ! ✨
https://pypi.org/project/SunoAI
MIT License
56 stars 15 forks source link

Change to /api/feed/v2, fix new format with stems, typos #5

Open kuhnchris opened 3 months ago

kuhnchris commented 3 months ago

Hello!

Since I currently play around with Suno, I noticed that they recently added the data for generating STEMS (pro) into their UI, breaking the predefined classes. So here is a fix for that. Since I also run into troubles with the pagination / amount of "songs" returned, I changed the endpoint to the /api/feed/v2 endpoint, giving us "num_of_songs" which helps us iterate through the "pages". I added example code for just this into the README.md

(edit: :see_no_evil: forgot to mention: Also added the MetadataHistory Model, so you can identify where a song is coming from (song 1 -> song 2 -> song 3, etc.), and added new example data for the v3.5 metadata/clips structure)

And lastly, i fixed a typo in check_error.

If there is anything missing let me know and I'll be glad to fix it. :-)

Thanks for your effort making this API (publicly available), Chris

Malith-Rukshan commented 3 months ago

Hello @kuhnchris,

Thanks for your detailed contributions and fixes! 🤝 The updates for generating STEMS, pagination, and the MetadataHistory Model are much appreciated. I'll review and merge these changes in the next update. If anything else is needed, I'll let you know.

🫶 Thanks for improving the API!