Create Speech
Generates audio from the input text
modelstring
TTS model ID
inputstring
Text to generate audio for. Max 4096 characters.
Length
length <= 4096voicestring
Voice to use. Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse
response_format?string
Audio output format
Default
"mp3"Value in
"mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"speed?number
Speed of generated audio (0.25 to 4.0)
Default
1Range
0.25 <= value <= 4instructions?string
Natural language instructions for voice tone/emotion. Only supported by gpt-4o-mini-tts.
Response Body
curl -X POST "https://api.osmapi.com/v1/audio/speech" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1", "input": "string", "voice": "alloy" }'Empty
How is this guide?