Text to Speech
curl --request POST \
--url https://api.pawa-ai.com/v1/voice/text-to-speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Hello, how are you?",
"model": "pawa-tts-v1-20250704",
"voice": "ame",
"max_tokens": 65536,
"temperature": 0.5,
"top_p": 0.95,
"repetition_penalty": 1.1
}
'import requests
url = "https://api.pawa-ai.com/v1/voice/text-to-speech"
payload = {
"text": "Hello, how are you?",
"model": "pawa-tts-v1-20250704",
"voice": "ame",
"max_tokens": 65536,
"temperature": 0.5,
"top_p": 0.95,
"repetition_penalty": 1.1
}
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({
text: 'Hello, how are you?',
model: 'pawa-tts-v1-20250704',
voice: 'ame',
max_tokens: 65536,
temperature: 0.5,
top_p: 0.95,
repetition_penalty: 1.1
})
};
fetch('https://api.pawa-ai.com/v1/voice/text-to-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.pawa-ai.com/v1/voice/text-to-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([
'text' => 'Hello, how are you?',
'model' => 'pawa-tts-v1-20250704',
'voice' => 'ame',
'max_tokens' => 65536,
'temperature' => 0.5,
'top_p' => 0.95,
'repetition_penalty' => 1.1
]),
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.pawa-ai.com/v1/voice/text-to-speech"
payload := strings.NewReader("{\n \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\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.pawa-ai.com/v1/voice/text-to-speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pawa-ai.com/v1/voice/text-to-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 \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\n}"
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "Invalid input provided"
}{
"success": false,
"message": "Unauthorized access"
}{
"success": false,
"message": "You do not have permission to access this resource"
}{
"success": false,
"message": "Resource does not exist"
}{
"success": false,
"message": "Rate limit exceeded. Please try again later."
}{
"success": false,
"message": "Internal server error"
}Voice
Convert Text to speech
This endpoint converts text into streaming audio. It does streaming automatically so consider sending request as events streams, Server-Sent Events (SSE) or any other streaming method.
POST
/
voice
/
text-to-speech
Text to Speech
curl --request POST \
--url https://api.pawa-ai.com/v1/voice/text-to-speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Hello, how are you?",
"model": "pawa-tts-v1-20250704",
"voice": "ame",
"max_tokens": 65536,
"temperature": 0.5,
"top_p": 0.95,
"repetition_penalty": 1.1
}
'import requests
url = "https://api.pawa-ai.com/v1/voice/text-to-speech"
payload = {
"text": "Hello, how are you?",
"model": "pawa-tts-v1-20250704",
"voice": "ame",
"max_tokens": 65536,
"temperature": 0.5,
"top_p": 0.95,
"repetition_penalty": 1.1
}
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({
text: 'Hello, how are you?',
model: 'pawa-tts-v1-20250704',
voice: 'ame',
max_tokens: 65536,
temperature: 0.5,
top_p: 0.95,
repetition_penalty: 1.1
})
};
fetch('https://api.pawa-ai.com/v1/voice/text-to-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.pawa-ai.com/v1/voice/text-to-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([
'text' => 'Hello, how are you?',
'model' => 'pawa-tts-v1-20250704',
'voice' => 'ame',
'max_tokens' => 65536,
'temperature' => 0.5,
'top_p' => 0.95,
'repetition_penalty' => 1.1
]),
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.pawa-ai.com/v1/voice/text-to-speech"
payload := strings.NewReader("{\n \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\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.pawa-ai.com/v1/voice/text-to-speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pawa-ai.com/v1/voice/text-to-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 \"text\": \"Hello, how are you?\",\n \"model\": \"pawa-tts-v1-20250704\",\n \"voice\": \"ame\",\n \"max_tokens\": 65536,\n \"temperature\": 0.5,\n \"top_p\": 0.95,\n \"repetition_penalty\": 1.1\n}"
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "Invalid input provided"
}{
"success": false,
"message": "Unauthorized access"
}{
"success": false,
"message": "You do not have permission to access this resource"
}{
"success": false,
"message": "Resource does not exist"
}{
"success": false,
"message": "Rate limit exceeded. Please try again later."
}{
"success": false,
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The text to be converted to speech
Example:
"Hello, how are you?"
The model to use for TTS
Available options:
pawa-tts-v1-20250704 Example:
"pawa-tts-v1-20250704"
The voice to use for text-to-speech
Available options:
ame, liora, ayana Maximum number of tokens to generate
Sampling temperature
Required range:
-2 <= x <= 2Top-p nucleus sampling
Required range:
0 <= x <= 1Repetition penalty
Response
Audio streamed successfully
The response is of type file.
⌘I