Using AI for Everyday Tasks

With HeyGen API + Large Language Models

Eric Fan (ericfan512@gmail.com)

Official HeyGen Website

Official Google Gemini Website


In recent decades and especially the past few years, countless advancements have been made in the field of artificial intelligence (AI). Most notably, large language models (LLMs), such as ChatGPT and Gemini, can hold flawless conversations and provide accurate, up-to-date information. These LLMs are trained using neural networks composed of hundreds of layers of neurons as well as many terabytes of data.
Large language models aid in the generation and understanding of text-based material. Above all, they allow people to get information that is arranged in a concise manner quickly.
There are also many uses of neural networks that allow for the generation of information that is not text-based. For instance, virtual avatar tools allow for the production of realistic video when given visual and/or audio information about a person. Videos that are generated using such tools can be used to convey information in a lifelike manner without it needing to be directly stated. Companies such as HeyGen and Synthesia are paving the way for such technologies to become more widespread.

Read more: The Basics Behind Facial Analysis


There are many use cases for virtual avatars, most of which fall under a couple main concepts:

What's your personality?

(based on blood type)

Type A
Type B
Type AB
Type O

Brief Code Overview


Due to the relative complexities of creating and training a new AI, I used HeyGen’s API in order to create the videos that appear above. The API allows for the creation of short (max. 2000 characters) videos given an image of a human face and what the user wants the face to appear to say, making it perfect for creating short-form content. The API is also easily accessible, as API keys can be obtianed for free by signing up for a HeyGen account.
The user is able to choose between two of the most commonly spoken languages (English and Chinese) as well as between male or female and young or mature voices. The voices were obtained from HeyGen’s voice library.
I used Grok 3 to generate realistic-looking faces in order to demonstrate the technology in an ethical manner.
The streamlit library with Python was used to create a user interface to allow for easy usage of the API. Streamlit allows for the development of simple, interactive programs without needing to build a complex frontend.
Since I had limited experience with the streamlit library before the creation of the interface for this project, I periodically used ChatGPT as a resource to explain the errors I was encountering and to aid in fixing them.
This site was built using HTML.

If there are any issues you encounter while utilizing the site, please feel free to email me.

Advised by Guang Cheng - Professor of Statistics and Data Science - University of California, Los Angeles
Video generation interface based on code written by Haoxuan Zou (Ph.D., Tsinghua University)
Video generated by HeyGen API
Last modified: 25 July 2025 m