API 엔드포인트

WAV 변환

POST/v2/wav/generate

WAV 변환 작업 생성

기존 음악 생성 작업의 오디오 결과를 WAV로 변환하는 작업을 생성합니다.

POSThttps://udioapi.pro/api/v2/wav/generate

tips

음악 생성의 task_id와 선택한 결과의 audio_id를 사용하세요.

반환된 wav... ID는 상태, 로그, Webhook에 공통으로 사용됩니다. 5-10초마다 조회하세요.

requestHeaders

namerequireddescription
nameAuthorizationrequiredyesdescription인증 및 작업 소유권 확인용 Bearer API 키
nameContent-TyperequiredyesdescriptionJSON 요청 본문

requestBody

원본 음악 작업, 오디오 항목 및 선택적 Webhook 주소

commonParams

paramNameparamTyperequireddescriptionexample
paramNametask_idparamTypestringrequiredyesdescriptionUdio API 음악 생성 taskIdexamplegen2abc123def456bksv
paramNameaudio_idparamTypestringrequiredyesdescription원본 작업 결과의 오디오 IDexamplee231f197-6bcb-4d70-bb8f-749b7f3272b8
paramNamecallback_urlparamTypestringrequirednodescription최종 WAV 상태를 수신할 HTTPS 주소examplehttps://api.example.com/webhooks/wav

responses

json
{
  "code": 200,
  "message": "success",
  "workId": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
  "data": {
    "task_id": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
    "status": "IN_PROGRESS"
  }
}
json
{
  "code": 401,
  "message": "No API key provided in Authorization header",
  "data": null
}
json
{
  "code": 403,
  "message": "You do not have access to this music task",
  "data": null
}
json
{
  "code": 404,
  "message": "Original music task not found",
  "data": null
}
json
{
  "code": 422,
  "message": "task_id and audio_id are required",
  "data": null
}
json
{
  "code": 500,
  "message": "Internal Server Error",
  "data": null
}

codeExamples

curl
curl -X POST "https://udioapi.pro/api/v2/wav/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task_id": "gen2abc123def456bksv",
    "audio_id": "e231f197-6bcb-4d70-bb8f-749b7f3272b8",
    "callback_url": "https://api.example.com/webhooks/wav"
  }'
javascript
const response = await fetch('https://udioapi.pro/api/v2/wav/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    task_id: 'gen2abc123def456bksv',
    audio_id: 'e231f197-6bcb-4d70-bb8f-749b7f3272b8',
    callback_url: 'https://api.example.com/webhooks/wav'
  })
});

const result = await response.json();
console.log(result.data.task_id);
GET/v2/wav/status

WAV 변환 상태 조회

생성 API가 반환한 WAV taskId로 현재 상태와 WAV URL을 조회합니다.

GEThttps://udioapi.pro/api/v2/wav/status

tips

상태: IN_PROGRESS, SUCCESS, FAILED, ERROR.

Udio API WAV taskId만 허용하며 provider taskId는 필요하지도 반환되지도 않습니다.

requestHeaders

namerequireddescription
nameAuthorizationrequiredyesdescription인증 및 작업 소유권 확인용 Bearer API 키

requestParams

paramNameparamTyperequireddescription
paramNametask_idparamTypestringrequiredyesdescription생성 API가 반환한 WAV taskId

responses

json
{
  "code": 200,
  "message": "success",
  "data": {
    "type": "IN_PROGRESS",
    "task_id": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
    "audio_wav_url": "",
    "created_at": "2026-07-18 03:20:00",
    "updated_at": "2026-07-18 03:20:00",
    "error_message": null
  }
}
json
{
  "code": 200,
  "message": "success",
  "data": {
    "type": "SUCCESS",
    "task_id": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
    "audio_wav_url": "https://cdn.example.com/audio/converted.wav",
    "created_at": "2026-07-18 03:20:00",
    "updated_at": "2026-07-18 03:21:06",
    "error_message": null
  }
}
json
{
  "code": 200,
  "message": "success",
  "data": {
    "type": "FAILED",
    "task_id": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
    "audio_wav_url": "",
    "created_at": "2026-07-18 03:20:00",
    "updated_at": "2026-07-18 03:21:06",
    "error_message": "WAV conversion failed"
  }
}
json
{
  "code": 401,
  "message": "No API key provided in Authorization header",
  "data": null
}
json
{
  "code": 403,
  "message": "You do not have access to this WAV conversion task",
  "data": null
}
json
{
  "code": 404,
  "message": "WAV conversion task not found",
  "data": null
}
json
{
  "code": 422,
  "message": "task_id is required",
  "data": null
}

codeExamples

curl
curl -X GET "https://udioapi.pro/api/v2/wav/status?task_id=wav7f93c2a18d4e4d61b63d2fd142f31c90" \
  -H "Authorization: Bearer YOUR_API_KEY"
javascript
async function pollWav(taskId) {
  while (true) {
    const response = await fetch(
      'https://udioapi.pro/api/v2/wav/status?task_id=' + encodeURIComponent(taskId),
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );
    const result = await response.json();

    if (['SUCCESS', 'FAILED', 'ERROR'].includes(result.data?.type)) {
      return result;
    }

    await new Promise(resolve => setTimeout(resolve, 5000));
  }
}
POSTcallback_url

WAV 변환 Webhook

callback_url을 제공하면 상태 API와 동일한 WAV taskId로 최종 상태를 전송합니다.

POSTcallback_url

tips

신속하게 2xx를 반환하세요. 기존과 동일하게 한 번만 전송합니다.

payload에는 provider taskId 또는 원본 provider 응답이 포함되지 않습니다.

requestBody

json
{
  "code": 200,
  "message": "success",
  "data": {
    "type": "SUCCESS",
    "task_id": "wav7f93c2a18d4e4d61b63d2fd142f31c90",
    "audio_wav_url": "https://cdn.example.com/audio/converted.wav",
    "error_message": null
  }
}

codeExamples

javascript
app.post('/webhooks/wav', express.json(), (req, res) => {
  const { type, task_id, audio_wav_url, error_message } = req.body.data;

  if (type === 'SUCCESS') {
    console.log('WAV ready', task_id, audio_wav_url);
  } else {
    console.error('WAV failed', task_id, error_message);
  }

  res.status(200).json({ received: true });
});