Synthesize speech for one input via Orpheus-3B
curl --request POST \
--url https://api.sunbird.ai/tasks/modal/orpheus/tts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"speaker_id": "salt_lug_0001",
"language": "<string>",
"seed": 123,
"temperature": 0.6,
"top_p": 0.95,
"repetition_penalty": 1.1,
"max_tokens": 1200
}
'import requests
url = "https://api.sunbird.ai/tasks/modal/orpheus/tts"
payload = {
"text": "<string>",
"speaker_id": "salt_lug_0001",
"language": "<string>",
"seed": 123,
"temperature": 0.6,
"top_p": 0.95,
"repetition_penalty": 1.1,
"max_tokens": 1200
}
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>',
speaker_id: 'salt_lug_0001',
language: '<string>',
seed: 123,
temperature: 0.6,
top_p: 0.95,
repetition_penalty: 1.1,
max_tokens: 1200
})
};
fetch('https://api.sunbird.ai/tasks/modal/orpheus/tts', 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.sunbird.ai/tasks/modal/orpheus/tts",
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>',
'speaker_id' => 'salt_lug_0001',
'language' => '<string>',
'seed' => 123,
'temperature' => 0.6,
'top_p' => 0.95,
'repetition_penalty' => 1.1,
'max_tokens' => 1200
]),
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.sunbird.ai/tasks/modal/orpheus/tts"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\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.sunbird.ai/tasks/modal/orpheus/tts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunbird.ai/tasks/modal/orpheus/tts")
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 \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\n}"
response = http.request(request)
puts response.read_body{
"audio_url": "<string>",
"audio_url_expires_at": "2023-11-07T05:31:56Z",
"speaker_id": "<string>",
"duration_seconds": 123,
"audio_size_bytes": 123,
"gcs_object": "<string>",
"request_id": "<string>",
"timings_ms": {
"inference_ms": 123,
"upload_ms": 123,
"signed_url_ms": 123,
"total_ms": 123
},
"language": "<string>",
"sample_rate": 24000,
"chunks": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Legacy Text to Speech
Synthesize Speech (Orpheus-3B)
deprecated
Calls the Orpheus-3B Modal vLLM inference app, uploads the generated WAV to Google Cloud Storage, and returns a v4 presigned download URL valid for the configured expiry window (default 30 minutes), together with metadata and stage-by-stage latency timings.
POST
/
tasks
/
modal
/
orpheus
/
tts
Synthesize speech for one input via Orpheus-3B
curl --request POST \
--url https://api.sunbird.ai/tasks/modal/orpheus/tts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"speaker_id": "salt_lug_0001",
"language": "<string>",
"seed": 123,
"temperature": 0.6,
"top_p": 0.95,
"repetition_penalty": 1.1,
"max_tokens": 1200
}
'import requests
url = "https://api.sunbird.ai/tasks/modal/orpheus/tts"
payload = {
"text": "<string>",
"speaker_id": "salt_lug_0001",
"language": "<string>",
"seed": 123,
"temperature": 0.6,
"top_p": 0.95,
"repetition_penalty": 1.1,
"max_tokens": 1200
}
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>',
speaker_id: 'salt_lug_0001',
language: '<string>',
seed: 123,
temperature: 0.6,
top_p: 0.95,
repetition_penalty: 1.1,
max_tokens: 1200
})
};
fetch('https://api.sunbird.ai/tasks/modal/orpheus/tts', 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.sunbird.ai/tasks/modal/orpheus/tts",
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>',
'speaker_id' => 'salt_lug_0001',
'language' => '<string>',
'seed' => 123,
'temperature' => 0.6,
'top_p' => 0.95,
'repetition_penalty' => 1.1,
'max_tokens' => 1200
]),
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.sunbird.ai/tasks/modal/orpheus/tts"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\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.sunbird.ai/tasks/modal/orpheus/tts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunbird.ai/tasks/modal/orpheus/tts")
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 \"speaker_id\": \"salt_lug_0001\",\n \"language\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 0.6,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1,\n \"max_tokens\": 1200\n}"
response = http.request(request)
puts response.read_body{
"audio_url": "<string>",
"audio_url_expires_at": "2023-11-07T05:31:56Z",
"speaker_id": "<string>",
"duration_seconds": 123,
"audio_size_bytes": 123,
"gcs_object": "<string>",
"request_id": "<string>",
"timings_ms": {
"inference_ms": 123,
"upload_ms": 123,
"signed_url_ms": 123,
"total_ms": 123
},
"language": "<string>",
"sample_rate": 24000,
"chunks": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Text to synthesize.
Required string length:
1 - 2000Speaker tag from the Orpheus finetune set (see GET /speakers).
Optional ISO 639-3 language code (e.g. 'lug', 'eng'). If set, speaker_id must belong to it.
RNG seed for reproducibility.
Required range:
0 <= x <= 2Required range:
x <= 1Required range:
1 <= x <= 2Required range:
64 <= x <= 4096Response
Successful Response
Required string length:
1 - 2083Show child attributes
Show child attributes

