API Reference
API Reference / Endpoints / Sound Effects

Generate sound effects

/v1/sound-effects/generate

Generate a sound effect from text and receive a completed artifact on success.

POST/v1/sound-effects/generate
Auth: API keyBilling: Consumes 1 API callBehavior: SyncScopes: audio:generate
POSTSyncjsonaudio:generate

When to use it

Use this when you need a direct text-to-SFX generation flow with optional duration and loop controls.

Behavior on success

Returns a completed payload on the normal success path.

Integration shape

Authorization model
audio:generate
Request format
json
Polling pattern
No polling required on the normal success path.

Request

FieldTypeRequiredDescription
textstringYesSound effect description.
duration_secondsnumberOptionalOptional duration from 0.5 to 30 seconds.
prompt_influencenumberOptionalOptional prompt influence from 0 to 1.
loopbooleanOptionalLoop-ready generation hint.
output_formatstringOptionalOptional encoder hint.

Example request

POST /v1/sound-effects/generate
const response = await fetch('https://prod-backup-backend.wubble.ai/v1/sound-effects/generate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WUBBLE_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "text": "Heavy rain on a tin roof with distant thunder",
  "duration_seconds": 5,
  "prompt_influence": 0.7,
  "loop": false
}),
});

const payload = await response.json();
console.log(payload);

Example response

Response shapejson
{
  "success": true,
  "data": {
    "request_id": "<uuid>",
    "status": "completed",
    "result_url": "https://cdn.wubble.ai/audio/sfx.mp3",
    "credits_used": 1
  }
}

Implementation notes

This usually completes synchronously with HTTP 200 and a completed status.
On generation failure, the backend runs the refund path before returning an error.

Production guidance

Pair this route with idempotency on POST requests and either request polling or webhooks whenever the response is asynchronous.
Was this page helpful?