Retrieve available TTS languages

July 4, 2025

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

This endpoint retrieves a list of available text-to-speech languages from HeyGen.

https://api.useapi.net/v1/heygen/tts/languages?…

Request Headers
Authorization: Bearer {API token}
Query Parameters
  • email is optional when only one account configured.
    However, if you have multiple accounts configured, this parameter becomes required.
Responses
  • 200 OK

    {
      "languages": [
        {
          "value": "en-US",
          "label": "English (United States)",
          "language": "English",
          "tag": "en-US",
          "locale": "en-US",
          "language_code": "en-US"
        },
        {
          "value": "en-GB",
          "label": "English (United Kingdom)",
          "language": "English",
          "tag": "en-GB",
          "locale": "en-GB",
          "language_code": "en-GB"
        },
        {
          "value": "es-ES",
          "label": "Spanish (Spain)",
          "language": "Spanish",
          "tag": "es-ES",
          "locale": "es-ES",
          "language_code": "es-ES"
        },
        {
          "value": "fr-FR",
          "label": "French (France)",
          "language": "French",
          "tag": "fr-FR",
          "locale": "fr-FR",
          "language_code": "fr-FR"
        }
      ]
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  languages: {
    value: string
    label: string
    language: string
    tag: string | null
    locale?: string
    language_code: string
  }[]
}
Examples
  • curl "https://api.useapi.net/v1/heygen/tts/[email protected]" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const email = "Previously configured account email";
    const apiUrl = `https://api.useapi.net/v1/heygen/tts/languages?email=${email}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    email = "Previously configured account email"
    apiUrl = f"https://api.useapi.net/v1/heygen/tts/languages?email={email}"
    headers = {
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It