curl --request POST \
--url https://tts.eu.mihu.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.",
"model": "mihu-ses-v1",
"language": "tr",
"voice": "alp",
"response_format": "wav",
"speed": 1,
"stream_format": "audio",
"normalize": true,
"verify": false,
"instructions": "<string>"
}
'import requests
url = "https://tts.eu.mihu.ai/v1/audio/speech"
payload = {
"input": "Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.",
"model": "mihu-ses-v1",
"language": "tr",
"voice": "alp",
"response_format": "wav",
"speed": 1,
"stream_format": "audio",
"normalize": True,
"verify": False,
"instructions": "<string>"
}
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({
input: 'Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.',
model: 'mihu-ses-v1',
language: 'tr',
voice: 'alp',
response_format: 'wav',
speed: 1,
stream_format: 'audio',
normalize: true,
verify: false,
instructions: '<string>'
})
};
fetch('https://tts.eu.mihu.ai/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://tts.eu.mihu.ai/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_POSTFIELDS => json_encode([
'input' => 'Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.',
'model' => 'mihu-ses-v1',
'language' => 'tr',
'voice' => 'alp',
'response_format' => 'wav',
'speed' => 1,
'stream_format' => 'audio',
'normalize' => true,
'verify' => false,
'instructions' => '<string>'
]),
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://tts.eu.mihu.ai/v1/audio/speech"
payload := strings.NewReader("{\n \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\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://tts.eu.mihu.ai/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tts.eu.mihu.ai/v1/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 \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"Create speech
Text to audio, streamed while it is generated. Native or OpenAI-compatible by model.
curl --request POST \
--url https://tts.eu.mihu.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.",
"model": "mihu-ses-v1",
"language": "tr",
"voice": "alp",
"response_format": "wav",
"speed": 1,
"stream_format": "audio",
"normalize": true,
"verify": false,
"instructions": "<string>"
}
'import requests
url = "https://tts.eu.mihu.ai/v1/audio/speech"
payload = {
"input": "Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.",
"model": "mihu-ses-v1",
"language": "tr",
"voice": "alp",
"response_format": "wav",
"speed": 1,
"stream_format": "audio",
"normalize": True,
"verify": False,
"instructions": "<string>"
}
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({
input: 'Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.',
model: 'mihu-ses-v1',
language: 'tr',
voice: 'alp',
response_format: 'wav',
speed: 1,
stream_format: 'audio',
normalize: true,
verify: false,
instructions: '<string>'
})
};
fetch('https://tts.eu.mihu.ai/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://tts.eu.mihu.ai/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_POSTFIELDS => json_encode([
'input' => 'Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.',
'model' => 'mihu-ses-v1',
'language' => 'tr',
'voice' => 'alp',
'response_format' => 'wav',
'speed' => 1,
'stream_format' => 'audio',
'normalize' => true,
'verify' => false,
'instructions' => '<string>'
]),
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://tts.eu.mihu.ai/v1/audio/speech"
payload := strings.NewReader("{\n \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\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://tts.eu.mihu.ai/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tts.eu.mihu.ai/v1/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 \"input\": \"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek.\",\n \"model\": \"mihu-ses-v1\",\n \"language\": \"tr\",\n \"voice\": \"alp\",\n \"response_format\": \"wav\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"normalize\": true,\n \"verify\": false,\n \"instructions\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Your API key
Body
The text. Long texts are split into chunks and streamed (up to 20,000 characters).
"Siparişiniz 28 Ekim günü saat 14.30da teslim edilecek."
mihu-ses-v1 (native), or an OpenAI name: tts-1, tts-1-hd, gpt-4o-mini-tts.
tr, en, de, fr, es, it, ru, or auto (detect from the text). Without it: from the voice, else Turkish (native) or detected (OpenAI).
"tr"
pcm is raw 16-bit little-endian 24 kHz mono. Default pcm (native), mp3 (OpenAI).
pcm, wav, mp3, opus, aac, flac "wav"
0.25 to 4.0: tempo, pitch unchanged.
audio: the audio bytes. sse: Server-Sent Events.
audio, sse Numbers, amounts, dates, times and abbreviations written out before synthesis.
Turkish: a recognizer checks each chunk; first audio comes about 2 s later. Not for live calls.
Accepted and ignored (OpenAI style prompt).
Response
The audio, streamed. Headers: X-Sample-Rate, X-Language, X-Voice, X-Model.
The response is of type file.