curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice/generate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile_id": "<string>",
"text": "<string>",
"language": "en",
"seed": 1,
"model_size": "1.7B",
"instruct": "<string>",
"engine": "vaani",
"personality": false,
"max_chunk_chars": 800,
"crossfade_ms": 50,
"normalize": true,
"effects_chain": [
{
"type": "<string>",
"enabled": true,
"params": {}
}
],
"audio_params": {
"stability": 0.5,
"similarity": 0.5,
"style": 0.5,
"exaggeration": 1.125,
"cfg_weight": 0.5,
"temperature": 2.525,
"ref_vad_trim": true,
"repetition_penalty": 1.5,
"top_p": 0.5,
"top_k": 1,
"min_p": 0.5,
"normalize_loudness": true,
"speed": 1.25,
"pitch": 0,
"volume_db": 0,
"sample_rate": 123,
"output_format": "<string>"
}
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice/generate"
payload = {
"profile_id": "<string>",
"text": "<string>",
"language": "en",
"seed": 1,
"model_size": "1.7B",
"instruct": "<string>",
"engine": "vaani",
"personality": False,
"max_chunk_chars": 800,
"crossfade_ms": 50,
"normalize": True,
"effects_chain": [
{
"type": "<string>",
"enabled": True,
"params": {}
}
],
"audio_params": {
"stability": 0.5,
"similarity": 0.5,
"style": 0.5,
"exaggeration": 1.125,
"cfg_weight": 0.5,
"temperature": 2.525,
"ref_vad_trim": True,
"repetition_penalty": 1.5,
"top_p": 0.5,
"top_k": 1,
"min_p": 0.5,
"normalize_loudness": True,
"speed": 1.25,
"pitch": 0,
"volume_db": 0,
"sample_rate": 123,
"output_format": "<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({
profile_id: '<string>',
text: '<string>',
language: 'en',
seed: 1,
model_size: '1.7B',
instruct: '<string>',
engine: 'vaani',
personality: false,
max_chunk_chars: 800,
crossfade_ms: 50,
normalize: true,
effects_chain: [{type: '<string>', enabled: true, params: {}}],
audio_params: {
stability: 0.5,
similarity: 0.5,
style: 0.5,
exaggeration: 1.125,
cfg_weight: 0.5,
temperature: 2.525,
ref_vad_trim: true,
repetition_penalty: 1.5,
top_p: 0.5,
top_k: 1,
min_p: 0.5,
normalize_loudness: true,
speed: 1.25,
pitch: 0,
volume_db: 0,
sample_rate: 123,
output_format: '<string>'
}
})
};
fetch('https://api.peachdeskai.com/api/v1/voice/generate', 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/generate",
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([
'profile_id' => '<string>',
'text' => '<string>',
'language' => 'en',
'seed' => 1,
'model_size' => '1.7B',
'instruct' => '<string>',
'engine' => 'vaani',
'personality' => false,
'max_chunk_chars' => 800,
'crossfade_ms' => 50,
'normalize' => true,
'effects_chain' => [
[
'type' => '<string>',
'enabled' => true,
'params' => [
]
]
],
'audio_params' => [
'stability' => 0.5,
'similarity' => 0.5,
'style' => 0.5,
'exaggeration' => 1.125,
'cfg_weight' => 0.5,
'temperature' => 2.525,
'ref_vad_trim' => true,
'repetition_penalty' => 1.5,
'top_p' => 0.5,
'top_k' => 1,
'min_p' => 0.5,
'normalize_loudness' => true,
'speed' => 1.25,
'pitch' => 0,
'volume_db' => 0,
'sample_rate' => 123,
'output_format' => '<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/generate"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\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/generate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice/generate")
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 \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\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": {}
}
]
}Generate Speech
Generate speech from text using a voice profile.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice/generate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile_id": "<string>",
"text": "<string>",
"language": "en",
"seed": 1,
"model_size": "1.7B",
"instruct": "<string>",
"engine": "vaani",
"personality": false,
"max_chunk_chars": 800,
"crossfade_ms": 50,
"normalize": true,
"effects_chain": [
{
"type": "<string>",
"enabled": true,
"params": {}
}
],
"audio_params": {
"stability": 0.5,
"similarity": 0.5,
"style": 0.5,
"exaggeration": 1.125,
"cfg_weight": 0.5,
"temperature": 2.525,
"ref_vad_trim": true,
"repetition_penalty": 1.5,
"top_p": 0.5,
"top_k": 1,
"min_p": 0.5,
"normalize_loudness": true,
"speed": 1.25,
"pitch": 0,
"volume_db": 0,
"sample_rate": 123,
"output_format": "<string>"
}
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice/generate"
payload = {
"profile_id": "<string>",
"text": "<string>",
"language": "en",
"seed": 1,
"model_size": "1.7B",
"instruct": "<string>",
"engine": "vaani",
"personality": False,
"max_chunk_chars": 800,
"crossfade_ms": 50,
"normalize": True,
"effects_chain": [
{
"type": "<string>",
"enabled": True,
"params": {}
}
],
"audio_params": {
"stability": 0.5,
"similarity": 0.5,
"style": 0.5,
"exaggeration": 1.125,
"cfg_weight": 0.5,
"temperature": 2.525,
"ref_vad_trim": True,
"repetition_penalty": 1.5,
"top_p": 0.5,
"top_k": 1,
"min_p": 0.5,
"normalize_loudness": True,
"speed": 1.25,
"pitch": 0,
"volume_db": 0,
"sample_rate": 123,
"output_format": "<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({
profile_id: '<string>',
text: '<string>',
language: 'en',
seed: 1,
model_size: '1.7B',
instruct: '<string>',
engine: 'vaani',
personality: false,
max_chunk_chars: 800,
crossfade_ms: 50,
normalize: true,
effects_chain: [{type: '<string>', enabled: true, params: {}}],
audio_params: {
stability: 0.5,
similarity: 0.5,
style: 0.5,
exaggeration: 1.125,
cfg_weight: 0.5,
temperature: 2.525,
ref_vad_trim: true,
repetition_penalty: 1.5,
top_p: 0.5,
top_k: 1,
min_p: 0.5,
normalize_loudness: true,
speed: 1.25,
pitch: 0,
volume_db: 0,
sample_rate: 123,
output_format: '<string>'
}
})
};
fetch('https://api.peachdeskai.com/api/v1/voice/generate', 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/generate",
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([
'profile_id' => '<string>',
'text' => '<string>',
'language' => 'en',
'seed' => 1,
'model_size' => '1.7B',
'instruct' => '<string>',
'engine' => 'vaani',
'personality' => false,
'max_chunk_chars' => 800,
'crossfade_ms' => 50,
'normalize' => true,
'effects_chain' => [
[
'type' => '<string>',
'enabled' => true,
'params' => [
]
]
],
'audio_params' => [
'stability' => 0.5,
'similarity' => 0.5,
'style' => 0.5,
'exaggeration' => 1.125,
'cfg_weight' => 0.5,
'temperature' => 2.525,
'ref_vad_trim' => true,
'repetition_penalty' => 1.5,
'top_p' => 0.5,
'top_k' => 1,
'min_p' => 0.5,
'normalize_loudness' => true,
'speed' => 1.25,
'pitch' => 0,
'volume_db' => 0,
'sample_rate' => 123,
'output_format' => '<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/generate"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\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/generate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice/generate")
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 \"profile_id\": \"<string>\",\n \"text\": \"<string>\",\n \"language\": \"en\",\n \"seed\": 1,\n \"model_size\": \"1.7B\",\n \"instruct\": \"<string>\",\n \"engine\": \"vaani\",\n \"personality\": false,\n \"max_chunk_chars\": 800,\n \"crossfade_ms\": 50,\n \"normalize\": true,\n \"effects_chain\": [\n {\n \"type\": \"<string>\",\n \"enabled\": true,\n \"params\": {}\n }\n ],\n \"audio_params\": {\n \"stability\": 0.5,\n \"similarity\": 0.5,\n \"style\": 0.5,\n \"exaggeration\": 1.125,\n \"cfg_weight\": 0.5,\n \"temperature\": 2.525,\n \"ref_vad_trim\": true,\n \"repetition_penalty\": 1.5,\n \"top_p\": 0.5,\n \"top_k\": 1,\n \"min_p\": 0.5,\n \"normalize_loudness\": true,\n \"speed\": 1.25,\n \"pitch\": 0,\n \"volume_db\": 0,\n \"sample_rate\": 123,\n \"output_format\": \"<string>\"\n }\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": {}
}
]
}Authorizations
Organization API key (bibha_...). Takes precedence over the session credential, and is refused outright on user-session-only and super-admin routes.
Body
Request model for voice generation.
1 - 50000^(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)$x >= 0^(1\.7B|0\.6B|1B|3B)$500^(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.
Max characters per chunk for long text splitting
100 <= x <= 5000Crossfade duration in ms between chunks (0 for hard cut)
0 <= x <= 500Normalize output audio volume
Effects chain to apply after generation (overrides profile default)
Show child attributes
Show child attributes
Native fine-tune knobs (stability/similarity/style) forwarded to the model
Show child attributes
Show child attributes
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

