Reconcile a 9-clip batch: poll usage.cost versus /v1/usage debited_usd
If 7 of 9 Seedance 2.5 clips complete at $3.4668 each, the poll sum and the ledger should both read $24.2676. How to compare them and why they differ.

Nine Seedance 2.5 clips at 720p, 9:16, 6 seconds cost $3.4668 each ($31.2012 if all nine complete). If two fail before capture, seven captures give $24.2676, and that is the number both the sum of poll usage.cost values and the ledger debited_usd should show.
When the two disagree, trust the ledger: the usage docs say never to sum rows yourself and to quote summary.debited_usd, which counts captured rows only.
What should reconcile
Reserved holds are open, not spent. Refunded rows are holds Sume gave back. Only captured rows are debits.
| Outcome | Jobs | Per job | Debited |
|---|---|---|---|
| Completed | 7 | $3.4668 | $24.2676 |
| Failed before capture | 2 | released | $0.00 |
| Total ledger debit | 9 | $24.2676 |
Compare both numbers in code
Poll each job, add usage.cost for completed ones, then ask the ledger for the same jobs.
import os, requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
def poll_cost(job_ids):
total = 0.0
for jid in job_ids:
j = requests.get(f"https://api.sume.com/v1/videos/{jid}", headers=H, timeout=30).json()
if j["status"] == "completed":
total += j["usage"]["cost"]
return round(total, 4)
def ledger_cost(job_id):
r = requests.get("https://api.sume.com/v1/usage", headers=H,
params={"job_id": job_id, "limit": 50}, timeout=30)
return r.json()["summary"]["debited_usd"]Why they can differ
- A job still
in_progresshas a reserve but no capture, so the ledger shows it as held, not debited. usage.coston a poll response is the Sume billable amount per job;summary.debited_usdalso includes the agent's own turns if you scoped by thread or run.- Query the ledger with
job_id,run_idorthread_id; with a batch, tag jobs so you can scope one run.
Sources
Related posts
More in Pricing
- Video frames and reference ingest: no fixed price, a hold that settles
Sume bills video frames and reference ingest by Modal container seconds x list x 1.25 plus a fee, never above the hold. What to expect on the ledger and STT.
- 1,800 product photos: background removal and 150 upscales, $70.50
Sume RMBG is $0.0225 per image and image upscale $0.20: 1,800 photos cut out plus 150 hero upscales is $70.50, independent of image size.
- Reserved, captured, refunded: the ledger for a 6 s Omni 720p job
A 6-second Gemini Omni Flash 720p job on Sume reserves $0.75, then captures it or refunds it. How to read GET /v1/usage for one job and the three row states.
- Retry a timed-out 30-second Wan job: Idempotency-Key vs paying twice
A 30-second Wan 3.0 1080p job reserves $7.50. Resubmit it without an Idempotency-Key after a timeout and you can hold $15.00; the same key does not.
Written by Sume