---
title: "A month's spend, per node and per batch job (?month=YYYY-MM)"
method: GET
path: "/preview/usage"
tags: ["usage"]
---

# A month's spend, per node and per batch job (?month=YYYY-MM)

`GET /preview/usage`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/usage`
- Auth: HTTP bearer

Your spend for a month (default: the current one), in USD, itemized: per-node rows, a `jobs` block for batch work, and `builds`, `snapshot_storage`, `wal_storage` (continuous volume replication, where it runs), and `sandboxes` rollup lines - each present only when that stream had something to say, and the total is the sum of them: what has BILLED, the /usage page's "Charged" figure. The `sandboxes` block splits its charge per tier (RAM, parked disk, resident and cold snapshots) and per UTC day in `days`, with the GiB-minutes held - the rows the /usage page's Sandboxes table and /usage.csv carry; `void_gib_minutes` is RAM-time voided on our side, never billed. Nodes bill while running or idle in their grace window; stopped nodes cost nothing. A node running RIGHT NOW has accrued minutes the fold has not journaled yet, so on the current month `in_progress_usd` carries that estimate and `spend_so_far_usd` is the two added up - which is the number get_billing quotes (`your_mtd_usd`, "includes in-progress") and the number spend caps enforce on. Both figures are absent whenever nothing is running, which includes every closed month. The `jobs` block carries the month's GPU-minutes and charge, `batches` (one line per submit_jobs sweep label, unlabeled jobs under a null label, the 20 priciest labels then one `batch_usage_remainder` line for the rest), and `top_jobs` (the 10 priciest, the drill-down; list_jobs enumerates the rest) - jobs bill per GPU-minute at the job rate, so their unit is gpu_minutes where a node's is wall minutes, and the counts are of what billed (an attempt we cut short costs nothing and appears nowhere). Builds meter past a monthly free allowance, so `builds` shows billed and free minutes. Pair with list_nodes to spot nodes you're paying for but not using.

## Query parameters

- `month` string, nullable: Month as "YYYY-MM" (default: the current month). Future months are refused; there is nothing honest to report.
- `cursor` string: Opaque page cursor: the `next_cursor` a previous response returned. Omit for the first page.
- `limit` integer: Rows per page. Clamped to the range shown.
- `workspace` string

## Response `200`

The capability's JSON result.

- List: The list envelope every paging endpoint returns.
  - `items` Result[], required
    - `object` string: The resource type, when the result is one resource.
  - `next_cursor` string: Pass as ?cursor= for the next page. Absent on the last page. Opaque: never parse it.
  - `object` 'list', required

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
