API Uç Noktaları

WAV Dönüştürme

POST/v2/wav/generate

WAV dönüştürme görevi oluştur

Mevcut bir müzik oluşturma görevindeki ses öğesi için WAV dönüştürme görevi oluşturur.

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

tips

Müzik oluşturma task_id değerini ve seçilen sonucun audio_id değerini kullanın.

Dönen wav... ID; durum, günlükler ve webhook için kullanılır. Her 5-10 saniyede sorgulayın.

requestHeaders

namerequireddescription
nameAuthorizationrequiredyesdescriptionKimlik doğrulama ve görev sahipliği için Bearer API anahtarı
nameContent-TyperequiredyesdescriptionJSON istek gövdesi

requestBody

Kaynak görev, ses öğesi ve isteğe bağlı webhook adresi

commonParams

paramNameparamTyperequireddescriptionexample
paramNametask_idparamTypestringrequiredyesdescriptionUdio API müzik oluşturma taskId'siexamplegen2abc123def456bksv
paramNameaudio_idparamTypestringrequiredyesdescriptionKaynak görev sonucundaki ses ID'siexamplee231f197-6bcb-4d70-bb8f-749b7f3272b8
paramNamecallback_urlparamTypestringrequirednodescriptionNihai WAV durumunu alacak HTTPS adresiexamplehttps://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 dönüştürme durumu

Oluşturma endpoint'inin döndürdüğü WAV ID ile durumu ve WAV URL'sini alır.

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

tips

Durumlar: IN_PROGRESS, SUCCESS, FAILED, ERROR.

Yalnızca Udio API WAV ID'si kabul edilir; provider ID gerekmez ve döndürülmez.

requestHeaders

namerequireddescription
nameAuthorizationrequiredyesdescriptionKimlik doğrulama ve görev sahipliği için Bearer API anahtarı

requestParams

paramNameparamTyperequireddescription
paramNametask_idparamTypestringrequiredyesdescriptionOluşturma endpoint'inin döndürdüğü WAV ID

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 dönüştürme Webhook'u

callback_url sağlandığında nihai durum, durum API'sindeki aynı WAV ID ile gönderilir.

POSTcallback_url

tips

Hızlıca 2xx yanıtı verin. Mevcut tek denemelik teslim davranışı korunur.

Payload provider ID veya ham provider yanıtı içermez.

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 });
});