Vidu's payload pass-through vs Sume: where to keep your order id
Vidu lets you send a payload string that comes back untouched. Sume's video request has no such field; use an Idempotency-Key and your own job table instead.

Vidu's image-to-video request has a payload field described as a pass-through parameter, sent back without processing, up to 1,048,576 characters. Sume's /v1/videos request table has no such field, and a non-empty provider.options returns 400. Keep your own order id in your database, tied to the Sume job id, and use an Idempotency-Key built from the order id so a retry never makes a second paid job.
What does each side offer?
Here is how each side handles your own data and retries.
| Need | Vidu Q4 Preview | Sume /v1/videos |
|---|---|---|
| Round-trip your own string | payload, up to 1,048,576 characters | no field; store it yourself |
| Make a retry safe | not stated on the page | Idempotency-Key; a replay returns the original job |
| Find the job later | GET .../tasks/{id}/creations | GET the polling_url, or GET /v1/jobs/{id}/status |
How do you tie an order to a job?
Write the order and its key first, then submit. If the process dies after the POST, run the same order again: the same key returns the same job. The sketch uses SQLite and a fake sender so it runs as is.
import sqlite3
db = sqlite3.connect(":memory:")
db.execute("create table jobs(order_id text primary key, idem text, job_id text)")
def submit(order_id, send):
row = db.execute("select idem from jobs where order_id=?", (order_id,)).fetchone()
idem = row[0] if row else "order-" + order_id
if not row:
db.execute("insert into jobs(order_id, idem) values (?, ?)", (order_id, idem))
job_id = send(idem) # POST /v1/videos with Idempotency-Key: idem
db.execute("update jobs set job_id=? where order_id=?", (job_id, order_id))
db.commit()
return job_id
fake = lambda key: "job_" + key
print(submit("A17", fake), submit("A17", fake))What if you only have the job id?
Sume jobs can be read at GET /v1/jobs/{id}/status as well as at the polling URL, so a table of job ids is enough to resume. A key reads only the jobs its own member created in its workspace, so keep one key per worker pool.
Use the order id, not a random value, as the key seed: the whole point is that a restart derives the same key.
Sources
Related posts
More in Developers
- Vidu Q4 base64 images and a 20 MB body vs Sume's HTTPS URLs
Vidu accepts base64 images with a 20 MB request body cap. Sume wants a public HTTPS URL. Base64 math, and a small check before you submit.
- Vidu Q4 callback_url receiver, moved to Sume's signed webhooks
Vidu and Sume both POST a callback. Sume's needs HTTPS, fires on terminal events only and signs the raw body with HMAC. What to change in the receiver.
- Vidu Q4 cover_url and watermarked_url vs Sume's poll response
Vidu returns url, cover_url and watermarked_url for 24 hours. Sume's poll returns unsigned_urls and usage. Where a poster still comes from.
- Vidu: failed and moderated videos use no credits. What Sume does
Vidu's pricing page says failed generations, moderation rejections included, use no credits. Sume reserves at submit and releases on failure. How to check each.
Written by Sume