POST
Generate Speech
Generate speech from text using a voice profile. POST /api/voice/generate 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

X-API-Key
string
header
required

Organization API key (bibha_...). Takes precedence over the session credential, and is refused outright on user-session-only and super-admin routes.

Body

application/json

Request model for voice generation.

profile_id
string
required
text
string
required
Required string length: 1 - 50000
language
string
default:en
Pattern: ^(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)$
seed
integer | null
Required range: x >= 0
model_size
string | null
default:1.7B
Pattern: ^(1\.7B|0\.6B|1B|3B)$
instruct
string | null
Maximum string length: 500
engine
string | null
default:vaani
Pattern: ^(vaani|vaani-english|vaani-multilingual|vaani-indic|vaani-bharat)$
personality
boolean
default:false

When true and the profile has a personality prompt, the input text is rewritten in-character before TTS.

max_chunk_chars
integer
default:800

Max characters per chunk for long text splitting

Required range: 100 <= x <= 5000
crossfade_ms
integer
default:50

Crossfade duration in ms between chunks (0 for hard cut)

Required range: 0 <= x <= 500
normalize
boolean
default:true

Normalize output audio volume

effects_chain
EffectConfig ┬╖ object[] | null

Effects chain to apply after generation (overrides profile default)

audio_params
AudioParams ┬╖ object | null

Native fine-tune knobs (stability/similarity/style) forwarded to the model

Response

Successful Response

Response model for voice generation.

id
string
required
profile_id
string
required
text
string
required
language
string
required
created_at
string<date-time>
required
audio_path
string | null
duration
number | null
seed
integer | null
instruct
string | null
engine
string | null
default:vaani
model_size
string | null
status
string
default:completed
error
string | null
is_favorited
boolean
default:false
source
string
default:manual
versions
GenerationVersionResponse ┬╖ object[] | null
active_version_id
string | null
usage
UsageInfo ┬╖ object | null

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.