POST
/
v1
/
sound-generation

Pricing

The API is charged at 100 credits per generation with automatic duration or 20 credits per second with set duration.

Headers

xi-api-key
string

Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.

Body

application/json
text
string
required

The text that will get converted into a sound effect.

duration_seconds
number

The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 22. If set to None we will guess the optimal duration using the prompt. Defaults to None.

prompt_influence
number
default: 0.3

A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3.

Response

200 - audio/mpeg

The response is of type file.