Skip to main content
POST
/
speak
Handler for the /speak endpoint
curl --request POST \
  --url https://api.sayna.ai/speak \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "Hello, world!",
  "tts_config": {
    "model": "aura-asteria-en",
    "provider": "deepgram",
    "audio_format": "linear16",
    "connection_timeout": 30,
    "pronunciations": [
      {
        "pronunciation": "A P I",
        "word": "API"
      }
    ],
    "request_timeout": 60,
    "sample_rate": 24000,
    "speaking_rate": 1,
    "voice_id": "aura-asteria-en"
  }
}
'
Kick off one-shot synthesis jobs for short responses. This endpoint reuses the same provider layer and cache that powers the streaming WebSocket experience.
Reuse identical tts_config inputs to hit the cache and avoid extra provider round-trips.

Authorizations

Authorization
string
header
required

JWT token obtained from the authentication service. Required when AUTH_REQUIRED is enabled.

Body

application/json

Request body for the speak endpoint

text
string
required

The text to synthesize

Example:

"Hello, world!"

tts_config
object
required

TTS configuration (without API key)

Response

Audio generated successfully