100 SKUs in 5 languages: 500 caption jobs, $100.00 and a key scheme

Captioning one clip per SKU in five languages is 500 Sume caption jobs at $0.20, $100.00; key each job sku-language so a restarted batch never pays twice.

5 min readSume
All posts

A catalog of 100 SKUs with one clip each, captioned in five languages, is 500 caption jobs, and at $0.20 a job that is $100.00 on Sume. Translation on Bilibili's listed free Index-Translate API adds no line to the bill, so the only decision left is how to make a 500-job batch safe to restart.

Use the SKU and language as the idempotency key, for example sku-0412-de. The Sume docs say to reuse a key only for the same operation and payload, so a restarted script can resubmit the whole list and each finished pair is the same job, not a new charge. Rates are from the Video captions docs and the jobs docs, read 2026-10-05.

Batch size and bill

The cost scales with SKUs times languages, nothing else.

Caption jobs and cost at $0.20 per job, one clip per SKU (read 2026-10-05)
SKUsLanguagesJobsSume cost
20240$8.00
1003300$60.00
1005500$100.00
25051250$250.00

A key scheme that survives a restart

  • Key = SKU + language code, never a counter or a timestamp.
  • Keep the payload for a pair stable: if you change the translated text, change the key, for example sku-0412-de-v2.
  • Write each submitted status URL to a local file, so you can poll later without resubmitting.
  • Run two SKUs first and read the burned output before you start the other 98.

Run it

This submits one job per SKU and language from a small catalog and records the status URLs. Replace the translated dict with real Index-Translate output.

import os, time, requests
API = "https://api.sume.com"
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}

import json
CLIPS = {"0412": "https://cdn.example.com/mug-0412.mp4"}
translated = {("0412", "de"): "Spülmaschinenfest", ("0412", "es"): "Apto para lavavajillas"}
done = {}
for (sku, lang), text in translated.items():
    body = {"video_url": CLIPS[sku], "style": "slam", "cues": [{"text": text, "start": 0.5, "end": 4.5}]}
    r = requests.post(f"{API}/v1/video-captions", json=body, timeout=60,
                      headers={**H, "Idempotency-Key": f"sku-{sku}-{lang}"})
    r.raise_for_status()
    done[f"{sku}-{lang}"] = r.json()["data"]["status_url"]
json.dump(done, open("caption-jobs.json", "w"), indent=2)
print(len(done), "jobs submitted")

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume