Sum Sume usd_micros as integers in Python, not floats
Keep usd_micros as ints and divide once at display time. A million micros is one dollar, so integer addition is exact where a float sum drifts.

Sume reports money as integer usd_micros, millionths of a dollar. Add the integers and convert once for display, instead of converting each row to a float dollar amount and summing.
Integer addition is exact, so a total never differs from the sum of its rows.
Names to know
Fields from the Runs and results page (read 2026-10-03).
| Field | Use |
|---|---|
| usage.debited_usd_micros | The real cost of a Format run |
| usage.billable_amount_usd_micros | Generation only |
| usage.held_usd_micros | Reserved while running |
| usage.refunded_usd_micros | Returned after the run |
| 1,000,000 micros | One US dollar |
Why floats drift
Binary floats cannot hold most decimal cents exactly, so a long sum of dollar floats can show a total like 0.30000000000000004. That makes a reconciliation fail by a fraction of a cent. Integers do not.
from decimal import Decimal
rows = [10_000, 20_000, 10_000]
print(0.1 + 0.2)
total = sum(rows)
print(total, Decimal(total) / Decimal(1_000_000))
print(f"${total // 10_000 / 100:.2f}")Rounding at the edge
Round only for display and invoices, and decide your rule once, for example round half up to the cent. Null usage is unknown, not zero, so keep it out of the sum as in the null helper, and use the per-row cost walk for a batch.
Sources
Related posts
More in Pricing
- Sume accepted job capacity by plan: 6, 24, 48, 120 and queue_full
Accepted capacity is concurrency plus queue: 6 on Free, 24 on Pro, 48 on Startup and 120 on Scale. Past it, submits get 429 queue_full until a job finishes.
- Sume API requests per minute by plan: write and read limits
Writes per minute are 120 on Free, 300 on Pro, 600 on Startup and 1200 on Scale. Reads are 40 times that, so 4800, 12000, 24000 and 48000.
- Sume avatar quality defaults to plus when omitted: what it costs
Omit quality on an avatar video and Sume renders on Plus at $0.245 per second, 33 percent above Standard. How the default shows up in a 100-clip batch.
- Sume image markup at 10,000 images: list vs billed price per model
What the 1.25x house margin adds at 10,000 images per Sume image model, from $50 on Qwen Image and Grok Imagine to $527 on ChatGPT Image 2.
Written by Sume