What bounds your bill today
The lease lifetime is a ceiling you already have
A lease expires on its own after 10 minutes, and it can be renewed, but no lease may live longer than 60 minutes from when it was acquired. On a per minute device that hour is the most a single forgotten lease can cost:
Then it stops. Walking away for an afternoon costs at most one hour, not the
afternoon. A client that keeps renewing is a client that is still running; one
that crashed stops renewing, and the device frees itself within 10 minutes.
Nothing pauses the clock for idleness, so this expiry is doing the job you
might otherwise expect an idle timeout to do. See
Metering units.
A run carries its own budget
start_run takes two limits and both of them are real ceilings, not hints:
maxSteps, the number of frames the run may consume. The default is 50 per run, and your value can only lower it.deadlineMs, an absolute wall clock deadline, also capped by the deployment and by your lease’s own expiry, whichever comes first.
Monthly mode removes the variable
A monthly device has no meter, no allowance and no overage: run it all month and the invoice reads the same. If predictability matters more than the arithmetic, that is the mode that gives it to you outright. See Billing modes.Reading what you have spent
Two reads, both on the hosted control plane, both needing onlydevices:read:
GET /v1/usagereturns this billing period’s settled usage per device: measured active time with corrections already applied, how many leases it came from, and the minutes already reported to billing.GET /v1/receiptsenumerates what your org has actually done, newest first, with keyset paging.
get_receipt when you hold an idempotencyKey and need that one outcome
back. Use GET /v1/receipts when the question is what happened at all.
Two things to read carefully before you build a budget alarm on this. Only
settled leases appear in usage, so a lease you are holding right now is not in
those numbers: it is an account of what has finished, not a live meter. And
reportedMinutes is absent until reporting has happened, which is not the
same as zero.
Usage for your org is also shown in the hosted product, if your org has an
account there.