Gpt 4o Mini Tts

gpt-4o-mini-tts

post

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-qNXaCLFLuF6KxswYB31dF9Fb5c6c4d929dE30957A6Fa0047
Body
modelstringRequired

model is the model name

Example: gpt-4o-mini-tts
inputstring · max: 4096Required

The text to generate audio for.

Example: A cute baby sea otter.
voicestring · enumRequired

The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse.

Example: alloyPossible values:
instructionsstringOptional

Control the voice of your generated audio with additional instructions.

response_formatstring · enumOptional

The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.

Default: mp3Example: mp3Possible values:
speednumber · min: 0.25 · max: 4Optional

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.

Default: 1Example: 1
stream_formatstring · enumOptional

The format to stream the audio in. Supported formats are sse and audio.

Default: audioExample: audioPossible values:
Responses
200

The audio file content.

application/octet-stream
Responseobject
post
/audio/speech
POST /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