Gateway APIs
Text-to-Speech
Generate audio from text input.
POST
/
v1
/
audio
/
speech
curl https://gateway.bud.studio/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello, this is a test of text-to-speech.",
"voice": "alloy"
}' \
--output speech.mp3
Binary audio file returned with appropriate Content-Type header (e.g., audio/mpeg for MP3)
curl https://gateway.bud.studio/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello, this is a test of text-to-speech.",
"voice": "alloy"
}' \
--output speech.mp3
Binary audio file returned with appropriate Content-Type header (e.g., audio/mpeg for MP3)
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer authentication header |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model identifier (e.g., tts-1, tts-1-hd) |
| input | string | Yes | Text to convert to speech (max 4096 characters) |
| voice | string | Yes | Voice to use: alloy, echo, fable, onyx, nova, shimmer, ash, ballad, coral, sage, verse |
| response_format | string | No | Audio format: mp3, opus, aac, flac, wav, pcm. Default: mp3 |
| speed | float | No | Speed of generated audio (0.25 to 4.0). Default: 1.0 |
Supported Providers
OpenAI
TTS-1 and TTS-1-HD with multiple voices
Azure OpenAI
Enterprise text-to-speech with global deployment
Together AI
Cartesia Sonic with 100+ voice options
⌘I
curl https://gateway.bud.studio/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello, this is a test of text-to-speech.",
"voice": "alloy"
}' \
--output speech.mp3
Binary audio file returned with appropriate Content-Type header (e.g., audio/mpeg for MP3)