Authentication
x-api-key Required for POST /api/tts (TTS engine).
Bearer JWT Used for other /api/* routes (e.g., /api/login, /api/protected).
Get your API key
- Log in to the Dashboard → Account → API Keys.
- No account? Email support@bryerstone.com.
Quickstart
curl -X POST "https://tts.bryerstone.com/api/tts" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Hello from MLOS TTS!", "voice_id": "en_male_01",
"prompt_length":1, "sampling_rate":16000,
"output_format":"wav", "return_base64": false }' \
-o audio.wav
This writes the synthesized audio to audio.wav.
Endpoints Overview
Auth & Users
POST /api/register– Create an accountPOST /api/login– Get a JWT tokenGET /api/protected– RequiresAuthorization: Bearer
TTS Workflow
POST /api/tts– Synthesize speech (requiresx-api-key)POST /api/select-voice– Choose a voice (if enabled)POST /api/upload– Upload text file (if enabled)
Platform
GET /status– Health & info/docs– Swagger UI
Troubleshooting
- 401/403 on
/api/tts: missing/invalidx-api-key. - 401/403 on other
/api/*: missing/expiredBearertoken. - 422: request validation—check JSON keys and types.
- CORS: ensure your origin is allowed if calling from browsers.