SAGEA LogoDocs & API

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.

ParameterTypeRequiredDescription
modelstringYesAlways sonus-tts for speech synthesis.
inputstringYesText to synthesize, max 4096 characters per request.
voicestringNoOne of nova, atlas, or a cloned voice_id.
response_formatstringNoOne of mp3, wav, ogg, or flac. Default is mp3.
emotionstringNoOne of neutral, friendly, professional, excited, calm, or warm.
speednumberNoPlayback speed from 0.5 to 2.0. Default is 1.0.
languagestringNoBCP-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.

curl -X POST https://api.sagea.space/v1/audio/speech \
  -H "Authorization: Bearer $SAGEA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonus-tts",
    "input": "Welcome to SAGEA. नमस्ते, SAGEA मा स्वागत छ।",
    "voice": "nova",
    "response_format": "mp3",
    "emotion": "friendly",
    "speed": 1.0
  }' \
  --output welcome.mp3

Response

The API returns binary audio bytes with content type matching the format.

{
  "note": "Binary audio response, not JSON. Headers show format and size.",
  "content_type": "audio/mpeg",
  "content_length": 48210,
  "request_id": "tts_8welcomenp01",
  "model": "sonus-tts",
  "voice": "nova"
}

Save the body as welcome.mp3 and play it locally to verify output.

Errors

StatusCodeFix
400text_too_longSplit input into chunks under 4096 characters.
400unsupported_formatUse one of mp3, wav, ogg, or flac.
401unauthorizedRe-export a valid SAGEA_API_KEY value.
422voice_not_foundUse nova, atlas, or a valid vox_ voice ID.
429rate_limit_exceededBack off and retry with exponential delay.

Limits

Sonus TTS allows 50 requests per minute on Starter and 500 requests per minute on Pro.

What's next

On this page