Preview
Generates speech audio for the provided text and returns it as a single base64-encoded string.
Authentication
AuthorizationBearer
Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).
Request
This endpoint expects an object.
text
The text to convert to speech.
model
The TTS model to use.
Allowed values:
speed
The speech speed.
voice_id
The voice ID to use.
output_format
The audio format to stream.
Allowed values:
languages
Candidate languages for synthesis. An empty array defaults to English, one language
selects it directly, and multiple languages let Phonic detect among those candidates.
Response
The generated audio.
audio
The generated speech, base64-encoded in the requested output_format.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error