200 birthday greeting avatar videos: cost and a Python loop

Send each customer a personal 10-second avatar greeting. At standard quality 200 clips cost $368. The Python loop uses one Idempotency-Key per row.

5 min readSume
All posts

Two hundred 10-second greetings at standard quality cost 200 x 10 x $0.184 = $368 on Sume, plus a one-time $0.95 for the avatar. Submit each row as an async job with its own Idempotency-Key, then collect the results as the jobs finish.

The cost, by quality

Rates are per second with no product image. The clip length is the script's estimated duration, and one clip must be 4 seconds at the least.

200 clips of 10 seconds (Sume docs, read 2026-10-05)
QualityPer secondPer clip200 clips
standard$0.184$1.84$368.00
plus$0.245$2.45$490.00
max$0.55$5.50$1,100.00

Keep it to one avatar

Create the avatar once and reuse the handle for all 200. A greeting needs a short script: a name, a line and a sign-off. Keep the name at the start so a mispronounced name does not run the whole clip.

The loop

The key is built from the customer id, so a rerun of the script cannot create a second job for the same person. mode async returns a job right away.

import json, os, urllib.request

rows = [("c-1001", "Maya"), ("c-1002", "Jonas")]
for cid, name in rows:
    body = {
        "avatar_handle": os.environ["AVATAR_HANDLE"],
        "script": f"Happy birthday, {name}! Thank you for being with us this year.",
        "aspect_ratio": "9:16",
        "quality": "standard",
        "mode": "async",
    }
    req = urllib.request.Request(
        "https://api.sume.com/v1/avatar-1.0/talking-video",
        data=json.dumps(body).encode(), method="POST",
        headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}",
                 "Content-Type": "application/json",
                 "Idempotency-Key": f"birthday-2026-{cid}"},
    )
    with urllib.request.urlopen(req, timeout=30) as r:
        print(cid, r.status, json.load(r)["data"]["job"]["id"])

Capacity and retries

A workspace has a limit on accepted generation work. If a submit returns 429 queue_full, wait for jobs to finish and retry with the same key. A 503 provider_capacity_exceeded gets the same treatment. Do not change the body when you retry; a changed body with an old key returns 409.

What to do

Run five customers first and look at the clips for name pronunciation. Then run the other 195 in batches, saving each job id next to the customer id so a later script can fetch the results.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume