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.

4 min readSume
All posts

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.

Fields of usage on a run receipt, read 2026-10-08
FieldMeaning
billable_amount_usd_microsGeneration spend counted against the cap; excludes the agent's model turn
generation_spend_cap_usd_microsThe effective cap of the run
debited_usd_microsWhat the wallet actually deducted for the run and its thread
held_usd_microsHolds still open; not spend yet
refunded_usd_microsHolds Sume gave back; not spend
finaltrue when no hold is open
usage is nullThe 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}/cancel and read cancel_effect: canceled means this call stopped the run, and no_op means it had already finished.
  • Read usage from the receipt the call returns, and check final.
  • If final is false, 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

All Formats posts

Written by Sume