API key is optional but recommended for better service limits.
Base URL
Authentication
Authorization
Bearer your-api-key-here (optional)
POST /v1/text-to-speech/generate
Generate speech from text using streaming response.Request Headers
Authorization
Bearer YOUR_API_KEY (optional)
application/json
Request Body
Text to convert to speech
Audio format for output (e.g., “wav”)
Size of audio chunks for streaming (e.g., 128, 32)
Example Request
Example Request
Response
The API returns a streaming audio response with:audio/ (e.g., audio/wav)
Streaming audio data in the specified format
Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Audio stream returned |
| 400 | Bad Request - Invalid request body or parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 422 | Validation Error - Request body validation failed |
| 500 | Internal Server Error - Server processing error |