Skip to main content
POST
Generate Speech

Authorizations

x-api-key
string
header
required

HeyGen API key. Obtain from your HeyGen dashboard.

Body

application/json
text
string
required

Text to synthesize (1-5000 characters). Break tags must express time in seconds (for example, ); millisecond values are not supported.

Required string length: 1 - 5000
voice_id
string
required

Voice ID from the voice catalog. Professional voice clones use model speech generation instead.

input_type
string
default:text

Type of the input: 'text' for plain text, 'ssml' for SSML markup. Defaults to 'text'.

speed
number
default:1

Speed multiplier (0.5-2.0).

Required range: 0.5 <= x <= 2
language
string | null

Base language code (e.g. 'en', 'pt', 'zh'). Optional — auto-detected from text when omitted.

locale
string | null

Locale tag for Starfish (e.g. 'zh-HK'). ElevenLabs does not support locale selection; use language instead.

force_regenerate
boolean
default:false

Bypass HeyGen's speech cache and request fresh synthesis. Normal speech quota applies. Defaults to false.

engine
enum<string> | null

Speech engine override for this request only. Omit to use the voice's saved default, including your saved preference. Voices without a concrete saved default retain Starfish. Unsupported defaults or overrides return an error; engines are never silently substituted. Orca is the HeyGen voice engine. ElevenLabs model variants are selected through settings.model_id. The deprecated elevenlabs_v3 engine retains its existing behavior while callers and saved defaults migrate.

Available options:
starfish,
orca,
elevenlabs,
elevenlabs_v3
settings
ElevenLabsSpeechSettings · object | null

Request-only ElevenLabs model settings. Applied after saved preferences; valid for elevenlabs or the deprecated elevenlabs_v3 compatibility engine.

Response

Successful response

data
CreateSpeechV3ResponseData · object