Skip to main content
These APIs are in private preview. Your account must be enabled before using a professional voice clone.
The HeyGen Voice speech APIs provide two ways to synthesize audio:
  • POST /v3/models/audio/tts waits for generation to finish and returns one audio URL.
  • POST /v3/models/audio/tts/stream returns ordered audio parts as Server-Sent Events (SSE).
Both endpoints use the same request shape. The supplied voice_id identifies the voice implementation; callers do not select a voice mode during synthesis. Currently, the voice must be an ACTIVE professional voice clone owned by the API key’s workspace. To synthesize speech with a stock, designed, or instant-cloned voice, use Third Party Speech. Professional-voice synthesis costs 0.6 API credits per generated minute, billed by generated duration.

Authentication

Send your HeyGen API key with every request:

Generate completed speech

POST /v3/models/audio/tts keeps the request open until synthesis and audio assembly complete.
Response
The returned file is one complete mono PCM16 WAV at 44.1 kHz. No polling request is required.

Response fields

Stream speech

POST /v3/models/audio/tts/stream returns text/event-stream. Disable response buffering and process each event as it arrives.

Request fields

The completed endpoint accepts every field above except with_timestamps. Unknown fields are rejected.

Audio events

Audio arrives as one or more indexed WAV parts:
Each audio value is a base64-encoded standalone WAV. Play parts in ascending part_index order. Do not concatenate the encoded WAV containers byte-for-byte.

Timestamp events

When with_timestamps is true, the stream may include alignment events containing word-level timing:
Each alignment contains:

Stream completion and errors

A clean stream ends with:
If synthesis fails after streaming has started, the stream emits a sanitized terminal error and does not emit [DONE]:
Errors before the first stream event use the standard JSON HTTP error envelope.

Errors

Error response
Each endpoint is limited to 30 requests per minute per workspace member.