POST
/generate음악 콜백 API 생성
콜백 지원을 통해 AI를 사용하여 음악을 생성합니다.
POST
https://udioapi.pro/api/generatetips
이 엔드포인트는 생성 결과를 콜백 URL로 보냅니다.
콜백 URL은 공개되어야 하며 POST 요청을 수락해야 합니다.
requestHeaders
| name | required | description |
|---|---|---|
Authorization | yes | 인증을 위한 Bearer 토큰 |
Content-Type | yes | application/json |
requestBody
요청 본문은 영감 모드 또는 사용자 정의 모드와 콜백 URL을 지원합니다.
영감 모드
텍스트 설명에서 생성
| paramName | paramType | required | description | example |
|---|---|---|---|---|
gpt_description_prompt | string | yes | 텍스트 설명 프롬프트 | A upbeat pop song about summer vacation with catchy melody |
사용자 정의 모드
맞춤 가사, 스타일, 제목으로 생성
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | 맞춤 가사 또는 프롬프트 | Verse 1: Walking down the street, feeling so free... |
style | string | no | 음악 스타일 | pop, upbeat, electronic, 120 bpm |
title | string | no | 노래 제목 | Summer Dreams |
tags | string | no | 부정적인 태그 | sad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
callback_url | string | yes | 생성 콜백을 수신하기 위한 공개 URL | https://your-domain.com/api/callback |
model | string | no | AI 모델 | chirp-v5-5 |
make_instrumental | boolean | no | 악기 음악 생성 | false |
gender | string | no | 보컬 성별 선호도 | female |
style_weight | number | no | 스타일 밀착력 | 0.65 |
weirdness_constraint | number | no | 창의적인 편차 제어 | 0.65 |
audio_weight | number | no | 오디오 기능 균형 | 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
}'