/v2/generateGenerate Music API
Default Music Generate endpoint for AI music creation. Supports both inspiration mode and custom mode.
https://udioapi.pro/api/v2/generatetips
Default Music Generate endpoint: Use this route for the standard music generation flow. MiniMax is an integrated provider with its own endpoint, not the default model for this API.
Two Generation Modes:
- Inspiration Mode: Use
gpt_description_promptto generate music from a text description - Custom Mode: Use
prompt,style, andtitlefor detailed control
Model Selection: Choose from chirp-v4-0, chirp-v4-5, chirp-v4-5-plus, chirp-v5, or chirp-v5-5 for different quality levels. See Credit Consumption by Model for model details and credit costs.
Next step: After calling this endpoint, use the Music Generate Task Status API to poll task progress and retrieve audio URLs.
requestHeaders
| name | required | description |
|---|---|---|
Authorization | yes | Bearer token for authentication |
Content-Type | yes | application/json |
requestBody
Request body supports Inspiration Mode or Custom Mode
Inspiration Mode
Generate music from a text description
| paramName | paramType | required | description | example |
|---|---|---|---|---|
gpt_description_prompt | string | yes | Text description of the music you want to generate | A upbeat pop song about summer vacation with catchy melody |
Custom Mode
Generate music with custom lyrics, style, and title
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | Custom lyrics or detailed prompt | Verse 1: Walking down the street, feeling so free... |
style | string | no | Musical style or genre | pop, upbeat, electronic, 120 bpm |
title | string | no | Song title | Summer Dreams |
tags | string | no | Negative tags to avoid | sad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
model | string | no | AI model to use. | chirp-v5-5 |
make_instrumental | boolean | no | Generate instrumental music without vocals | false |
gender | string | no | Vocal gender preference | female |
style_weight | number | no | Strength of adherence to style | 0.65 |
weirdness_constraint | number | no | Controls creative deviation | 0.65 |
audio_weight | number | no | Balance weight for audio features | 0.65 |
responses
{
"code": 200,
"message": "success",
"workId": "gen2abc123def456bksv",
"data": {
"task_id": "gen2abc123def456bksv"
}
}codeExamples
curl -X POST "https://udioapi.pro/api/v2/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "chirp-v4-5",
"prompt": "Verse 1: Walking down the street, feeling so free\nChorus: Summer dreams are calling me",
"style": "pop, upbeat, electronic, 120 bpm",
"title": "Summer Dreams",
"make_instrumental": false,
"gender": "female",
"style_weight": 0.65,
"weirdness_constraint": 0.65,
"audio_weight": 0.65
}'