Create Speech
curl --request POST \
--url https://api.eesi.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "audio",
"instructions": "<string>",
"language": "<string>",
"normalize_text": false
}
'import requests
url = "https://api.eesi.ai/v1/audio/speech"
payload = {
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "audio",
"instructions": "<string>",
"language": "<string>",
"normalize_text": False
}
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: '<string>',
input: '<string>',
voice: '<string>',
response_format: 'mp3',
speed: 1,
stream_format: 'audio',
instructions: '<string>',
language: '<string>',
normalize_text: false
})
};
fetch('https://api.eesi.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://api.eesi.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([
'model' => '<string>',
'input' => '<string>',
'voice' => '<string>',
'response_format' => 'mp3',
'speed' => 1,
'stream_format' => 'audio',
'instructions' => '<string>',
'language' => '<string>',
'normalize_text' => false
]),
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.eesi.ai/v1/audio/speech"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\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.eesi.ai/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eesi.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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Speech
Create speech
Generate speech from text (OpenAI-compatible)
POST
/
v1
/
audio
/
speech
Create Speech
curl --request POST \
--url https://api.eesi.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "audio",
"instructions": "<string>",
"language": "<string>",
"normalize_text": false
}
'import requests
url = "https://api.eesi.ai/v1/audio/speech"
payload = {
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "audio",
"instructions": "<string>",
"language": "<string>",
"normalize_text": False
}
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: '<string>',
input: '<string>',
voice: '<string>',
response_format: 'mp3',
speed: 1,
stream_format: 'audio',
instructions: '<string>',
language: '<string>',
normalize_text: false
})
};
fetch('https://api.eesi.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://api.eesi.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([
'model' => '<string>',
'input' => '<string>',
'voice' => '<string>',
'response_format' => 'mp3',
'speed' => 1,
'stream_format' => 'audio',
'instructions' => '<string>',
'language' => '<string>',
'normalize_text' => false
]),
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.eesi.ai/v1/audio/speech"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\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.eesi.ai/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eesi.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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"mp3\",\n \"speed\": 1,\n \"stream_format\": \"audio\",\n \"instructions\": \"<string>\",\n \"language\": \"<string>\",\n \"normalize_text\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Returns audio bytes in the requested
response_format (Content-Type set
accordingly), or Server-Sent speech.audio.delta events when
stream_format="sse". voice accepts a model preset, an OpenAI voice name
(mapped to the model default), or a cloned ev_* id on cloning-capable models.Authorizations
BearerAuthApiKeyHeader
An EESI API key (sk-eesi-...) or a Clerk session token.
Body
application/json
Required string length:
1 - 4096Available options:
mp3, opus, aac, flac, wav, pcm Required range:
0.25 <= x <= 4Available options:
audio, sse Response
Successful Response
โI