Sume Format run usage is null: not zero cost, and a safe cost helper
usage is null when spend could not be read, which is not 0. Read usage.debited_usd_micros as an integer, and keep unknown runs separate from free ones.

On a Sume Format run receipt, usage is null when the spend could not be read, and that is different from a cost of 0. The real cost of a run is usage.debited_usd_micros, an integer in millionths of a dollar.
A sum that treats null as zero will understate the bill and hide the runs you should look at.
Which usage field answers which question
Names are from the Runs and results page (read 2026-10-03).
| Field | Meaning |
|---|---|
| debited_usd_micros | What the run actually cost |
| billable_amount_usd_micros | Generation only; excludes the agent's own model turn |
| generation_spend_cap_usd_micros | The cap applied to generation |
| held_usd_micros, refunded_usd_micros | Hold and refund, so the net is the debited amount |
| final | Whether the numbers are settled |
| usage: null | Spend could not be read; also null on old receipts for the wallet fields |
A helper
The function returns None for unknown cost, and the total reports unknown runs on their own line.
def cost_micros(run):
u = run.get("usage")
if u is None:
return None
return u.get("debited_usd_micros")
runs = [
{"usage": {"debited_usd_micros": 1_250_000}},
{"usage": {"debited_usd_micros": 0}},
{"usage": None},
]
known = [c for c in map(cost_micros, runs) if c is not None]
unknown = sum(1 for r in runs if cost_micros(r) is None)
print(sum(known), "micros known;", unknown, "unknown")
print(f"${sum(known) // 10_000 / 100:.2f}")Do not use the billable amount as the bill
billable_amount_usd_micros covers generation and leaves out the agent's own model turn, so it understates the run. Use the debited amount for cost, and see the Action run version of this mistake. Integer micros avoid float drift, which matters once you add thousands of rows.
Sources
Related posts
More in Formats
- Webhook or polling for Sume Format runs, and the 1 MiB payload rule
Pick between the signed terminal webhook and polling status_url for Sume Format runs: delivery limits, dedupe keys, and what a payload over 1 MiB looks like.
- Format structured output: anyOf passes, oneOf and allOf are rejected
Which JSON Schema keywords a Sume Format output_schema accepts, the 400 output_schema_invalid shape, and how it lines up with OpenAI strict structured outputs.
- Format output filled_by: agent versus projection, exact URLs
Sume Format runs fill structured output either through the agent or by projection. Learn which one ran, what projection can see, and the exact-URL gate.
- Sume webhook missed? POST /v1/format-runs/{run_id}/webhook/redeliver
Replay a Format run webhook without rerunning: the redeliver endpoint, the formats:write scope, and the two 409 errors for no webhook or a run still going.
Written by Sume