Generate V2

Music Generation API V2

Although we have developed the v2 API, don't worry, the v1 API is still fully supported

Overview

Generate AI music based on text prompts using various models. The API supports two modes: Inspiration Mode and Custom Mode. In Inspiration Mode, Suno will automatically generate lyrics, title, and style tags based on your description.

Authentication

Authentication is required for all API requests. Include your API key in the request headers:

API Endpoint

URL: POST https://udioapi.pro/api/v2/generate
Content-Type: application/json

Generation Modes

1. Inspiration Mode

In this mode, you only need to provide a description prompt, and Suno will automatically generate lyrics, title, and style tags.

2. Custom Mode

In this mode, you have full control over the song details by providing specific parameters.

Code Examples

Inspiration Mode Examples

curl
nodejs
python

Custom Mode Examples

curl
nodejs
python

Request Parameters

Inspiration Mode Parameters

ParameterTypeRequiredDescription
gpt_description_promptstringYesDescription of the music you want to generate
make_instrumentalbooleanNoGenerate instrumental version
modelstringYesModel version (default: "chirp-v3-5")

Custom Mode Parameters

ParameterTypeRequiredDescription
promptstringYesText prompt describing the music you want to generate
titlestringYesTitle of the music
tagsstringYesStyle tags for the music
make_instrumentalbooleanNoGenerate instrumental version
modelstringYesModel version (default: "chirp-v3-5")

Response Format

A successful response will return a JSON object with the following structure:

FieldTypeDescription
codenumberHTTP status code
messagestringResponse message
workIdstringUnique identifier for the generation task. Use this ID with the feed API to check generation status

Error Codes

CodeDescription
400Invalid request / No body provided
401Invalid API key / No API key provided in Authorization header
402Not enough credits
500Internal Server Error

Note

The workId returned in the response can be used with the feed API to check the status of your generation request and retrieve the final results.

Query Generation Results

API Endpoint

URL: GET https://udioapi.pro/api/v2/feed
Query Parameter: workId

Code Examples

curl
nodejs
python

Response Format

A successful response will return a JSON object with the following structure:

Response Fields

FieldTypeDescription
codenumberHTTP status code
messagestringResponse message
data.typestringResult type ("SUCCESS", "IN_PROGRESS", etc.)
data.request_bodyobjectOriginal generation request parameters
data.response_dataarrayArray of generated results
data.created_atstringTimestamp of the generation request

Generated Result Fields

FieldTypeDescription
audio_urlstringURL to the generated audio file (MP3)
image_urlstringURL to the generated cover image
image_large_urlstringURL to the high-resolution cover image
video_urlstringURL to the generated music video
created_atstringTimestamp of the result creation
statusstringStatus of the generation ("complete", "pending", etc.)
titlestringTitle of the generated music
promptstringOriginal prompt used for generation
tagsstringStyle tags of the generated music

Cookies

We use cookies to enhance your browsing experience and analyze site traffic.Your privacy is important to us: we do not sell or share your personal data, and your information is securely stored. By continuing to use our site, you agree to our use of cookies.
Learn more about how we handle your data in our .