POST
/
audio
/
speech
curl https://api.portkey.ai/v1/audio/speech \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "input": "The quick brown fox jumped over the lazy dog.",
    "voice": "alloy"
  }' \
  --output speech.mp3
This response does not have an example.

Authorizations

x-portkey-api-key
string
header
required
x-portkey-virtual-key
string
header
required

Body

application/json

Response

200 - application/octet-stream
OK

The response is of type file.