Sound Effects v3

This guide shows how to generate sound effects using the Sound Effects v3 model via the Leonardo.AI REST API.

Sample Request

curl --request POST \
     --url https://cloud.leonardo.ai/api/rest/v2/generations \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
{
    "model": "elevenlabs/sound-effects-v3",
    "public": false,
    "parameters": {
      "prompt": "Thunder rumbling in the distance followed by heavy rain on a tin roof",
      "duration": 10,
      "prompt_influence": 0.7,
      "quantity": 1
    }
}
'

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
durationnumberDuration of the generated sound effect in seconds. Set to any whole number from 1 to 30. Defaults to 2.
modelstringSpecifies the model used for generation. Set to elevenlabs/sound-effects-v3.
promptstringText description of the sound effect to generate. Maximum of 9999 characters.
prompt_influencenumberControls how closely the output follows the prompt. Ranges from 0 to 1. Defaults to 0.7.
publicbooleanControls whether the generated audio is public (true) or private (false).
quantitynumberThe number of outputs to generate. Set to 1, 2, 3, or 4. Defaults to 1.

Did this page help you?