Generate API With Callback
Music Generation API
Overview
if you want to use callback, you need to provide a callback url, and use /api/generate to generate music.
API Endpoint
URL: POST https://udioapi.pro/api/generate
Content-Type: application/json
Authentication
Authentication is required for all API requests. Include your API key in the request headers:
Code Examples
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
title | string | No | The title of the music to be generated |
prompt | string | Yes | The text prompt describing the music you want to generate |
gpt_description_prompt | string | No | Additional prompt for GPT to help generate better music description |
custom_mode | boolean | No | Whether to use custom mode |
make_instrumental | boolean | No | Whether to generate instrumental music without vocals |
model | string | No | The model to use for generation. Available options: "chirp-v3.5", "chirp-v3.0". Default: "chirp-v3.5" |
callback_url | string | No | URL to receive generation results. If provided, results will be sent to this URL. If not provided, please use generate api |
cluster | string | No | Specify the cluster to use. Default: "default" |
- 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
- callback_url : Optional field, but it is recommended to use your own address due to potential delays with our forwarding
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 |