curl --request POST \
--url https://api.budgetpixel.com/v1/audios/seed-tts-3.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"voice_id": "<string>",
"instructions": "<string>",
"language": "auto",
"pitch": 0,
"sample_rate": 24000,
"speed": 1,
"volume": 1
}
'import requests
url = "https://api.budgetpixel.com/v1/audios/seed-tts-3.0"
payload = {
"text": "<string>",
"voice_id": "<string>",
"instructions": "<string>",
"language": "auto",
"pitch": 0,
"sample_rate": 24000,
"speed": 1,
"volume": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
voice_id: '<string>',
instructions: '<string>',
language: 'auto',
pitch: 0,
sample_rate: 24000,
speed: 1,
volume: 1
})
};
fetch('https://api.budgetpixel.com/v1/audios/seed-tts-3.0', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/audios/seed-tts-3.0",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'voice_id' => '<string>',
'instructions' => '<string>',
'language' => 'auto',
'pitch' => 0,
'sample_rate' => 24000,
'speed' => 1,
'volume' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/audios/seed-tts-3.0"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.budgetpixel.com/v1/audios/seed-tts-3.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/audios/seed-tts-3.0")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "aud_a1b2c3d4e5f6",
"message": "<string>",
"model": "<string>",
"status": "pending"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Generate speech with Seed TTS 3.0
Seed TTS 3.0 by ByteDance: natural speech from text in about 1,800 voices (GET /v1/voices), each of which reads any of 120 languages with the accent of its own native language. Audio tags in the text, such as [excited], [whispering], [laughs] or [sighs], shape the delivery, and an optional direction sets its tone. Up to 10,000 characters per request. MP3 output. Priced per started 100 characters of text (a Chinese character counts as 2; tags count); POST /v1/cost quotes the exact price.
Asynchronous. Returns a job id (tts_...; the audio is not in this response). Poll GET /v1/audios/{id} until status is succeeded: the MP3 is that response’s audio_url. Charged per started 100 characters of text on success only (rate in GET /v1/models); POST /v1/cost quotes the exact price. Voices: GET /v1/voices.
Examples, sample output and pricing: Seed TTS 3.0
curl --request POST \
--url https://api.budgetpixel.com/v1/audios/seed-tts-3.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"voice_id": "<string>",
"instructions": "<string>",
"language": "auto",
"pitch": 0,
"sample_rate": 24000,
"speed": 1,
"volume": 1
}
'import requests
url = "https://api.budgetpixel.com/v1/audios/seed-tts-3.0"
payload = {
"text": "<string>",
"voice_id": "<string>",
"instructions": "<string>",
"language": "auto",
"pitch": 0,
"sample_rate": 24000,
"speed": 1,
"volume": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
voice_id: '<string>',
instructions: '<string>',
language: 'auto',
pitch: 0,
sample_rate: 24000,
speed: 1,
volume: 1
})
};
fetch('https://api.budgetpixel.com/v1/audios/seed-tts-3.0', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/audios/seed-tts-3.0",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'voice_id' => '<string>',
'instructions' => '<string>',
'language' => 'auto',
'pitch' => 0,
'sample_rate' => 24000,
'speed' => 1,
'volume' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/audios/seed-tts-3.0"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.budgetpixel.com/v1/audios/seed-tts-3.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/audios/seed-tts-3.0")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"instructions\": \"<string>\",\n \"language\": \"auto\",\n \"pitch\": 0,\n \"sample_rate\": 24000,\n \"speed\": 1,\n \"volume\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "aud_a1b2c3d4e5f6",
"message": "<string>",
"model": "<string>",
"status": "pending"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Seed TTS 3.0 on BudgetPixel
Authorizations
Body
The text to read, up to 10,000 characters. Audio tags in square brackets ([excited], [whispering], [laughs], [sighs], …) shape the delivery and are billed as text.
A voice from GET /v1/voices. Every voice reads any language; one native to your text's language sounds most natural.