Skip to main content
POST
cURL

Headers

x-api-key
string
required

Your Gradium API key

Body

application/json
text
string
required

The text to convert to speech

voice_id
string
required

Voice ID from the library or custom voice ID

output_format
enum<string>
required

Audio output format

Available options:
wav,
pcm,
opus,
ulaw_8000,
mulaw_8000,
alaw_8000,
pcm_8000,
pcm_16000,
pcm_22050,
pcm_24000,
pcm_44100,
pcm_48000
only_audio
boolean

When true, returns raw audio bytes instead of JSON

Response

Audio data returned successfully