Skip to main content
POST
/
voice
/
synthesize
Synthesize speech
curl --request POST \
  --url https://api.spikelabs.com/v1/voice/synthesize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "personality_id": "<string>",
  "text": "<string>",
  "format": "mp3",
  "speed": 1,
  "emotion": "neutral"
}
'
"<string>"

Authorizations

Authorization
string
header
required

API key authentication. Use your secret key (starts with sk_) as a Bearer token.

Body

application/json
personality_id
string
required

Personality whose voice to use

text
string
required

Text to synthesize

Maximum string length: 5000
format
enum<string>
default:mp3
Available options:
mp3,
wav,
opus
speed
number
default:1
Required range: 0.5 <= x <= 2
emotion
enum<string>
default:neutral
Available options:
neutral,
happy,
sad,
excited,
calm

Response

Audio data

The response is of type file.