Finetuning.aiFinetuning.ai

GET /v1/sound-effects/:id

Get details for a specific sound effect

Retrieve the full details of a specific sound effect, including its current status and download URL.

Request

GET https://pub.finetuning.ai/v1/sound-effects/:id

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour API key

Path parameters

ParameterTypeDescription
idstringThe sound-effect ID returned by POST /v1/sound-effects

Example

curl https://pub.finetuning.ai/v1/sound-effects/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d \
  -H "X-API-Key: ft_live_your_key_here"

Response

200 OK
{
  "data": {
    "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "status": "completed",
    "prompt": "thunderclap with heavy rain",
    "requestedDuration": 5,
    "audioUrl": "https://media.finetuning.ai/sfx/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d/0.mp3",
    "duration": 5.0,
    "webhook": null,
    "errorMessage": null,
    "createdAt": "2025-01-15 10:30:00",
    "completedAt": "2025-01-15T10:30:06.184Z"
  }
}

Response fields

FieldTypeDescription
data.idstringUnique sound-effect ID (UUID)
data.statusstringpending, processing, completed, failed
data.promptstringThe prompt used
data.requestedDurationnumberRequested duration in seconds
data.audioUrlstring | nullAudio download URL (available when completed)
data.durationnumber | nullActual length of the rendered clip in seconds
data.webhookstring | nullWebhook URL set at create time, or null if none
data.errorMessagestring | nullError details if generation failed
data.createdAtstringCreation timestamp
data.completedAtstring | nullCompletion timestamp (ISO 8601)

Sound-effect statuses

StatusDescription
pendingGeneration is queued
processingGeneration is in progress
completedGeneration finished — audioUrl is available
failedGeneration failed — check errorMessage field for details

Polling for completion

Sound effects generate in a few seconds. Poll this endpoint until the status flips to completed. If you'd rather not poll, set a webhook URL when you create the sound effect and we'll deliver the result to you — see Webhooks.

async function waitForSoundEffect(id, apiKey) {
  while (true) {
    const res = await fetch(`https://pub.finetuning.ai/v1/sound-effects/${id}`, {
      headers: { 'X-API-Key': apiKey },
    });
    const { data } = await res.json();

    if (data.status === 'completed') return data;
    if (data.status === 'failed') throw new Error(data.errorMessage);

    // Wait 2 seconds before polling again
    await new Promise(r => setTimeout(r, 2000));
  }
}

Errors

CodeStatusDescription
MISSING_API_KEY401X-API-Key header was not provided
INVALID_API_KEY401API key is malformed, revoked, or does not exist
NOT_FOUND404Sound effect not found
INTERNAL_ERROR500Unexpected server error

On this page