Generate
Generate Music
Endpoint: POST /api/generate
Description: Generate music based on a given text prompt using the Suno v3.5 model. Available models include chirp-v3-5 and chirp-v3-0. This endpoint will automatically fill in the lyrics.
- title: Music title
- prompt: generate music prompt, If the content is too long, the generation will fail with "Topic too long."
- gpt_description_prompt: Can input music style, If the content is too long, the generation will fail with "Topic too long."
- custom_mode: This parameter exists only in the suno-v3 model.
- make_instrumental: false,
- model: Options include chirp-v3.0, chirp-v3.5, udio-130, udio-32,
- udio-130: Generate 2:10 clips. Takes longer
- udio-32: Generate 32s clips
- callback_url : Optional field, but it is recommended to use your own address due to potential delays with our forwarding
- disable_callback : The default value of disable_callback is false. If you do not provide the callback_url parameter and set disable_callback to true, we will store your generated results on our server, but this data will be retained for a maximum of 30 days.
- token: your api_key Required field
Custom Mode: If you want to use customMode, make sure the following parameters exist.
customMode | instrumental | Required Parameters |
---|---|---|
true | false | style, prompt, title |
true | true | style, title |
false | true | prompt |
false | false | prompt |
Submit Generation Task Response
- workId: Fields used to query generate results ::
Generate Callback Sample
About CallBack Url
Once the cover, title, and lyrics are successfully generated, we will make a callback to the "callback URL" you provided in the generation interface. Please note that the generated files will only be retained for 30 days.
Note: In some cases, the official website may skip the 'text' and 'first' stages and directly mark the task as 'complete'. Be aware of this possibility.
The callback method will be "POST", and the "Content-Type" should be set to "application/json".