MOSS TTS v1.5
curl --request POST \
--url https://api.novita.ai/v3/moss-tts/v1/audio/speech \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/v3/moss-tts/v1/audio/speech"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.novita.ai/v3/moss-tts/v1/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.novita.ai/v3/moss-tts/v1/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_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/v3/moss-tts/v1/audio/speech"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/v3/moss-tts/v1/audio/speech")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/v3/moss-tts/v1/audio/speech")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAudio
MOSS TTS v1.5
POST
/
v3
/
moss-tts
/
v1
/
audio
/
speech
MOSS TTS v1.5
curl --request POST \
--url https://api.novita.ai/v3/moss-tts/v1/audio/speech \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/v3/moss-tts/v1/audio/speech"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.novita.ai/v3/moss-tts/v1/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.novita.ai/v3/moss-tts/v1/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_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/v3/moss-tts/v1/audio/speech"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/v3/moss-tts/v1/audio/speech")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/v3/moss-tts/v1/audio/speech")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyMOSS TTS v1.5 text-to-speech API. Supports both JSON body and multipart (reference audio) requests; returns a complete WAV file or a streaming PCM audio binary. The response is a binary audio stream. When testing with curl, add —output to save it to a file (e.g. —output moss-tts-local.wav), otherwise the binary content prints directly to the terminal.
Request Headers
string
requis
Supports:
application/json, multipart/form-datastring
requis
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
- application/json
- multipart/form-data
string
requis
Required, the text to synthesize. Submitting a complete sentence or paragraph at once is recommended.
string
défaut:"MOSS-TTS"
requis
Required, fixed value MOSS-TTS to select MOSS TTS v1.5.Optional values:
MOSS-TTSboolean
défaut:false
Optional, false returns a complete WAV; true returns a PCM stream suitable for play-while-generating.
string
défaut:"wav"
Optional, use wav for non-streaming; must be pcm when stream=true.Optional values:
wav, pcmResponse
Returns audio binary on success. Non-streaming is a complete WAV; streaming is raw PCM chunks. Streaming PCM format is described by response headers (defaults to 48000Hz, mono, 16-bit little-endian). Format:binaryDernière modification le 10 août 2026