Starfish

Generate speech from your text using HeyGen’s TTS in-house model

1. Auth

StepWhat to do
Get keyHeyGen → Settings → API token
Send itHeader: X-API-KEY: <your_token> on every request

2. List compatible voices

Get public and custom voices that work with Starfish TTS. Use a voice_id from this response when calling Text-to-Speech.

ItemValue
EndpointGET https://api.heygen.com/v1/audio/voices
DocsList Compatible Voices
curl -X GET "https://api.heygen.com/v1/audio/voices" \
  -H "X-API-KEY: $HEYGEN_API_KEY"

3. Generate speech (Text-to-Speech — Starfish)

ItemValue
EndpointPOST https://api.heygen.com/v1/audio/text_to_speech
DocsText-to-Speech — Starfish

Body (JSON): include at least text and voice_id. Example:

{
  "text": "Your script or message to speak.",
  "voice_id": "<voice_id from GET /v1/audio/voices>"
}
curl -X POST "https://api.heygen.com/v1/audio/text_to_speech" \
  -H "X-API-KEY: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello from HeyGen Starfish.", "voice_id": "YOUR_VOICE_ID"}'

The response contains the generated audio (e.g. URL or base64). Use it in video generation or for playback.


Summary

StepEndpointPurpose
1GET /v1/audio/voicesList voices → get voice_id
2POST /v1/audio/text_to_speechSend text + voice_id → get audio

Next