Format run usage after a cancel: debited, held, refunded and final
After you cancel a Sume Format run, usage shows the spend. How debited, held, refunded and final differ, and when the number is settled in a holiday batch.

When you cancel a Sume Format run, you pay for the generation that the run completed before the cancel, and the receipt's usage object shows it. Read usage.debited_usd_micros for the real amount deducted from the wallet, treat held_usd_micros and refunded_usd_micros as holds and not spend, and trust the figure as settled only when final is true. During a holiday batch where you cancel children to free slots, that field tells you whether the number can still change.
What each field means
The runs docs separate the generation total that enforces your cap from the cost that the wallet saw. billable_amount_usd_micros is the generation spend counted against the cap and does not include the language-model turn of the agent. debited_usd_micros is the real deduction and does include it.
| Field | Meaning |
|---|---|
billable_amount_usd_micros | Generation spend counted against the cap; excludes the agent's model turn |
generation_spend_cap_usd_micros | The effective cap of the run |
debited_usd_micros | What the wallet actually deducted for the run and its thread |
held_usd_micros | Holds still open; not spend yet |
refunded_usd_micros | Holds Sume gave back; not spend |
final | true when no hold is open |
usage is null | The API could not read the spend; this is different from 0 |
Steps after a cancel
A cancel is idempotent and needs formats:write, and it returns the current receipt.
- Call
POST /v1/format-runs/{run_id}/canceland readcancel_effect:canceledmeans this call stopped the run, andno_opmeans it had already finished. - Read
usagefrom the receipt the call returns, and checkfinal. - If
finalisfalse, read the run again after a short wait before you add the number to a report. - Remember that a canceled run never delivers a webhook, so a webhook-only integration must use the receipt from the cancel call.
What Sume does not do
Cancel does not refund generation that already happened. It also does not roll back files the run made, because the docs say a failed run still holds the media it produced in artifacts[], and the same page says you pay for the completed generation. In a bulk queue, canceling a child frees its slot and the next queued item starts, which means a cancel spends nothing new on that child but starts work on another.
Do not compare billable_amount_usd_micros with an invoice line and expect a match, because the wallet figure includes the agent's turn. Use debited_usd_micros for cost reports, and the billable figure for cap checks.
One more caution for a busy week: usage is per run, even on a continued run that shares a thread with an earlier one. If you continue a canceled run with previous_run_id, add the usage of both receipts to see the cost of the conversation, and keep the two receipt ids together in your records.
Sources
Related posts
More in Formats
- Spend cap 0 is a 400 and null is $500: set a cap per holiday item
Sume's generation_spend_cap_usd rejects 0 and anything above 500, and null means the $500 maximum. What to send on each item of a holiday bulk queue.
- Is a 4:5 video a YouTube Short? 1080x1350 on Sume Timeline
YouTube's Shorts page names square or vertical videos up to 3 minutes. 4:5 is taller than wide. Sume Timeline renders 1080x1350, so verify it after upload.
- LinkedIn GIF ads cap at 250 frames: 10 seconds at 25 fps
LinkedIn's image ad page allows GIFs of up to 250 frames. At 25 fps that is 10 seconds. For anything longer, send a video made with Sume trim or Timeline.
- LinkedIn video 10 to 60 fps: conform a 120 fps phone clip
LinkedIn Page video accepts 10 to 60 fps. A 120 fps phone clip or an 8 fps timelapse is outside that. Probe the rate, then conform it with Sume trim output.fps.
Written by Sume