POST
/
v1
/
voice-generation
/
generate-voice
curl --request POST \
  --url https://api.elevenlabs.io/v1/voice-generation/generate-voice \
  --header 'Content-Type: application/json' \
  --data '{
  "gender": "female",
  "accent": "<string>",
  "age": "young",
  "accent_strength": 123,
  "text": "<string>"
}'
This response does not have an example.

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
gender
enum<string>
required

Category code corresponding to the gender of the generated voice. Possible values: female, male.

Available options:
female,
male
accent
string
required

Category code corresponding to the accent of the generated voice. Possible values: american, british, african, australian, indian.

age
enum<string>
required

Category code corresponding to the age of the generated voice. Possible values: young, middle_aged, old.

Available options:
young,
middle_aged,
old
accent_strength
number
required

The strength of the accent of the generated voice. Has to be between 0.3 and 2.0.

text
string
required

Text to generate, text length has to be between 100 and 1000.

Response

200 - audio/mpeg

The response is of type file.