Authentication at a glance
x-api-key Use this header for the TTS engine endpoint (POST /api/tts).
Bearer JWT Use this for other dashboard endpoints (e.g., /api/login, /api/protected).
TTS request
POST https://tts.bryerstone.com/api/tts
x-api-key: YOUR_API_KEY
Content-Type: application/json
{
"text": "Hello MLOS!",
"prompt_length": 1,
"sampling_rate": 16000,
"output_format": "wav",
"return_base64": false
}
JWT for other routes
# Get a token
POST https://tts.bryerstone.com/api/login
{ "email": "you@example.com", "password": "••••••••" }
# Use it when needed
GET https://tts.bryerstone.com/api/protected
Authorization: Bearer <TOKEN>
Where to get your API key
- Log in to the Dashboard → Account → API Keys.
- No account? Email support@bryerstone.com.
Quickstart (cURL)
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 or wrongx-api-key. - 401/403 on other
/api/*: missing or expiredBearertoken. - 422: request validation—check JSON keys and types.
- CORS: ensure your origin is allowed if calling from browsers.