Skip to main content
POST
Google text to speech

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

Model ID or configured alias.

Minimum string length: 1
input
string
required

Text or input to process.

Required string length: 1 - 4096
voice
required

Voice ID for the selected model.

Minimum string length: 1
instructions
string

Instructions for the model.

Maximum string length: 4096
response_format
enum<string>
default:wav

Output format.

Available options:
wav,
pcm
speed
number
default:1

Speech speed.

Required range: 0.25 <= x <= 4
stream_format
enum<string>
default:audio

Return audio bytes or server-sent events.

Available options:
audio,
sse
extra_body
object

Provider-specific options.

language_code
string
Minimum string length: 1

Response

Successful response

The response is of type string.