Generate voice preview audio from a text description
POST
/
organization
/
voices
/
design_previews
Design voice previews
curl --request POST \ --url https://api.beyondwords.io/v1/organization/voices/design_previews \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <api-key>' \ --data '{ "voice_description": "A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation"}'
import requests
url = "https://api.beyondwords.io/v1/organization/voices/design_previews"
payload = { "voice_description": "A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice_description: 'A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation'
})
};
fetch('https://api.beyondwords.io/v1/organization/voices/design_previews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beyondwords.io/v1/organization/voices/design_previews"
payload := strings.NewReader("{\n \"voice_description\": \"A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.beyondwords.io/v1/organization/voices/design_previews")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"voice_description\": \"A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.beyondwords.io/v1/organization/voices/design_previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voice_description\": \"A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation\"\n}"
response = http.request(request)
puts response.read_body
{ "text": "Good evening. Here is the latest update from London. Markets have responded positively to today's economic data.", "previews": [ { "generated_voice_id": "gen_british_female_01", "audio_base_64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwMAAAAAAAAAAAAAAA", "duration_secs": 9.4, "language": "en" }, { "generated_voice_id": "gen_british_female_02", "audio_base_64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwMAAAAAAAABBBBBBBB", "duration_secs": 8.9, "language": "en" } ]}
{
"code": 401,
"message": "Unauthorized"
}
Generate voice preview audio from a text description. Use this as the first step in voice generation.After choosing a preview, call Finalize voice design to save the voice.
Authorizations
X-Api-Key
string
header
required
Body
application/json
voice_description
string
required
A text description of the desired voice characteristics
Minimum string length: 20
text
string
Optional preview text (100–1000 characters). If omitted, ElevenLabs auto-generates it.
Required string length: 100 - 1000
guidance_scale
number
default:5
Optional. How closely the voice follows the prompt (0–100). Lower values give the model more creative freedom; higher values follow the prompt more closely but can sound artificial or robotic. If omitted, ElevenLabs uses its default of 5.
Required range: 0 <= x <= 100
Response
OK
text
string
The text used to generate the previews (auto-generated or client-supplied)
previews
object[]
Show child attributes
Was this page helpful?
⌘I
Design voice previews
curl --request POST \ --url https://api.beyondwords.io/v1/organization/voices/design_previews \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <api-key>' \ --data '{ "voice_description": "A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation"}'
import requests
url = "https://api.beyondwords.io/v1/organization/voices/design_previews"
payload = { "voice_description": "A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice_description: 'A warm, articulate British female news presenter with a calm, authoritative tone and clear pronunciation'
})
};
fetch('https://api.beyondwords.io/v1/organization/voices/design_previews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));