Request
Bearer token with your API key
Body
The text to convert to speech (max 5000 characters)
ID of the voice to use (default: system default voice)
Alternative way to specify voice name
Enable audio enhancement for better quality
Speech speed multiplier (0.5 to 2.0)
Voice pitch multiplier (0.5 to 2.0)
Audio output format: mp3, wav, ogg, flac
Response
Indicates if the request was successful
Base64-encoded audio data
Duration of the audio in seconds
curl -X POST https://api-dev.qcall.ai/tts/tts-stream \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, world! This is a test of the text to speech API.",
"voice_id": "default-voice",
"enhance": true,
"speed": 1.0
}'
{
"success": true,
"message": "Audio generated successfully",
"audio_base64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA...",
"sample_rate": 24000,
"duration_seconds": 3.5,
"encoding": "mp3",
"output_format": "mp3"
}