Starfish
Generate speech from your text using HeyGen’s TTS in-house model
1. Auth
| Step | What to do |
|---|---|
| Get key | HeyGen → Settings → API token |
| Send it | Header: 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.
| Item | Value |
|---|---|
| Endpoint | GET https://api.heygen.com/v1/audio/voices |
| Docs | List 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)
| Item | Value |
|---|---|
| Endpoint | POST https://api.heygen.com/v1/audio/text_to_speech |
| Docs | Text-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
| Step | Endpoint | Purpose |
|---|---|---|
| 1 | GET /v1/audio/voices | List voices → get voice_id |
| 2 | POST /v1/audio/text_to_speech | Send text + voice_id → get audio |
Next
- API Reference – Text-to-Speech
- API Reference – List Compatible Voices
- HeyGen Quick Start – auth and other API paths
Updated 1 day ago