Gpt 4o Mini Tts
GPT-4o mini TTS is a text-to-speech model built on GPT-4o mini, a fast and powerful language model. Use it to convert text to natural sounding spoken text.
Header parameters
AuthorizationstringRequiredExample:
sk-qNXaCLFLuF6KxswYB31dF9Fb5c6c4d929dE30957A6Fa0047Body
modelstringRequiredExample:
model is the model name
gpt-4o-mini-ttsinputstring · max: 4096RequiredExample:
The text to generate audio for.
A cute baby sea otter.voicestring · enumRequiredExample:
The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse.
alloyPossible values: instructionsstringOptional
Control the voice of your generated audio with additional instructions.
response_formatstring · enumOptionalDefault:
The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.
mp3Example: mp3Possible values: speednumber · min: 0.25 · max: 4OptionalDefault:
The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.
1Example: 1stream_formatstring · enumOptionalDefault:
The format to stream the audio in. Supported formats are sse and audio.
audioExample: audioPossible values: Responses
200
The audio file content.
application/octet-stream
Responseobject
post
/audio/speechPOST /v1/audio/speech HTTP/1.1
Host: audio.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 167
{
"model": "gpt-4o-mini-tts",
"input": "A cute baby sea otter.",
"voice": "alloy",
"instructions": "esse incididunt",
"response_format": "mp3",
"speed": 1,
"stream_format": "audio"
}200
The audio file content.
{}Last updated