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.

4 min readSume
All posts

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.

9 clips, 2 failed (read 2026-10-09)
OutcomeJobsPer jobDebited
Completed7$3.4668$24.2676
Failed before capture2released$0.00
Total ledger debit9$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_progress has a reserve but no capture, so the ledger shows it as held, not debited.
  • usage.cost on a poll response is the Sume billable amount per job; summary.debited_usd also includes the agent's own turns if you scoped by thread or run.
  • Query the ledger with job_id, run_id or thread_id; with a batch, tag jobs so you can scope one run.

Sources

Related posts

More in Pricing

All Pricing posts

Written by Sume