Skip to main content
POST
/
v1
/
ai
/
sound-effects
curl --request POST \
--url https://api.freepik.com/v1/ai/sound-effects \
--header 'Content-Type: application/json' \
--header 'x-freepik-api-key: <api-key>' \
--data '{
"text": "A cat meowing",
"duration_seconds": 5
}'
{
"data": {
"generated": [],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json
text
string
required

The text to convert to sound effects

Maximum length: 2500
Example:

"A cat meowing"

duration_seconds
number
required

The duration of the generated audio in seconds

Required range: 0.5 <= x <= 22
Example:

5

loop
boolean
default:false

Whether to create a sound effect that loops smoothly

prompt_influence
number
default:0.3

The influence of the prompt on the generated audio. A value between 0 and 1.

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

0.3

webhook_url
string<uri>

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example:

"https://www.example.com/webhook"

Response

OK - The task exists and the status is returned

data
object
required
Example:
{
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}