Text to speech
Turn a script into natural-sounding narration with ElevenLabs voices. Browse the catalog, pick a voice, and get audio you can drop straight onto a timeline.
#Generate text-to-speech audio
Enqueue a job to generate spoken-word audio from text using a selected voice.
https://api.rendley.com/v1/ai/text-to-speechDon't have one? Create an API key
Which model to use. Changing it updates the params below.
Model-specific parameters. The fields listed for the selected model.
Voice ID from the voice catalog.
The exact spoken words to convert to speech audio. No stage directions or annotations.
How consistent the voice is across the clip. Higher = more monotone and stable; lower = more expressive and variable. Raise this if the voice sounds different on every generation.
How closely the output matches the original voice. Higher = closer to the source voice.
Style exaggeration of the original speaker. 0 disables style transfer. Higher values amplify the speaker's style at the cost of stability.
Boost similarity to the original speaker. Adds slight latency.
Playback speed. 1.0 is natural speed; lower is slower; higher is faster.
Optional seed for deterministic output. Reuse the same seed (with the same voice and settings) to get the same audio every time. Leave empty for random.
const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}),
});
const { data } = await res.json();curl -X POST "https://api.rendley.com/v1/ai/text-to-speech" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}'import requests
res = requests.post(
"https://api.rendley.com/v1/ai/text-to-speech",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["voice_id" => "EXAVITQu4vr4xnSDxMaL", "prompt" => "Welcome to Rendley. Let's make something."], "model_id" => "eleven-labs-tts"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/text-to-speech", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { voice_id: "EXAVITQu4vr4xnSDxMaL", prompt: "Welcome to Rendley. Let's make something." }, model_id: "eleven-labs-tts" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": {
"job_id": "d97241f2-e1e4-4651-b078-8663fc35c584"
}
}#Calculate text-to-speech cost
Calculate the credit cost of generating spoken-word audio from text.
https://api.rendley.com/v1/ai/text-to-speech/costDon't have one? Create an API key
Which model to use. Changing it updates the params below.
Model-specific parameters. The fields listed for the selected model.
Voice ID from the voice catalog.
The exact spoken words to convert to speech audio. No stage directions or annotations.
How consistent the voice is across the clip. Higher = more monotone and stable; lower = more expressive and variable. Raise this if the voice sounds different on every generation.
How closely the output matches the original voice. Higher = closer to the source voice.
Style exaggeration of the original speaker. 0 disables style transfer. Higher values amplify the speaker's style at the cost of stability.
Boost similarity to the original speaker. Adds slight latency.
Playback speed. 1.0 is natural speed; lower is slower; higher is faster.
Optional seed for deterministic output. Reuse the same seed (with the same voice and settings) to get the same audio every time. Leave empty for random.
const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}),
});
const { data } = await res.json();curl -X POST "https://api.rendley.com/v1/ai/text-to-speech/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}'import requests
res = requests.post(
"https://api.rendley.com/v1/ai/text-to-speech/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["voice_id" => "EXAVITQu4vr4xnSDxMaL", "prompt" => "Welcome to Rendley. Let's make something."], "model_id" => "eleven-labs-tts"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"voice_id": "EXAVITQu4vr4xnSDxMaL",
"prompt": "Welcome to Rendley. Let's make something."
},
"model_id": "eleven-labs-tts"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/text-to-speech/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { voice_id: "EXAVITQu4vr4xnSDxMaL", prompt: "Welcome to Rendley. Let's make something." }, model_id: "eleven-labs-tts" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": 0
}#List text-to-speech voices
List available text-to-speech voices, with optional pagination and search.
https://api.rendley.com/v1/ai/text-to-speech/voicesDon't have one? Create an API key
const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/voices", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();curl "https://api.rendley.com/v1/ai/text-to-speech/voices" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
res = requests.get(
"https://api.rendley.com/v1/ai/text-to-speech/voices",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/voices");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/ai/text-to-speech/voices", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/voices")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": [
{
"id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
"model_id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
"name": "string",
"preview_audio_url": "string"
}
]
}#Get a voice preview
Get a preview audio URL for a specific text-to-speech voice.
https://api.rendley.com/v1/ai/text-to-speech/voices/{voiceId}/previewDon't have one? Create an API key
const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();curl "https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
res = requests.get(
"https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": {
"preview_audio_url": "string"
}
}