curl --request POST \
--url https://api.sunbird.ai/tasks/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "eng",
"max_tokens": 1200,
"repetition_penalty": 1.1,
"response_mode": "url",
"seed": 42,
"temperature": 0.6,
"text": "I am a nurse who takes care of many people.",
"top_p": 0.95,
"voice": "salt_eng_0001"
}
'import requests
url = "https://api.sunbird.ai/tasks/audio/speech"
payload = {
"language": "eng",
"max_tokens": 1200,
"repetition_penalty": 1.1,
"response_mode": "url",
"seed": 42,
"temperature": 0.6,
"text": "I am a nurse who takes care of many people.",
"top_p": 0.95,
"voice": "salt_eng_0001"
}
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({
language: 'eng',
max_tokens: 1200,
repetition_penalty: 1.1,
response_mode: 'url',
seed: 42,
temperature: 0.6,
text: 'I am a nurse who takes care of many people.',
top_p: 0.95,
voice: 'salt_eng_0001'
})
};
fetch('https://api.sunbird.ai/tasks/audio/speech', 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/audio/speech",
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([
'language' => 'eng',
'max_tokens' => 1200,
'repetition_penalty' => 1.1,
'response_mode' => 'url',
'seed' => 42,
'temperature' => 0.6,
'text' => 'I am a nurse who takes care of many people.',
'top_p' => 0.95,
'voice' => 'salt_eng_0001'
]),
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/audio/speech"
payload := strings.NewReader("{\n \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\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/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunbird.ai/tasks/audio/speech")
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 \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\n}"
response = http.request(request)
puts response.read_body{
"audio_url": "<string>",
"model": "<string>",
"platform": "<string>",
"voice": "<string>",
"audio_url_expires_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"sample_rate": 123,
"duration_seconds": 123,
"gcs_object": "<string>",
"request_id": "<string>",
"timings_ms": {},
"usage": {
"input_characters": 123,
"output_audio_bytes": 123,
"duration_seconds": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Text to Speech
Unified Text-to-Speech endpoint, served by the RunPod Orpheus-3B deployment. response_mode=‘url’ (default) returns a signed GCS audio URL; ‘stream’ returns raw audio bytes proxied from RunPod; ‘both’ returns raw audio bytes with the signed URL in the X-Audio-Url header. Replaces /tasks/modal/tts, /tasks/runpod/tts, and /tasks/modal/orpheus/tts.
curl --request POST \
--url https://api.sunbird.ai/tasks/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "eng",
"max_tokens": 1200,
"repetition_penalty": 1.1,
"response_mode": "url",
"seed": 42,
"temperature": 0.6,
"text": "I am a nurse who takes care of many people.",
"top_p": 0.95,
"voice": "salt_eng_0001"
}
'import requests
url = "https://api.sunbird.ai/tasks/audio/speech"
payload = {
"language": "eng",
"max_tokens": 1200,
"repetition_penalty": 1.1,
"response_mode": "url",
"seed": 42,
"temperature": 0.6,
"text": "I am a nurse who takes care of many people.",
"top_p": 0.95,
"voice": "salt_eng_0001"
}
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({
language: 'eng',
max_tokens: 1200,
repetition_penalty: 1.1,
response_mode: 'url',
seed: 42,
temperature: 0.6,
text: 'I am a nurse who takes care of many people.',
top_p: 0.95,
voice: 'salt_eng_0001'
})
};
fetch('https://api.sunbird.ai/tasks/audio/speech', 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/audio/speech",
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([
'language' => 'eng',
'max_tokens' => 1200,
'repetition_penalty' => 1.1,
'response_mode' => 'url',
'seed' => 42,
'temperature' => 0.6,
'text' => 'I am a nurse who takes care of many people.',
'top_p' => 0.95,
'voice' => 'salt_eng_0001'
]),
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/audio/speech"
payload := strings.NewReader("{\n \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\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/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunbird.ai/tasks/audio/speech")
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 \"language\": \"eng\",\n \"max_tokens\": 1200,\n \"repetition_penalty\": 1.1,\n \"response_mode\": \"url\",\n \"seed\": 42,\n \"temperature\": 0.6,\n \"text\": \"I am a nurse who takes care of many people.\",\n \"top_p\": 0.95,\n \"voice\": \"salt_eng_0001\"\n}"
response = http.request(request)
puts response.read_body{
"audio_url": "<string>",
"model": "<string>",
"platform": "<string>",
"voice": "<string>",
"audio_url_expires_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"sample_rate": 123,
"duration_seconds": 123,
"gcs_object": "<string>",
"request_id": "<string>",
"timings_ms": {},
"usage": {
"input_characters": 123,
"output_audio_bytes": 123,
"duration_seconds": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Text-to-speech request for the RunPod Orpheus-3B endpoint.
Text to synthesize.
1Orpheus speaker catalog tag (e.g. 'salt_lug_0001'). If omitted, a speaker is chosen for language (Luganda by default).
url (signed GCS URL), stream (raw audio bytes from RunPod), or both (raw audio bytes with the signed URL in the X-Audio-Url header).
url, stream, both ISO 639-3 code (e.g. 'lug').
Sampling knob.
Sampling knob.
Sampling knob.
Max tokens per chunk.
Deterministic seed.
Response
Successful Response
Normalized response for response_mode='url' across all providers.
Signed URL to the generated audio.
Model used.
Platform used.
Resolved voice/speaker.
Usage for this synthesis (characters, bytes, seconds).
Show child attributes
Show child attributes

