Skip to main content
POST
/
v1
/
audio
/
speech
Text-to-Speech
curl --request POST \
  --url https://api.vivgrid.com/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "Hello, world! Welcome to Vivgrid text-to-speech.",
  "voice": "zf_001",
  "response_format": "mp3"
}
'
"<string>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
input
string
required

Text to generate speech from.

voice
enum<string>
required

Voice preset.

Available options:
zf_001
response_format
enum<string>
default:mp3

Audio format of the response.

Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
default:1

Playback speed.

Required range: 0.25 <= x <= 4

Response

Audio stream

The response is of type file.