• You have an API key. If not, you can get one by contacting us.
  • You have python installed on your machine along with the requests library

Step 1 (Optional): Create a video resource

If you have an existing video you want to use as a reference, follow this step. This is where your face, expressions and voice are taken from. If the file is larger than 5MB, follow the Upload Large Resources guide and note the resource_id. If not, you can upload it directly.

Step 2: Create a script to personalize the video

files = {
    "file": (
            "Hey Pranav, how do you make videos at Verbalia today?",
# If you want to load a txt file from disk, comment out the above lines
# and uncomment the below line
# files = {'file': ('text.txt', open('text.txt', 'rb'), 'text/plain')}

data = {
    "resource_name": "pranav-text",  # Descriptive name
    "resource_type": "text",  # One of the 5 types

# Make the POST request
script_response =
    base_url + "/resources/upload", files=files, params=data, headers=headers

# Check the response
if script_response.status_code != 200:
    print(f"Failed to upload file. Status code: {script_response.status_code}")
    print("Response:", script_response.text)
print("Upload successful", script_response.json())
# Contains resource_id which should be noted

Step 3: Create a generation request body

This is just a regular generation, but the way you use your own face, expressions and voice is by providing your reference video’s resource_id for the face and voice.

# Create a generation request body
body = {
    "avatar": {
        "face": "resource-video-qV1ApL",  # From step 1
        "voice": "resource-video-qV1ApL",  # From step 1
    "script": {
        "resource_id": "resource-text-5qyAQV", # From step 2
        "type": "text"
    "output": {
        "resolution": "512"

generation_response =
    base_url + "/generate-video", json=body, headers=headers

Step 4: Poll for the status and download the video

while True:
    time.sleep(60)  # Poll every 60 seconds
    response = requests.get(
        base_url + "/status/" + generation_response.json()["request_id"],
    print(response.json())  # Status and video urls once completed
    if response.json()["status"] not in ["pending", "processing"]:

if response.json()["status"] == "completed":
    video_response = requests.get(response.json()["video_url"])
    with open("verbalia_personalize.mp4", "wb") as f:

    print("Downloaded video to verbalia_personalize.mp4")

To personalize to multiple audiences, repeat steps 2-4 with different scripts.