Text to Speech
Convert text to lifelike audio with sonus-tts in four output formats.
POST https://api.sagea.space/v1/audio/speech
Authentication
Send Authorization: Bearer $SAGEA_API_KEY on every request. Get a key
Parameters
Send a JSON body with the following fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Always sonus-tts for speech synthesis. |
input | string | Yes | Text to synthesize, max 4096 characters per request. |
voice | string | No | One of nova, atlas, or a cloned voice_id. |
response_format | string | No | One of mp3, wav, ogg, or flac. Default is mp3. |
emotion | string | No | One of neutral, friendly, professional, excited, calm, or warm. |
speed | number | No | Playback speed from 0.5 to 2.0. Default is 1.0. |
language | string | No | BCP-47 hint such as ne-NP, hi-IN, en-US, or es-ES. |
Example request
Synthesize Welcome to SAGEA plus a ne-NP greeting with voice nova.
Response
The API returns binary audio bytes with content type matching the format.
Save the body as welcome.mp3 and play it locally to verify output.
Errors
| Status | Code | Fix |
|---|---|---|
400 | text_too_long | Split input into chunks under 4096 characters. |
400 | unsupported_format | Use one of mp3, wav, ogg, or flac. |
401 | unauthorized | Re-export a valid SAGEA_API_KEY value. |
422 | voice_not_found | Use nova, atlas, or a valid vox_ voice ID. |
429 | rate_limit_exceeded | Back off and retry with exponential delay. |
Limits
Sonus TTS allows 50 requests per minute on Starter and 500 requests per minute on Pro.
