Convert Speech
Convert a recording into an ACTIVE instant voice in your workspace. Professional voice clones are not supported. The words and timing stay the same. The response contains one WAV URL and its duration in seconds.
Use an API key with voices:write or an OAuth bearer token. OAuth requires a paid plan. The limit is 30 requests per minute per workspace member.
The source can contain up to 300 seconds of audio. Use a public HTTPS URL, an uploaded asset, or base64 audio. URL downloads must finish within 60 seconds. Set a client timeout of at least 160 seconds.
The optional model_id defaults to heygen-voice-sts-0. The optional seed requests best-effort repeatable generation. Set remove_background_noise to true to clean the source before conversion. This adds latency.
Send Idempotency-Key for safe retries. The same key and body replay the completed result without another charge for 24 hours. Keys are scoped to the workspace and this endpoint. A running request returns 409 request_in_progress. A different body with the same key returns 409 conflict. A keyed request continues after a client disconnect and can still be charged. Without a key, a disconnect before the charge cancels the request without a charge. After a timeout, wait before retrying with the same key. The conversion can still be running.
Authorizations
HeyGen API key. Obtain from your HeyGen dashboard.
Headers
Optional key, scoped to the workspace and this endpoint. The same key and body replay the result for 24 hours without another charge. A different body returns 409 conflict. A running request returns 409 request_in_progress.
1 - 255^[A-Za-z0-9_\-:.]{1,255}$Body
Identifier of the voice to speak in: a voice clone the caller's workspace owns.
1 - 256Asset input via publicly accessible HTTPS URL.
Remove background noise from the source before converting it. This adds latency.
Optional best-effort deterministic generation seed.
0 <= x <= 4294967295The speech-to-speech model. heygen-voice-sts-0 is the only one, and the default.
heygen-voice-sts-0 Response
Converted speech. The audio_url points to a WAV. Duration is in seconds and matches the source.

