POST
/generateGenerate Music Callback API
Generate music using AI with callback support.
POST
https://udioapi.pro/api/generatetips
This endpoint sends generation results to your callback URL.
Callback URL must be public and accept POST requests.
requestHeaders
| name | required | description |
|---|---|---|
Authorization | yes | Bearer token for authentication |
Content-Type | yes | application/json |
requestBody
Request body supports inspiration mode or custom mode, plus callback URL
Inspiration Mode
Generate from text description
| paramName | paramType | required | description | example |
|---|---|---|---|---|
gpt_description_prompt | string | yes | Text description prompt | A upbeat pop song about summer vacation with catchy melody |
Custom Mode
Generate with custom lyrics, style, title
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | Custom lyrics or prompt | Verse 1: Walking down the street, feeling so free... |
style | string | no | Music style | pop, upbeat, electronic, 120 bpm |
title | string | no | Song title | Summer Dreams |
tags | string | no | Negative tags | sad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
callback_url | string | yes | Public URL to receive generation callbacks | https://your-domain.com/api/callback |
model | string | no | AI model | chirp-v5-5 |
make_instrumental | boolean | no | Generate instrumental music | false |
gender | string | no | Vocal gender preference | female |
style_weight | number | no | Style adherence strength | 0.65 |
weirdness_constraint | number | no | Creative deviation control | 0.65 |
audio_weight | number | no | Audio feature balance | 0.65 |
responses
json
{
"code": 200,
"message": "success",
"workId": "gen2abc123def456bksv",
"data": {
"task_id": "gen2abc123def456bksv"
}
}codeExamples
curl
curl -X POST "https://udioapi.pro/api/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_url": "https://your-domain.com/api/callback",
"model": "chirp-v4-5",
"gpt_description_prompt": "A upbeat pop song about summer vacation with catchy melody",
"make_instrumental": false,
"gender": "female",
"style_weight": 0.65,
"weirdness_constraint": 0.65,
"audio_weight": 0.65
}'