Discussions

Ask a Question
Back to All

401 Error when trying to use the text_to_speech.generate endpoint on the free plan

Hello,

I am encountering an issue when trying to use the https://api2.heygen.com/v2/online/text_to_speech.generate endpoint to generate text-to-speech from an API key. When making the request, I receive a 401 Unauthorized error.

Here are the details:

I am using the API key generated from my dashboard.
The API key is included in the request header as Bearer [your_api_key].
The request is made via POST with a JSON body, as per the documentation.
Questions:

Is the text_to_speech.generate endpoint available for free plan users, or does it require a paid plan?
If the feature is not available for the free plan, is there an alternative to generate a voice preview without upgrading?
Are there any specific limitations or configurations for accessing this endpoint that I might be missing?
Thank you for your help!