Skip to content

Eleven Sound Effects v3

Sound effects from a description, up to 30 seconds, optionally looping; follows multi-part prompts more closely than v2.

  • by ElevenLabs
  • Audio
  • $0.002/second
On this page

1.Call

Music and sound effects run as jobs: create one, then follow progress over Server-Sent Events, poll, or receive a webhook. Every response carries an x-request-id trace ID.

# 1. Create the job
curl https://api.ewest.ai/v1/audio/generations \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/eleven-sfx-v3", "prompt": "a wooden door creaking open", "duration": 5}'
# → 202 {"id": "job_…", "type": "audio", "status": "queued", "progress": 0, …}

# 2. Follow it (Server-Sent Events), or poll GET /v1/jobs/job_…
curl -N https://api.ewest.ai/v1/jobs/job_…/events -H "Authorization: Bearer $EWEST_KEY"
# → … "output": {"url": "https://cdn.ewest.ai/aud/….mp3"}

2.Authentication

Send your API key in the Authorization: Bearer header, as the examples above do (clients built for the Anthropic API can use x-api-key). Create keys under API keys. Keep the key on your server, never in browser code. More in the authentication guide.

3.Jobs

Music and sound runs as a job. The create call answers 202 with a job; follow it with GET /v1/jobs/{id}/events (Server-Sent Events), poll GET /v1/jobs/{id}, or pass a webhook_url. The status is one of queued, running, succeeded or failed; the file is in output.url once it has succeeded. See the audio guide.

4.Schema

What you send and what comes back, for ewest/eleven-sfx-v3. The output tables are read from the API's OpenAPI description.

Input

POST /v1/audio/generations
  • modelstringRequired
    The model id, ewest/eleven-sfx-v3.
  • promptstringRequired
    What the sound should be. Up to 450 characters.
  • durationintegerOptionaldefault 5
    Length in seconds. One of: 1, 2, 3, 5, 8, 10, 15, 20, 25, 30.
  • loopbooleanOptionaldefault false
    Make the sound loop seamlessly.
  • webhook_urlstringOptional
    Public https URL that receives a POST with the finished job.

Output

Returns audio. POST /v1/audio/generations answers 202: The job, queued. GET /v1/jobs/{id} answers 200: The job.

  • idstringAlways
    Also the trace id (x-request-id).
  • objectstringAlways
    Always job.
  • typestringAlways
    Always audio.
  • modelstringAlways
    The model that runs the job.
  • statusstringAlways
    queued and running are in progress; succeeded and failed are final. One of queued, running, succeeded, failed.
  • progressintegerAlways
    Estimated from elapsed time; 0 for failed jobs.
  • eta_secondsinteger or nullAlways
    Expected seconds left; null when finished or when the job runs longer than usual.
  • created_atintegerAlways
    Unix seconds when the job was created.
  • started_atinteger or nullAlways
    Unix seconds when the model started generating; null while the job is queued.
  • completed_atinteger or nullAlways
    Unix seconds when the job reached succeeded or failed; null while it is in progress.
  • inputobjectAlways
    The parameters of a music or sound-effect job, defaults filled in.
  • input.promptstringAlways
    The prompt.
  • input.durationinteger or nullAlways
    Length in seconds; null when the model chooses the length.
  • input.instrumentalbooleanAlways
    Music without vocals.
  • input.loopbooleanAlways
    A sound effect that loops.
  • outputobject or nullAlways
    Set once the job succeeded, null before and when it failed. The file is on cdn.ewest.ai for 7 days.
  • output.urlstring (uri)Always (when set)
    Link to the audio file on cdn.ewest.ai, kept for 7 days.
  • output.content_typestringAlways (when set)
    Always audio/mpeg.
  • output.durationnumber or nullAlways (when set)
    Length in seconds as requested; null when the model chooses the length.
  • errorobject or nullAlways
    Set when the job failed, null otherwise.
  • error.codestring or nullAlways (when set)
    Why the job failed. generation_failed: The model could not generate the output; retry, or contact support if it keeps happening. content_policy: The prompt or an input was rejected by the model's safety filters. timeout: Generation took too long and was stopped. storage_error: The output was generated but could not be stored; retry. cancelled: You cancelled the job (POST /v1/jobs/{id}/cancel) before it started; it is not charged. One of generation_failed, content_policy, timeout, storage_error, cancelled.
  • error.messagestringAlways (when set)
    A fixed, readable explanation for the code. Branch on code, not on this text.
  • usageobject or nullAlways
    Billed units once the audio job succeeded, null before and when it failed: {"seconds": n} for models with set lengths, or {"generations": 1} for models that choose their own length.
  • usage.secondsnumberSometimes
    Seconds of audio billed.
  • usage.generationsintegerSometimes
    Number of generations billed (1).

Sample response

{
  "id": "job_7Hq2xK9mPz",
  "object": "job",
  "type": "audio",
  "model": "ewest/eleven-sfx-v3",
  "created_at": 1793530277,
  "input": {
    "prompt": "upbeat lo-fi beat with warm piano",
    "duration": 5,
    "instrumental": false,
    "loop": false
  },
  "status": "queued",
  "progress": 2,
  "eta_seconds": 45,
  "started_at": null,
  "completed_at": null,
  "output": null,
  "error": null,
  "usage": null
}

5.Details

Type
Sound effects
Length
1 s, 2 s, 3 s, 5 s, 8 s, 10 s, 15 s, 20 s, 25 s, 30 s
Options
seamless loop
Output
MP3 on cdn.ewest.ai (kept 7 days)