Discussions

Ask a Question
Back to all

Asset Upload Issue

Hello! I'm experiencing an issue with file uploads through the HeyGen API. When I try to upload an image file, I get the error "asset data must be provided".

Details:

Result:

All attempts return a 400 BAD REQUEST error with the message:

{"code":40001,"message":"asset data must be provided"}

 

Payload and I am connecting:

files = {"file": (os.path.basename(image_path), f, mime_type)}

have also run

files = {"content": (os.path.basename(image_path), f, mime_type)}