Skip to main content
POST
/
v1
/
audio
/
speech
gpt-4o-mini-tts (text to audio)
curl --request POST \
  --url https://api.example.com/v1/audio/speech
OpenAI’s official format for the text to audio API.
curl -X POST "https://gptproto.com/v1/audio/speech" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-4o-mini-tts",
  "input": "The quick brown fox jumped over the lazy dog.",
  "voice": "alloy"
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yesgpt-4o-mini-ttsThe model to use for the request
inputstring✅ YesThe quick brown fox jumped over the lazy dog.Input parameter
voicestring❌ NoalloyVoice parameter