Elevenlabs Sound Effects V2 API Documentation
Playground
Try it on WaveSpeedAI!ElevenLabs Sound Effects V2 Text-to-SFX generates high-quality sound effects and seamlessly looping ambience from text descriptions for video, games, ads, social content, and sound design workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
ElevenLabs Sound Effects V2 generates sound effects and looping ambience directly from text descriptions. Describe the sound, environment, intensity, and how it should evolve, then choose the duration and optionally enable seamless looping.
It is designed for cinematic effects, environmental ambience, game audio, transitions, Foley-style sounds, and other non-speech audio workflows.
Why Choose This?
-
Text-to-sound generation
Create sound effects directly from natural-language descriptions. -
Seamless looping
Enableloopto generate ambience or effects designed to repeat smoothly. -
Flexible duration
Generate sounds from0.5to22seconds. -
Prompt adherence control
Useprompt_influenceto adjust how closely the generated sound follows the text description. -
Environmental sound design
Describe location, atmosphere, movement, intensity, and changes over time. -
Simple workflow
Provide a prompt, choose the duration, and generate a downloadable audio file.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text description of the sound effect, environment, and how the sound changes over time. Maximum 450 characters. |
| duration | No | Requested sound duration in seconds. Range: 0.5–22. Default: 5. |
| loop | No | Generate a sound effect designed to loop smoothly. Default: false. |
| prompt_influence | No | Controls how closely the generated sound follows the prompt. Higher values increase prompt adherence. Default: 0.3. |
How to Use
- Describe the sound — Specify the sound source, environment, intensity, texture, and movement.
- Set duration optional — Choose a duration from
0.5to22seconds. - Enable looping optional — Set
loop=truewhen you need repeating ambience or a seamless audio loop. - Adjust prompt influence optional — Increase it when closer adherence to the description is important.
- Submit — Generate, preview, and retrieve the audio file.
Pricing
Pricing is based on the requested duration.
The rate is $0.0022 per requested second.
| Duration | Price |
|---|---|
| 0.5s | $0.0011 |
| 5s | $0.011 |
| 10s | $0.022 |
| 15s | $0.033 |
| 22s | $0.0484 |
If duration is omitted, the default 5-second request costs $0.011.
loop and prompt_influence do not add separate charges.
Best Use Cases
- Cinematic sound effects — Generate impacts, transitions, mechanical sounds, environmental events, and dramatic effects.
- Ambient soundscapes — Create rain, forests, city environments, room tone, machinery, crowds, and other background ambience.
- Game audio — Generate effects for environments, interactions, objects, creatures, and gameplay events.
- Looping backgrounds — Create repeatable ambience for games, installations, videos, or interactive experiences.
- Foley-style effects — Generate footsteps, doors, fabric movement, object handling, and other action-related sounds.
- Creative prototyping — Quickly explore different sound-design directions from text descriptions.
Pro Tips
- Describe the sound itself rather than spoken narration.
- Include the environment when acoustics matter, such as a narrow hallway, open field, warehouse, or small room.
- Describe how the sound evolves, such as gradually building, fading away, approaching, or moving past the listener.
- Use specific material and action words for Foley-style effects.
- Enable
loopfor continuous ambience that needs to repeat smoothly. - Increase
prompt_influencewhen the output needs to follow specific sound characteristics more closely. - Keep the prompt focused instead of combining many unrelated sound events.
Notes
promptis required and supports up to450characters.durationsupports values from0.5to22seconds.durationdefaults to5seconds.loopdefaults tofalse.prompt_influencedefaults to0.3.- Output is provided as an MP3 audio file.
- This endpoint is intended for sound effects and ambience rather than spoken narration.
Related Models
- ElevenLabs Eleven V4 — Generate expressive spoken narration, voiceovers, and character performances.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"duration": 5,
"loop": false,
"prompt_influence": 0.3
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/elevenlabs/sound-effects-v2" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | 1 ~ 450 characters · pattern: \S | Describe the sound, its environment, and how it changes over time. Maximum 450 characters. | |
| duration | number | No | 5 | 0.5 ~ 22 | Sound duration in seconds, from 0.5 to 22. |
| loop | boolean | No | false | - | Create a sound effect designed to loop smoothly. |
| prompt_influence | number | No | 0.3 | 0 ~ 1 | Higher values follow the prompt more closely. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |