curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice/speak \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "<string>",
"profile": "<string>",
"engine": "<string>",
"personality": true,
"language": "<string>"
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice/speak"
payload = {
"text": "<string>",
"profile": "<string>",
"engine": "<string>",
"personality": True,
"language": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
profile: '<string>',
engine: '<string>',
personality: true,
language: '<string>'
})
};
fetch('https://api.peachdeskai.com/api/v1/voice/speak', 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.peachdeskai.com/api/v1/voice/speak",
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' => '<string>',
'profile' => '<string>',
'engine' => '<string>',
'personality' => true,
'language' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.peachdeskai.com/api/v1/voice/speak"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.peachdeskai.com/api/v1/voice/speak")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice/speak")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"text": "<string>",
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"audio_path": "<string>",
"duration": 123,
"seed": 123,
"instruct": "<string>",
"engine": "vaani",
"model_size": "<string>",
"status": "completed",
"error": "<string>",
"is_favorited": false,
"source": "manual",
"versions": [
{
"id": "<string>",
"generation_id": "<string>",
"label": "<string>",
"audio_path": "<string>",
"is_default": true,
"created_at": "2023-11-07T05:31:56Z",
"effects_chain": [
{
"type": "<string>",
"enabled": true,
"params": {}
}
],
"source_version_id": "<string>"
}
],
"active_version_id": "<string>",
"usage": {
"engine": "<string>",
"model": "<string>",
"tts_characters": 123,
"stt_audio_seconds": 123,
"llm_tokens_input": 123,
"llm_tokens_output": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Speak
Speak text in a voice profile.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice/speak \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "<string>",
"profile": "<string>",
"engine": "<string>",
"personality": true,
"language": "<string>"
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice/speak"
payload = {
"text": "<string>",
"profile": "<string>",
"engine": "<string>",
"personality": True,
"language": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
profile: '<string>',
engine: '<string>',
personality: true,
language: '<string>'
})
};
fetch('https://api.peachdeskai.com/api/v1/voice/speak', 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.peachdeskai.com/api/v1/voice/speak",
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' => '<string>',
'profile' => '<string>',
'engine' => '<string>',
'personality' => true,
'language' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.peachdeskai.com/api/v1/voice/speak"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.peachdeskai.com/api/v1/voice/speak")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice/speak")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"profile\": \"<string>\",\n \"engine\": \"<string>\",\n \"personality\": true,\n \"language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"text": "<string>",
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"audio_path": "<string>",
"duration": 123,
"seed": 123,
"instruct": "<string>",
"engine": "vaani",
"model_size": "<string>",
"status": "completed",
"error": "<string>",
"is_favorited": false,
"source": "manual",
"versions": [
{
"id": "<string>",
"generation_id": "<string>",
"label": "<string>",
"audio_path": "<string>",
"is_default": true,
"created_at": "2023-11-07T05:31:56Z",
"effects_chain": [
{
"type": "<string>",
"enabled": true,
"params": {}
}
],
"source_version_id": "<string>"
}
],
"active_version_id": "<string>",
"usage": {
"engine": "<string>",
"model": "<string>",
"tts_characters": 123,
"stt_audio_seconds": 123,
"llm_tokens_input": 123,
"llm_tokens_output": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}GenerationResponse with
status="generating" and an id the caller polls at
GET /generate/{id}/status.
POST /api/voice/speak
All requests authenticate with your PeachDesk API key in the X-API-Key header (an interactive session token in Authorization: Bearer also works тАФ see Authentication). Use the playground to send a live request and inspect the response.Authorizations
Organization API key (bibha_...). Takes precedence over the session credential, and is refused outright on user-session-only and super-admin routes.
Body
Body for POST /speak тАФ non-MCP REST surface that mirrors peachdesk.speak (legacy alias: voicebox.speak).
1 - 10000Voice profile name or id. Falls back to per-client binding, then default.
^(vaani|vaani-english|vaani-multilingual|vaani-indic|vaani-bharat)$When true and the profile has a personality prompt, the input text is rewritten in-character before TTS. When null, the per-client binding's default_personality flag decides.
^(zh|en|ja|ko|de|fr|ru|pt|es|it|he|ar|da|el|fi|hi|ms|nl|no|pl|sv|sw|tr|bg|ca|cs|cy|eu|fa|hu|id|is|ka|kk|ku|lb|lv|ml|ne|ro|sk|sl|sq|sr|te|uk|ur|vi|ta|kn|bn|gu|mr|pa|or|as|sa|kok|mai|mni|brx|doi|sat|sd|hne)$Response
Successful Response
Response model for voice generation.
Show child attributes
Show child attributes
Per-request resource usage the engine reports back to the API proxy.
The proxy meters/bills off these fields; each one maps to a rate-registry
unit (TTS per character, STT per audio-second, LLM per token). Only the
dimensions relevant to the request are populated тАФ the rest stay None.
Show child attributes
Show child attributes

