From Elevenlabs Text-to-Speech Official Documentation: https://elevenlabs.io/docs/api-reference/text-to-speech/convertCurrently Supported Models: Models with 1x rate: eleven_multilingual_v2, eleven_flash_v2, eleven_multilingual_v1 Models with 0.5x rate: eleven_flash_v2_5, eleven_turbo_v2_5, eleven_turbo_v2The actual rate is subject to the data returned by the models API, refer to the field character_cost_multiplier.Price: 0.3 PTC / 1000 characters
Request
Path Params
Query Params
Header Params
Body Params application/json
Example
{"text":"The first move is what sets everything in motion.","model_id":"eleven_multilingual_v2"}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/elevenlabs/text-to-speech/JBFqnCBsd6RMkjVDRZzb?output_format=mp3_44100_128&response_format=url' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"text": "The first move is what sets everything in motion.",
"model_id": "eleven_multilingual_v2"
}'