Create speech gpt-4o-mini-tts
Official documentation: https://platform.openai.com/docs/guides/text-to-speech
POST
/v1/audio/speechBody Parametersapplication/json
input* string
The text to generate audio from. The maximum length is 4096 characters.
model* string
One of the available TTS models: tts-1 or tts-1-hd
response_format string
The default is mp3 audio format. Supported formats are: mp3, opus, aac and flac.
speed number
Defaults to 1. Generated audio speed. Choose a value between 0.25 and 4.0. 1.0 is the default value.
voice* string
The voice to use when generating audio. Supported voices are: alloy, echo, fable, onyx, nova and shimmer.
Responses
200 OK application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties error* object
401 Missing or invalid API Key application/json
response-401 object
1{
2"input": "The quick brown fox jumped over the lazy dog.",
3"model": "gpt-4o-mini-tts",
4"voice": "alloy"
5}
1curl -X POST "https://api.digislash.com/v1/audio/speech" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"input": "The quick brown fox jumped over the lazy dog.",
6"model": "gpt-4o-mini-tts",
7"voice": "alloy"
8}'
1▼{
2"id": "resp_example",
3"object": "response",
4"status": "completed"
5}
