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
886 stars 197 forks source link

如果调用 suno API 控制其一次生成歌曲的数量? #34

Closed Kevin-free closed 2 months ago

Kevin-free commented 2 months ago

当前调用 generate 默认是生成 2 首歌曲,请问可以控制生成的数量吗?以及消耗的 credits 是否有变化?

blueeon commented 2 months ago

You can’t do this due to the limitations of the official Suno API. However, you can achieve this by making concurrent calls to the suno-api.

Kevin-free commented 2 months ago

You can’t do this due to the limitations of the official Suno API. However, you can achieve this by making concurrent calls to the suno-api.

Thanks Reply. So I can do multiple operations (concurrently calling suno-api multiple times) on the basis of the smallest unit (generating two songs at a time). Is it possible to generate one song at a time?

blueeon commented 2 months ago

Sure thing. The limitation doesn’t lie within suno-api. The generation process is asynchronous; when you call the generation API, it simply adds a task.

Kevin-free commented 2 months ago

Sure thing. The limitation doesn’t lie within suno-api. The generation process is asynchronous; when you call the generation API, it simply adds a task.

Thanks! I see that the request payload of suno API /api/generate/v2/ does not have a parameter to control the minimum number of songs generated at a time, so at least two songs are generated at a time. I want to generate only one song at a time. 😂

blueeon commented 2 months ago

Sure thing. The limitation doesn’t lie within suno-api. The generation process is asynchronous; when you call the generation API, it simply adds a task.

Thanks! I see that the request payload of suno API /api/generate/v2/ does not have a parameter to control the minimum number of songs generated at a time, so at least two songs are generated at a time. I want to generate only one song at a time. 😂

That’s Suno’s design, we can’t mess with it.

Kevin-free commented 2 months ago

Thanks!