Skip to main content
POST
/
api
/
generate-sound
curl --request POST \
  --url https://easy-peasy.ai/api/generate-sound \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "A door creaking open slowly in a haunted house",
  "duration": 3
}
'
{
  "url": "https://media.easy-peasy.ai/tts/user-id/abc123.mp3",
  "text": "A door creaking open slowly in a haunted house",
  "seconds": 3,
  "status": "completed"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at https://easy-peasy.ai/settings/api

Headers

x-api-key
string
required

Your API key

Body

application/json
prompt
string
required

Text description of the sound effect to generate.

Example:

"A door creaking open slowly in a haunted house"

duration
number
default:5

Duration of the sound effect in seconds.

Example:

5

prompt_influence
number
default:0.3

How closely the output follows the prompt (0.0 = more creative, 1.0 = more literal).

Required range: 0 <= x <= 1
Example:

0.3

Response

Sound effect generated successfully

url
string<uri>

URL of the generated audio file (MP3)

text
string

The prompt used for generation

seconds
integer

Duration of the generated sound in seconds

status
enum<string>

Status of the generation

Available options:
completed