- API Reference
- endpoint
- audio
Audio Speech
Audio Speech
API for speech generation.
POST /v1/audio/speech
Speech
Speech
Request Example
{
"input": "ipsum eiusmod"
}
Request Body
AdditionalProperties
map<any>conversation_history
array<SpeechUserTurn | SpeechAssistantTurn> | nullPrior turns, oldest first, alternating and ending on a user turn: input is the assistant reply to it. Conditions delivery, not speaker: set voice_id to choose the speaker. Requires voice_id to be a preset voice whose kind is pvc. Cannot be combined with ref_audio.
expressiveness
number | nullSpeaker flow-matching classifier-free guidance scale. Must be finite and at least 1.0.
input
string* requiredText to generate a speech from
metadata
map<any> | nullmodel
string | nullphoneme_hints
map<array<"a" | "aɪ" | "aʊ" | "b" | "d" | "dʒ" | "e" | "eɪ" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "oʊ" | "p" | "s" | "t" | "tʃ" | "u" | "v" | "w" | "z" | "æ" | "ð" | "ŋ" | "ɑ" | "ɔ" | "ɔɪ" | "ɖ" | "ə" | "ɚ" | "ɛ" | "ɜ" | "ɪ" | "ɱ" | "ɹ" | "ɾ" | "ʃ" | "ʈ" | "ʊ" | "ʋ" | "ʌ" | "ʒ" | "ʔ" | "θ" | "ʁ" | "r" | "ɑ̃" | "ʀ" | "x" | "y" | "ɔ̃" | "ɐ" | "œ" | "ɛ̃" | "ʝ" | "ɲ" | "ts" | "ɥ" | "ʏ" | "ø" | "β" | "ɦ" | "pf" | "ʎ" | "ɣ" | "ɳ" | "ɔʏ" | "œ̃" | "ɟʝ" | "ɬ" | "q">> | nullOptional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones.
prompt_cache_key
string | nullref_audio
string | nullThe audio reference for generating the speech.
response_format
"pcm" | "wav" | "mp3" | "flac" | "opus"stream
booleanDefault Value: false
voice_id
string | nullThe preset or custom voice to use for generating the speech.
Responses
Speech audio data.
audio_data
string* requiredBase64 encoded audio data