Skip to main content
POST
/
audio
/
speech
Text to Speech
curl --request POST \
  --url https://api.euron.one/api/v1/euri/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "voice": "<string>",
  "target_language_code": "<string>",
  "speech_sample_rate": 123,
  "pace": 123
}
'
import requests

url = "https://api.euron.one/api/v1/euri/audio/speech"

payload = {
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"target_language_code": "<string>",
"speech_sample_rate": 123,
"pace": 123
}
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>',
target_language_code: '<string>',
speech_sample_rate: 123,
pace: 123
})
};

fetch('https://api.euron.one/api/v1/euri/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.euron.one/api/v1/euri/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>',
'target_language_code' => '<string>',
'speech_sample_rate' => 123,
'pace' => 123
]),
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.euron.one/api/v1/euri/audio/speech"

payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"target_language_code\": \"<string>\",\n \"speech_sample_rate\": 123,\n \"pace\": 123\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.euron.one/api/v1/euri/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"target_language_code\": \"<string>\",\n \"speech_sample_rate\": 123,\n \"pace\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.euron.one/api/v1/euri/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 \"target_language_code\": \"<string>\",\n \"speech_sample_rate\": 123,\n \"pace\": 123\n}"

response = http.request(request)
puts response.read_body

Request

POST https://api.euron.one/api/v1/euri/audio/speech

Body parameters

model
string
required
TTS model ID. Options: canopylabs/orpheus-v1-english, canopylabs/orpheus-arabic-saudi, playai-tts, playai-tts-arabic, sarvam-tts.
input
string
required
The text to synthesize into speech.
voice
string
Voice ID or name. Available voices depend on the model.
target_language_code
string
Language code for Sarvam models (e.g. "hi-IN", "en-IN").
speech_sample_rate
integer
Audio sample rate in Hz (Sarvam models).
pace
number
Speech pace/speed (Sarvam models).

Examples

curl -X POST https://api.euron.one/api/v1/euri/audio/speech \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_EURI_API_KEY" \
  -d '{
    "model": "canopylabs/orpheus-v1-english",
    "input": "Hello! Welcome to EURI, the AI API gateway by Euron.",
    "voice": "tara"
  }' \
  --output speech.wav
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EURI_API_KEY",
    base_url="https://api.euron.one/api/v1/euri"
)

response = client.audio.speech.create(
    model="canopylabs/orpheus-v1-english",
    input="Hello! Welcome to EURI, the AI API gateway by Euron.",
    voice="tara"
)

response.stream_to_file("speech.wav")
curl -X POST https://api.euron.one/api/v1/euri/audio/speech \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_EURI_API_KEY" \
  -d '{
    "model": "sarvam-tts",
    "input": "नमस्ते, EURI में आपका स्वागत है।",
    "target_language_code": "hi-IN"
  }' \
  --output speech_hindi.wav

Response

Returns binary audio data (audio/wav). Save the response body directly to a file.

Pricing

ModelPrice per million characters
canopylabs/orpheus-v1-english$22.00
canopylabs/orpheus-arabic-saudi$40.00
playai-tts$22.00
playai-tts-arabic$40.00
sarvam-tts$33.00 (premium)