curl --request POST \
--url https://api.nineninesix.ai/tts/sse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "gepard-1.0",
"transcript": "Streaming speech, chunk by chunk.",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 22050
}
}
'import requests
url = "https://api.nineninesix.ai/tts/sse"
payload = {
"model_id": "gepard-1.0",
"transcript": "Streaming speech, chunk by chunk.",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 22050
}
}
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({
model_id: 'gepard-1.0',
transcript: 'Streaming speech, chunk by chunk.',
voice: {mode: 'id', id: 'a0e99841-438c-4a64-b679-ae501e7d6091'},
output_format: {container: 'raw', encoding: 'pcm_s16le', sample_rate: 22050}
})
};
fetch('https://api.nineninesix.ai/tts/sse', 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.nineninesix.ai/tts/sse",
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([
'model_id' => 'gepard-1.0',
'transcript' => 'Streaming speech, chunk by chunk.',
'voice' => [
'mode' => 'id',
'id' => 'a0e99841-438c-4a64-b679-ae501e7d6091'
],
'output_format' => [
'container' => 'raw',
'encoding' => 'pcm_s16le',
'sample_rate' => 22050
]
]),
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.nineninesix.ai/tts/sse"
payload := strings.NewReader("{\n \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\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.nineninesix.ai/tts/sse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nineninesix.ai/tts/sse")
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 \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}"
response = http.request(request)
puts response.read_body"data: {\"type\":\"chunk\",\"data\":\"<base64 pcm>\",\"context_id\":\"...\"}\n\ndata: {\"type\":\"done\",\"context_id\":\"...\"}\n"{
"error": "invalid_output_format",
"message": "unsupported sample_rate"
}{
"error": "unauthorized",
"message": "invalid API key"
}{
"error": "payment_required",
"message": "insufficient credits"
}{
"error": "rate_limited",
"message": "requests/min limit exceeded for your tier"
}{
"error": "upstream_unavailable",
"message": "synthesis backend error"
}Text-to-Speech (SSE)
Stream audio over Server-Sent Events for low time-to-first-audio. Identical body to /tts/bytes, except output_format.container must be raw (SSE cannot wrap a WAV/RIFF header). Each event’s data is a JSON object: chunk events carry base64-encoded raw PCM; a final done event closes the stream.
curl --request POST \
--url https://api.nineninesix.ai/tts/sse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "gepard-1.0",
"transcript": "Streaming speech, chunk by chunk.",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 22050
}
}
'import requests
url = "https://api.nineninesix.ai/tts/sse"
payload = {
"model_id": "gepard-1.0",
"transcript": "Streaming speech, chunk by chunk.",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 22050
}
}
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({
model_id: 'gepard-1.0',
transcript: 'Streaming speech, chunk by chunk.',
voice: {mode: 'id', id: 'a0e99841-438c-4a64-b679-ae501e7d6091'},
output_format: {container: 'raw', encoding: 'pcm_s16le', sample_rate: 22050}
})
};
fetch('https://api.nineninesix.ai/tts/sse', 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.nineninesix.ai/tts/sse",
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([
'model_id' => 'gepard-1.0',
'transcript' => 'Streaming speech, chunk by chunk.',
'voice' => [
'mode' => 'id',
'id' => 'a0e99841-438c-4a64-b679-ae501e7d6091'
],
'output_format' => [
'container' => 'raw',
'encoding' => 'pcm_s16le',
'sample_rate' => 22050
]
]),
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.nineninesix.ai/tts/sse"
payload := strings.NewReader("{\n \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\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.nineninesix.ai/tts/sse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nineninesix.ai/tts/sse")
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 \"model_id\": \"gepard-1.0\",\n \"transcript\": \"Streaming speech, chunk by chunk.\",\n \"voice\": {\n \"mode\": \"id\",\n \"id\": \"a0e99841-438c-4a64-b679-ae501e7d6091\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}"
response = http.request(request)
puts response.read_body"data: {\"type\":\"chunk\",\"data\":\"<base64 pcm>\",\"context_id\":\"...\"}\n\ndata: {\"type\":\"done\",\"context_id\":\"...\"}\n"{
"error": "invalid_output_format",
"message": "unsupported sample_rate"
}{
"error": "unauthorized",
"message": "invalid API key"
}{
"error": "payment_required",
"message": "insufficient credits"
}{
"error": "rate_limited",
"message": "requests/min limit exceeded for your tier"
}{
"error": "upstream_unavailable",
"message": "synthesis backend error"
}Authorizations
Pass your API key as a Bearer token: Authorization: Bearer sk_996_....
Body
Same as TTSRequest, but output_format.container must be raw (streaming endpoints cannot emit a WAV header).
The TTS model. Currently gepard-1.0.
gepard-1.0 The text to synthesize. Billed at 1 credit per character.
Show child attributes
Show child attributes
Output audio format. Each field is validated against a fixed set; anything outside these values returns 400 with no silent fallback.
Show child attributes
Show child attributes
Optional language code (e.g. en).
"en"
Response
A text/event-stream of chunk events followed by a done event.
The response is of type string.