Where to see it
API keys need the scope: the Read only preset has
usage:read, Full access has both. Keys created before these scopes existed do not have them.
usage.sh
usage_api.py
Every sandbox’s row
GET /v1/usage returns the period’s sandboxes most expensive first, 50 to a page unless you pass limit (at most 1000). sandboxCount says how many there are; while more remain, the response has nextCursor, which you pass back as cursor with the same period. Pass sandboxId instead to read one sandbox’s row wherever it ranks. anona-compute usage --top N reads as many pages as it needs, and --sandbox <id> reads one row. The fields of each row, and which are allocated (size times running time) and which are consumed, are in the API reference.
usage_pages.py
What counts
Usage is billed on what a sandbox is given (Pricing):
Running time is billed per second, with a 1-minute minimum: a sandbox that ran less than a minute in total is billed one minute of vCPU and memory at its size, and above a minute every second is billed. The minimum is added a few minutes after the sandbox ends, to the hour it started in.
Deleting a sandbox stops all four. Pausing stops the first two. Each month’s report also shows the month against what your plan includes (
included in GET /v1/usage, the dashboard’s Usage and Billing pages, and anona-compute usage): vCPU-hours and memory used of what is included, egress, storage, and what is over. Owners and admins are emailed at 80% and 100% of the included vCPU-hours and egress. Free stops when the included usage is used up; paid plans are billed for what is over on the next invoice. A credit balance you already have pays for what is over first, on any plan, until it is spent.
Months before the current plans are reported with the meters they were billed on then.
Deleting or pausing a sandbox stops its vCPU and memory charges. Usage is rated hourly; until then the totals show it as pendingUsd, estimated at the same rates.
Running time counts from the moment a sandbox starts to the moment you delete or pause it. It is measured from samples taken every 10 seconds and clipped to the start and delete times, so it never exceeds that span, and it usually falls short of it by a few seconds at most. A resumed sandbox can be counted up to 10 seconds more than it ran, once per resume.
Usage arrives a minute at a time. A minute appears within about 35 seconds of its end, so the last minute of a sandbox you just deleted is not in the totals until then. Wait that long before comparing a sandbox’s running time with its lifetime.