Generate Speech
Changed onSynthesizes speech from text with a catalog voice and returns an audio URL, its duration and optional word timestamps. Omit engine to use the voice's saved default and settings, or set it per request; choose an ElevenLabs model with settings: {model_id: 'eleven_v4'}. Requests that omit engine use HeyGen Voice for most public catalog voices. Set engine: 'heygen_voice' to explicitly request HeyGen Voice, or 'starfish' for Starfish. The legacy 'orca' input remains accepted; response engine values retain 'orca' for compatibility. A professional HeyGen Voice clone is synthesized by POST /v3/models/audio/tts instead. HTTP 400: the saved default or explicit engine is unsupported, not allowed on your plan, or incompatible with the requested locale or language. HTTP 403 (ai_vendor_access_restricted): workspace vendor policy blocks ElevenLabs and all of its model variants.
Request
- Base URLhttps://api.heygen.com
- URLhttps://api.heygen.com/v3/voices/speech
- Auth
- API key in header x-api-key
- or HTTP bearer
Request body
Response
Successful response
Example response
{
"data": {
"audio_url": "https://files.heygen.ai/audio/tts_abc123.mp3",
"duration": 4.5,
"request_id": "req_abc123",
"word_timestamps": [
{
"word": "Hello",
"end": 0.35
}
]
}
}Changes
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the required property
/to the response with the status
- info