Skip to main content
POST
/
v1
/
synthesize
Synthesize speech (text to speech)
curl --request POST \
  --url https://api.speko.dev/v1/synthesize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "intent": {
    "language": "<string>",
    "vertical": "general",
    "optimizeFor": "balanced"
  },
  "voice": "<string>",
  "speed": 1.25,
  "constraints": {
    "allowedProviders": {
      "stt": [
        "<string>"
      ],
      "llm": [
        "<string>"
      ],
      "tts": [
        "<string>"
      ]
    }
  }
}
'
"<string>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
text
string
required
Required string length: 1 - 10000
intent
object
required
voice
string

Provider-specific voice id. Speko falls back to a sane default per provider when omitted.

speed
number
Required range: 0.5 <= x <= 2
constraints
object

Response

Audio bytes

The response is of type file.