curl --request POST \
--url https://users.rime.ai/v1/rime-tts \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--output output.json \
--fail \
--data '{
"text": "Hello from Rime!",
"modelId": "mistv2",
"speaker": "astra",
"lang": "eng",
"audioFormat": "mp3",
"inlineSpeedAlpha": "0.5, 3",
"noTextNormalization": false,
"pauseBetweenBrackets": false,
"phonemizeBetweenBrackets": false,
"samplingRate": 22050,
"speedAlpha": 1.0
}'
import requests
url = "https://users.rime.ai/v1/rime-tts"
payload = {
"speaker": "astra",
"text": "Hello from Rime!",
"modelId": "mistv2",
"lang": "eng",
"audioFormat": "mp3",
"samplingRate": 22050,
"speedAlpha": 1.0,
"noTextNormalization": False
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer <authorization>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer <authorization>',
'Content-Type': 'application/json'
},
body: '{"speaker":"astra","text":"Hello from Rime!", "modelId": "mistv2", "lang": "eng", "audioFormat": "mp3", "samplingRate":22050,"speedAlpha":1.0,"noTextNormalization":false}'
};
fetch('https://users.rime.ai/v1/rime-tts', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://users.rime.ai/v1/rime-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 => "{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\":\"mistv2\",\n \"lang\":\"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}",
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Authorization: Bearer <authorization>",
"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/ioutil"
)
func main() {
url := "https://users.rime.ai/v1/rime-tts"
payload := strings.NewReader("{\n \"speaker\": \"astra\",\n \"modelId\": \"mistv2\",\n \"text\": \"Hello from Rime!\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://users.rime.ai/v1/rime-tts")
.header("Accept", "application/json")
.header("Authorization", "Bearer <authorization>")
.header("Content-Type", "application/json")
.body("{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\": \"mistv2\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
.asString();
Non-Streaming
MP3 over JSON
Mist v2 non-streaming endpoint that returns base64 MP3 audio inside a JSON envelope.
curl --request POST \
--url https://users.rime.ai/v1/rime-tts \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--output output.json \
--fail \
--data '{
"text": "Hello from Rime!",
"modelId": "mistv2",
"speaker": "astra",
"lang": "eng",
"audioFormat": "mp3",
"inlineSpeedAlpha": "0.5, 3",
"noTextNormalization": false,
"pauseBetweenBrackets": false,
"phonemizeBetweenBrackets": false,
"samplingRate": 22050,
"speedAlpha": 1.0
}'
import requests
url = "https://users.rime.ai/v1/rime-tts"
payload = {
"speaker": "astra",
"text": "Hello from Rime!",
"modelId": "mistv2",
"lang": "eng",
"audioFormat": "mp3",
"samplingRate": 22050,
"speedAlpha": 1.0,
"noTextNormalization": False
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer <authorization>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer <authorization>',
'Content-Type': 'application/json'
},
body: '{"speaker":"astra","text":"Hello from Rime!", "modelId": "mistv2", "lang": "eng", "audioFormat": "mp3", "samplingRate":22050,"speedAlpha":1.0,"noTextNormalization":false}'
};
fetch('https://users.rime.ai/v1/rime-tts', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://users.rime.ai/v1/rime-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 => "{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\":\"mistv2\",\n \"lang\":\"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}",
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Authorization: Bearer <authorization>",
"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/ioutil"
)
func main() {
url := "https://users.rime.ai/v1/rime-tts"
payload := strings.NewReader("{\n \"speaker\": \"astra\",\n \"modelId\": \"mistv2\",\n \"text\": \"Hello from Rime!\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://users.rime.ai/v1/rime-tts")
.header("Accept", "application/json")
.header("Authorization", "Bearer <authorization>")
.header("Content-Type", "application/json")
.body("{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\": \"mistv2\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
.asString();
The Rime API authenticates every request with a bearer token in the
Authorization header: Authorization: Bearer YOUR_API_KEY. See API authentication for how to create a key.
The API returns a single JSON object, {"audioContent": "..."}, whose audioContent field holds base64-encoded MP3 audio. Decode it before you save or play it. Only Mist v1 and Mist v2 return this envelope, and only when Accept doesn’t name a streamable audio type, which is why the examples send application/json. The response arrives after synthesis finishes, so use streaming HTTP if you want playback to start sooner.
Fixed parameters
mp3
required
Variable parameters
string
required
Must be a voice from the Rime voice catalog.
string
required
The text you’d like spoken. Character limit per request is 1,000 via the API and in the dashboard UI.
string
Set to
mistv2.string
default:"eng"
If provided, the language must match the language spoken by the selected speaker. Verify the pairing in the Rime voice catalog.
bool
default:"false"
When set to true, adds pauses between words enclosed in angle brackets. The number inside the brackets specifies the pause duration in milliseconds.
Example: “Hi. <200> I’d love to have a conversation with you.” adds a 200ms pause between the first and second sentences.
Example: “Hi. <200> I’d love to have a conversation with you.” adds a 200ms pause between the first and second sentences.
bool
default:"false"
When set to true, you can specify the phonemes for a word enclosed in curly brackets.
Example: “{h’El.o} World” pronounces “Hello” with the phonemes you supplied. Learn more about custom pronunciation.
Example: “{h’El.o} World” pronounces “Hello” with the phonemes you supplied. Learn more about custom pronunciation.
string
Comma-separated list of speed values applied to words in square brackets. Values < 1.0 speed up speech, > 1.0 slow it down.
Example: For text “This is [slow] and [fast]”, use “3, 0.5” to make “slow” slower and “fast” faster.
int
The value, if provided, must be between 4000 and 44100. Default: 22050
float
default:"1.0"
Adjusts the speed of speech. Lower than 1.0 is faster and higher than 1.0 is slower.Note: this is the legacy Mist v2 convention. Coda and Mist v3 invert it, so for those models higher than 1.0 is faster.
bool
default:"false"
mist/mistv2 only. Skips text normalization before synthesis. This reduces latency, but digits and abbreviations reach the model unexpanded and may be mispronounced.
curl --request POST \
--url https://users.rime.ai/v1/rime-tts \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--output output.json \
--fail \
--data '{
"text": "Hello from Rime!",
"modelId": "mistv2",
"speaker": "astra",
"lang": "eng",
"audioFormat": "mp3",
"inlineSpeedAlpha": "0.5, 3",
"noTextNormalization": false,
"pauseBetweenBrackets": false,
"phonemizeBetweenBrackets": false,
"samplingRate": 22050,
"speedAlpha": 1.0
}'
import requests
url = "https://users.rime.ai/v1/rime-tts"
payload = {
"speaker": "astra",
"text": "Hello from Rime!",
"modelId": "mistv2",
"lang": "eng",
"audioFormat": "mp3",
"samplingRate": 22050,
"speedAlpha": 1.0,
"noTextNormalization": False
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer <authorization>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer <authorization>',
'Content-Type': 'application/json'
},
body: '{"speaker":"astra","text":"Hello from Rime!", "modelId": "mistv2", "lang": "eng", "audioFormat": "mp3", "samplingRate":22050,"speedAlpha":1.0,"noTextNormalization":false}'
};
fetch('https://users.rime.ai/v1/rime-tts', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://users.rime.ai/v1/rime-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 => "{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\":\"mistv2\",\n \"lang\":\"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}",
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Authorization: Bearer <authorization>",
"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/ioutil"
)
func main() {
url := "https://users.rime.ai/v1/rime-tts"
payload := strings.NewReader("{\n \"speaker\": \"astra\",\n \"modelId\": \"mistv2\",\n \"text\": \"Hello from Rime!\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://users.rime.ai/v1/rime-tts")
.header("Accept", "application/json")
.header("Authorization", "Bearer <authorization>")
.header("Content-Type", "application/json")
.body("{\n \"speaker\": \"astra\",\n \"text\": \"Hello from Rime!\",\n \"modelId\": \"mistv2\",\n \"lang\": \"eng\",\n \"audioFormat\": \"mp3\",\n \"samplingRate\": 22050,\n \"speedAlpha\": 1.0,\n \"noTextNormalization\": false\n}")
.asString();

