Discussions

Ask a Question
Back to all

Unable to obtain audio_url or asset_url when uploading MP3 via HeyGen API

Hi,
I’m trying to work with the HeyGen API to generate agents, but I’m having trouble obtaining the audio_url or asset_url.

According to the documentation, I understand that I need to upload an asset first using the v1/asset endpoint to get an asset_id. However, when I try to upload an MP3 file, I receive an error saying that the file is not valid or not supported, even though MP3 files should be accepted and the file size is within limits.

I’m not sure if this issue is related to the Content-Type header, the way the file is being sent in the request, or something else in my implementation.

Has anyone encountered this issue before, or can clarify the correct way to upload an MP3 to obtain the asset_id and later access the audio_url or asset_url?

Any guidance would be appreciated. Thanks!