Skip to main content
POST
Convert Speech

Authorizations

x-api-key
string
header
required

HeyGen API key. Obtain from your HeyGen dashboard.

Headers

Idempotency-Key
string

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.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body

application/json
voice_id
string
required

Identifier of the voice to speak in: a voice clone the caller's workspace owns.

Required string length: 1 - 256
audio
AssetUrl · object
required

Asset input via publicly accessible HTTPS URL.

remove_background_noise
boolean
default:false

Remove background noise from the source before converting it. This adds latency.

seed
integer | null

Optional best-effort deterministic generation seed.

Required range: 0 <= x <= 4294967295
model_id
enum<string> | null

The speech-to-speech model. heygen-voice-sts-0 is the only one, and the default.

Available options:
heygen-voice-sts-0

Response

Converted speech. The audio_url points to a WAV. Duration is in seconds and matches the source.

data
CreateSpeechConversionResponseData · object