POST
/generate음악 콜백 API 생성
콜백 지원을 통해 AI를 사용하여 음악을 생성합니다.
POST
https://udioapi.pro/api/generatetips
이 엔드포인트는 생성 결과를 콜백 URL로 보냅니다.
콜백 URL은 공개되어야 하며 POST 요청을 수락해야 합니다.
requestHeaders
| name | required | description |
|---|---|---|
nameAuthorization | requiredyes | description인증을 위한 Bearer 토큰 |
nameContent-Type | requiredyes | descriptionapplication/json |
requestBody
요청 본문은 영감 모드 또는 사용자 정의 모드와 콜백 URL을 지원합니다.
영감 모드
텍스트 설명에서 생성
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNamegpt_description_prompt | paramTypestring | requiredyes | description텍스트 설명 프롬프트 | exampleA upbeat pop song about summer vacation with catchy melody |
사용자 정의 모드
맞춤 가사, 스타일, 제목으로 생성
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNameprompt | paramTypestring | requiredyes | description맞춤 가사 또는 프롬프트 | exampleVerse 1: Walking down the street, feeling so free... |
paramNamestyle | paramTypestring | requiredno | description음악 스타일 | examplepop, upbeat, electronic, 120 bpm |
paramNametitle | paramTypestring | requiredno | description노래 제목 | exampleSummer Dreams |
paramNametags | paramTypestring | requiredno | description부정적인 태그 | examplesad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNamecallback_url | paramTypestring | requiredyes | description생성 콜백을 수신하기 위한 공개 URL | examplehttps://your-domain.com/api/callback |
paramNamemodel | paramTypestring | requiredno | descriptionAI 모델 | examplechirp-v5-5 |
paramNamemake_instrumental | paramTypeboolean | requiredno | description악기 음악 생성 | examplefalse |
paramNamegender | paramTypestring | requiredno | description보컬 성별 선호도 | examplefemale |
paramNamestyle_weight | paramTypenumber | requiredno | description스타일 밀착력 | example0.65 |
paramNameweirdness_constraint | paramTypenumber | requiredno | description창의적인 편차 제어 | example0.65 |
paramNameaudio_weight | paramTypenumber | requiredno | description오디오 기능 균형 | example0.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
}'