Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

HeyGen Voice 1

Model id: heygen/voice-1. HeyGen Voice 1 turns text into natural speech with HeyGen public voices and returns a WAV file. Does not support tools/function calling.

This documentation is valid for the following list of our models:

  • heygen/voice-1

Model Overview

HeyGen Voice 1 turns text into natural speech with HeyGen public voices and returns a WAV file. Does not support tools/function calling.

Setup your API Key

If you don't have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schema

post
Body
modelstring · enumRequiredPossible values:
textstring · min: 1 · max: 5000Required

Text to speak (1–5000 characters). Billed per character.

voice_idstring · min: 1Optional

ID of a public HeyGen voice.

Default: 6c5a16cb1ce6469a85b80798be89d95c
languagestringOptional

Language code of the text, for example "en". Detected from the text when omitted.

streamboolean · enumOptionalDefault: falsePossible values:
Responses
200

Successful response.

audiostring · uriRequired
post/v1/tts
curl --request POST \
  --url 'https://api.aimlapi.com/v1/tts' \
  --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{"model": "heygen/voice-1", "text": "<text>"}'
200

Successful response.

{
  "audio": "https://example.com",
  "meta": {
    "usage": {
      "credits_used": 120000,
      "usd_spent": 0.06
    }
  }
}

Code Example

Response

Last updated

Was this helpful?