latestSwagger 2.02026-08-19218237253.7 KB

3af866d68651

Audio

Convert text to speech using a named built-in preset voice, with optional emotion and language settings. Both text and voice_preset_id are required and the text is limited to 1000 characters; invalid input returns HTTP 400. Synchronous: the call blocks until generation finishes and returns a single audio result containing a URL; there is no separate polling step. Credits are charged on success. Use this when you want a ready-made catalog voice and do not need to supply your own sample; use createSpeech to clone a voice from an audio sample instead, and createVoice to design a new voice from a text description. Pass an optional request_id to tag the result so you can locate it later via getAudioResults. Requires an API key (user scope).

post/audio/speech-preset

Request body

textstring required

Text to convert to speech (max 100 words).

voice_preset_idstring required

Voice preset identifier.

emotionstring

Emotion to apply to the speech.

languagestring

Language code for the speech.

request_idstring

Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.

Response

Success

urlstring

URL to the generated audio file

typestring
durationnumber float
request_idstring
created_atinteger