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": "5148a2db-5f7c-480c-8f7c-39c6414a4d5d"
},
"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": "5148a2db-5f7c-480c-8f7c-39c6414a4d5d"
},
"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: '5148a2db-5f7c-480c-8f7c-39c6414a4d5d'},
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' => '5148a2db-5f7c-480c-8f7c-39c6414a4d5d'
],
'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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}"
response = http.request(request)
puts response.read_bodyText-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": "5148a2db-5f7c-480c-8f7c-39c6414a4d5d"
},
"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": "5148a2db-5f7c-480c-8f7c-39c6414a4d5d"
},
"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: '5148a2db-5f7c-480c-8f7c-39c6414a4d5d'},
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' => '5148a2db-5f7c-480c-8f7c-39c6414a4d5d'
],
'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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\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\": \"5148a2db-5f7c-480c-8f7c-39c6414a4d5d\"\n },\n \"output_format\": {\n \"container\": \"raw\",\n \"encoding\": \"pcm_s16le\",\n \"sample_rate\": 22050\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
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, at most 2,000 characters (about 1.5–2 minutes of speech). Characters are Unicode code points of the string as sent (after JSON decoding, no normalization), including leading and trailing whitespace and newlines — the same count used for billing at 1 credit per character. In JavaScript, count with [...text].length, not text.length. Over the limit → input_too_long (400), returned before any work starts and not billed; split longer text across requests. The request body is also capped at 64 KB (payload_too_large, 413).
2000Selects the voice to synthesize. Required — there is no default voice; a request that doesn't resolve to a voice returns an error (it is no longer silently substituted). The only accepted form is the nested object { "mode": "id", "id": "<voice-uuid>" }; a top-level voice_id is not supported.
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 BCP-47 language tag (e.g. en-US). Accepted for compatibility but has no effect on synthesis.
"en-US"
Response
A text/event-stream of chunk events followed by a done event. overloaded (429), engine_error (usually 502), and engine_unavailable (503) can also arrive mid-stream as an error event inside this 200 response; the stream then ends with no done. The request is charged for the full transcript once its first audio chunk has been delivered, even if it later ends with an error event; a stream that fails before its first chunk isn't charged.
The response is of type string.