ElevenLabs API
Generates speech audio from the provided text using ElevenLabs TTS service
tts-elevenlabs
Request Body
application/json
Optionaltext
Requiredstring
1
Maximum length: 10000
voice
Requiredstring
Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.
1
model
string
Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property.
"eleven_turbo_v2_5"
Value in: "eleven_turbo_v2_5" | "eleven_multilingual_v2"
voice_settings
object
Voice settings overriding stored setttings for the given voice. They are applied only on the given request.
token
Requiredstring
ElevenLabs API key for authentication
1
seed
number
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295.
0
Maximum: 4294967295
previous_text
string
The text that came before the text of the current request. Can be used to improve the flow of prosody when concatenating together multiple generations or to influence the prosody in the current generation.
next_text
string
The text that comes after the text of the current request. Can be used to improve the flow of prosody when concatenating together multiple generations or to influence the prosody in the current generation.
previous_request_ids
array<string>
A list of request_id of the samples that were generated before this generation. Can be used to improve the flow of prosody when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be send.
next_request_ids
array<string>
A list of request_id of the samples that were generated before this generation. Can be used to improve the flow of prosody when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be send.
apply_text_normalization
string
This parameter controls text normalization with three modes: ‘auto’, ‘on’, and ‘off’. When set to ‘auto’, the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With ‘on’, text normalization will always be applied, while with ‘off’, it will be skipped. Cannot be turned on for ‘eleven_turbo_v2_5’ model.
"auto"
Value in: "auto" | "on" | "off"
Audio file containing the generated speech