Billing records¶
Your organization's ledger by org API token: every charge down to the node and the price window, daily totals in your calendar, the balance now with the hourly burn rate and the balance over time, your credit balances with available to spend and debt, the balance card with the card on file and the auto reload setting, the monthly statements, spend attributed per workload, and the unit prices in force. Five writes start the console's billing actions for a person: three hand back a hosted page URL, one tightens the spend limit, one configures auto reload.
Contract: GET /api/billing/openapi.json.
| Route | What it serves |
|---|---|
GET /api/billing/transactions |
the itemized ledger: every charge and deposit, newest first, one entry per resource per price window |
GET /api/billing/daily |
one row per calendar day: charges, deposits, the resources charged and their unit-hours |
GET /api/billing/summary |
balance, lifetime totals, this month's charges, spend limit, hold state, the card on file, the auto reload setting, credit balances and debt, the membership level, the runway |
GET /api/billing/balance |
the balance now, the hourly burn rate the meter last assessed, and what it is made of by kind, cluster and unit price, credit balances and debt |
GET /api/billing/balance/history |
the balance as a series over a window: start, step_s, one value per bucket |
GET /api/billing/payments |
the payment history: card, wire, ACH and check payments with their status, and the year's total |
GET /api/billing/payments/{payment_id}/receipt |
{url, card}: one payment's receipt |
GET /api/billing/statements |
the months list: each month's status, opening and closing balance, and its routes |
GET /api/billing/statements/{month} |
one month's statement as JSON |
GET /api/billing/statements/{month}.pdf |
the statement's PDF |
GET /api/billing/statements/{month}.csv |
the statement's CSV |
GET /api/billing/usage/workloads |
spend attributed per workload over a preset range |
GET /api/billing/rates |
the unit prices in force for your organization |
POST /api/billing/checkout |
{usd}: a hosted payment page URL for a person to complete; the deposit lands when they pay |
POST /api/billing/setup |
a hosted page URL that saves a card and charges nothing |
POST /api/billing/portal |
the payment portal URL: receipts and card changes |
PUT /api/billing/limit |
{usd}: set the monthly spend limit where none exists, or lower it |
PUT /api/billing/reload |
{enabled, threshold_usd, amount_usd}: the auto reload setting, a standing charge on the saved card whenever the balance runs low; a token may only disable it, lower the amount or raise the threshold |
Any of your organization's tokens reads these routes, cluster-bound or org-wide. The organization is the token's own and nothing identifies it on the wire. There is no cluster selector: the ledger is organization wide, and each charge entry names its cluster. No call on this wire moves money by itself: the three hosted page routes return a URL that a person opens in a browser, and no card detail ever rides the token. Auto reload is the one standing authorization. Once enabled it charges the saved card whenever the balance falls under the threshold, so a token may only tighten it: enabling it stays a console action.
curl -H "Authorization: Bearer $NC_TOKEN" \
"https://nationalcompute.com/api/billing/daily?limit=31"
Units¶
Amounts are integers in microcredits: fields ending in _ucredits,
where 1,000,000 microcredits = 1 credit = $1. Stamps are RFC 3339
UTC to the second (2026-09-10T14:00:00Z), except fields ending in
_ms, which are epoch milliseconds. Where a route aligns to
your calendar it takes tz_offset_min, the JavaScript
getTimezoneOffset() value (minutes UTC is ahead of local; 0 is UTC
days; a value outside ±900 is refused with 422 bad-request).
The ledger¶
GET /api/billing/transactions returns one row per ledger transaction,
newest first:
{
"transactions": [
{
"type": "charge",
"start": "2026-09-10T14:00:00Z",
"end": "2026-09-10T14:15:00Z",
"amount_ucredits": …,
"source": "metered",
"note": null,
"balance_after_ucredits": 3998500000,
"charges": [
{
"kind": "burst",
"cluster": "acme-train",
"resource_id": "…",
"resource_type": "GPU_…",
"units": 8,
"unit_hourly_price_ucredits": …,
"start": "2026-09-10T14:00:00Z",
"end": "2026-09-10T14:15:00Z",
"amount_ucredits": …
}
],
"category": "usage",
"voids_ms": null,
"service_period": null,
"allocations": [
{"to": "balance", "kind": "standard", "delta_ucredits": …}
]
}
],
"next": "1757513700000.2"
}
| Field | Meaning |
|---|---|
type |
charge or deposit |
start, end |
the window the row accounts for — metering windows are about 15 minutes |
amount_ucredits |
always positive; type gives the sign |
source |
metered (the platform's compute meter), inference (Marshall model usage charged to credits), public_research (a meter row made only of Public Research pool lease entries), card (a card payment), airdrop (the credits a public research organization receives at sign-up), manual (platform-authored: a wire deposit, a grant, an adjustment, a deposit reversal) |
note |
a platform-authored note on a manual row, else null |
charges[] |
the per-resource entries a metered row is made of — empty on deposits and manual rows; they sum to amount_ucredits |
balance_after_ucredits |
the balance after this row in ledger order: the newest row's is the balance now, and each older row's is the next newer one plus a charge or minus a deposit. Rows a filter hides still move it |
category |
what the row is (categories) |
voids_ms |
on a Void, the stamp of the row it corrects (a row of the opposite type); else null |
service_period |
{start_ms, end_ms}: what the row pays for, when that differs from its own window (a deal period, a credit back, a deal correction or true-up); else null |
allocations[] |
which money the row moved, in order: to (balance, unpaid or advance), kind (the credit balance's kind, standard, restricted or promo, on a balance entry; else null) and delta_ucredits, the signed change to your total balance. They sum to the row's signed amount. Empty on rows written before your organization had credit balances |
minted[] |
on a deposit, the credit balances it created, as they were created: kind, expires_at_ms, applies_to and original_ucredits. A balance spent, expired or revoked since is still listed. Empty when the deposit created none, as when it paid debt. Absent on charges |
next |
the page cursor; pass it back as before for the next page. A full page always carries one (keyset paging cannot know whether more exists); a short or empty page ends the walk, next then null |
Charge entries¶
Each entry is one resource over one price window, so a metered row lists every node you held in that window, once per rate change:
| Field | Meaning |
|---|---|
kind |
burst: market capacity at the clearing rate. base_load: a base load block at its fixed rate. fixed: an attached node, a shared volume or the object storage bucket at the price posted for your organization. inference: one member's Marshall model usage over one metering pass. public_research: one whole node held under Public Research, at the flat rate in force when the lease was granted |
cluster |
the cluster the resource served; null on an inference or public_research entry and on an object storage bucket entry (the bucket belongs to the organization) |
resource_id |
the node's identity, reservation:<id> for a base load block, public_research:<request id> for a Public Research lease (the node rides node), the shared volume's id, or the object storage bucket's name |
resource_type |
the priced type — a GPU type, a CPU type, STORAGE_SHARED_GIB (a shared volume) or STORAGE_OBJECT_GIB (the object storage bucket). GPU and CPU type names carry the hardware model; read them from the payload |
units |
GPUs for a GPU type, nodes for a CPU type, GiB of used bytes for storage |
unit_hourly_price_ucredits |
the rate per unit-hour assessed for this window; for storage inside an agreement's storage price, that price (storage under an agreement), with nothing else on the entry to mark it |
start, end |
the entry's own window inside the row's |
principal, model, prompt_tokens, completion_tokens |
inference entries only: the member (username), the public model id the calls named, and the token counts in the pass. resource_type and resource_id are null there; units and unit_hourly_price_ucredits are 0 |
principal_kind |
inference entries only: member when a person's credential made the calls (principal is then the username). token when a credential other than a person's made them (principal is then that credential's id) |
node, site, gpus, rate_ucr_per_gpu_hour, start_ms, end_ms |
public_research entries only: the node the lease held, the site id it ran on, the node's GPUs (the billed units), the flat rate per GPU-hour fixed when the lease was granted in microcredits (the same figure as unit_hourly_price_ucredits), and the entry's window as epoch milliseconds beside start and end. resource_type is the node's GPU type |
amount_ucredits |
(end − start) / 1 h × units × unit_hourly_price_ucredits, rounded to the microcredit |
Categories¶
category says what a row is, finer than source. Rows written before
categories existed carry the category derived from their source and
note.
category |
The row |
|---|---|
usage |
the meter: capacity, storage, Marshall model usage, Public Research |
manual_charge |
a platform-authored charge |
manual_deposit |
a platform-authored deposit with no finer class |
card |
a card payment |
wire, ach, check |
a payment by wire, ACH or check |
grant |
credits granted, which become Promo credits: the sign-up airdrop, a feedback reward, a data-sharing grant, a promotion |
deal_charge |
a deal's charge for one closed period, named by service_period: its blocks' row, or one of its other charges, whose note reads Deal {id}: {description}, {days} (the UTC dates the charge ran, YYYY-MM-DD or YYYY-MM-DD to YYYY-MM-DD; at most 200 characters, the description shortened first) |
adjustment |
a deal correction or true-up for the month its service_period names (a charge or a deposit), or credits restored |
service_credit |
a credit back: credits owed to you for a service failure, naming the period it covers |
expiry |
the write-off of an expired Promo balance |
reversal |
a payment reversal |
revocation |
a revoked credit balance |
migration |
a row carried over from an earlier billing record |
void |
a Void of the row its voids_ms names |
expiry, reversal, revocation and void are not spend.
Query parameters¶
| Parameter | Meaning |
|---|---|
limit |
rows per page, 1–100; default 25 |
before |
the previous page's next (opaque) |
type |
charge or deposit |
source |
metered, inference, public_research, card, airdrop, or manual |
since, until |
a half-open window on the row's end: RFC 3339 (2026-09-01T00:00:00Z; a bare date is midnight UTC) or epoch milliseconds |
A bad value is 422 bad-request; detail names the parameter.
What the ledger read hides¶
- Metered rows totalling $0 never appear — a metering window that
cleared at $0 leaves an auditable zero row in the books, but the read
returns neither it nor a day made only of such rows. Manual $0 rows
stay (an adjustment can carry a
noteworth reading). - Who acted never leaves: a manual row names no platform operator.
sourceis the class, nothing finer.
Deposit reversals¶
A deposit reversal takes back all or part of an earlier deposit whose
payment, a wire or a card payment, was refunded or charged back. The
platform posts it; there is no API or console action for it. A
reversal is a ledger row with type charge, category reversal
and a note naming the refund, and it lowers the balance like any
charge.
A reversal takes the payment's unspent credits first. Beyond them it puts back the debt the payment had paid (an advance draw is drawn again while the advance is open, else it becomes unpaid in the advance's scope), and anything left becomes unpaid in the payment balance's own scope. Unpaid with no scope, which a Standard payment leaves, is first taken from your other credits with no restriction, soonest expiry first, then oldest; only what they cannot cover stays unpaid and puts the whole organization on hold. Locked credits are never taken.
Card payments are reversed automatically, each event booked once; a reversal never exceeds what of the payment is not reversed yet:
| Card event | What is booked |
|---|---|
| a refund, full or partial | a reversal of the payment's refunds so far, less what is already reversed on it |
| a dispute withdraws the funds (a chargeback) | a reversal of the disputed amount |
| the dispute ends with the funds returned | a deposit of category card for exactly what that chargeback took back, which pays debt first like any payment; nothing when it took nothing, as for a chargeback that arrived before automatic booking began |
A reversal is not spend. The summary nets it
against deposits: deposited_ucredits drops by its amount, and
charged_ucredits, month.charged_ucredits and the spend limit leave
it out. The ledger read and the daily totals report rows as written, so
there it is a charge on the day it posted: a day's charges_ucredits
includes it.
Daily totals¶
GET /api/billing/daily folds the ledger into one row per calendar day
in your zone, newest first:
{
"days": [
{
"date": "2026-09-10",
"start": "2026-09-10T00:00:00Z",
"end": "2026-09-11T00:00:00Z",
"today": true,
"charges_ucredits": …,
"deposits_ucredits": 0,
"transactions": 96,
"resources": [
{"kind": "burst", "resource_type": "GPU_…",
"unit_hourly_price_ucredits": …,
"units": 16, "unit_hours": 192.0}
],
"clusters": ["acme-train"],
"balance_end_ucredits": 3904000000
}
],
"next": "20706"
}
| Field | Meaning |
|---|---|
date |
YYYY-MM-DD in your zone (tz_offset_min) |
start, end |
the day's bounds as UTC stamps |
today |
the current local day — its totals are still running |
charges_ucredits, deposits_ucredits |
the day's totals |
transactions |
ledger rows folded into the day |
resources[] |
the day's charges per (kind, resource type, unit price), most unit-hours first: kind is burst / base_load / fixed / public_research as on a charge entry (inference charges fold into no resource line), units the distinct units charged that day, unit_hours their metered time |
clusters |
cluster names touched that day |
balance_end_ucredits |
the balance at the day's end; for today, the balance now |
limit counts days (1–100, default 31); before takes the previous
page's next, with the same full-page rule as the ledger. For the rows
behind a day, read the
ledger with since and until set to its bounds.
Balance and burn rate¶
GET /api/billing/balance is the one call a budget script polls: the
balance now, the hourly rate the meter last assessed your organization,
and what that rate is made of.
{
"balance_ucredits": 4213500000,
"burn_ucredits_hr": …,
"as_of": "2026-09-11T17:05:00Z",
"billing_hold": null,
"resources": [
{"kind": "burst", "cluster": "acme-train", "resource_type": "GPU_…",
"units": 16, "unit_hourly_price_ucredits": …,
"rate_ucredits_hr": …},
{"kind": "fixed", "cluster": "acme-train",
"resource_type": "STORAGE_SHARED_GIB", "units": 800,
"unit_hourly_price_ucredits": …, "rate_ucredits_hr": …}
],
"clusters": [{"cluster": "acme-train", "rate_ucredits_hr": …}]
}
| Field | Meaning |
|---|---|
balance_ucredits |
the balance now; negative when charges outran deposits |
burn_ucredits_hr |
microcredits per hour: the sum of units × unit price over every resource still held when the newest metering window closed. A node released or a rate replaced mid-window is not part of it; the entry that replaced it is |
as_of |
the close of the metering window the rate was read from; null before the first charge |
billing_hold |
the hold state the summary and the capacity reads carry, or null |
resources[] |
the rate by (kind, cluster, resource_type, unit_hourly_price_ucredits), largest first, with the units held at that price; kind is burst / base_load / fixed / public_research (a live Public Research lease, cluster null). Jobs holding nodes at different clearing rates are separate lines, so the fold says what each limit price is costing |
clusters[] |
the rate per cluster, largest first |
total_balance_ucredits, available, credit_balances, debt_ucredits, unpaid, advances, locks, fundings, notices |
the credit balances and debt block |
The rate is read from the meter, not the market, so it reconciles with
the ledger to the microcredit and covers every kind the
meter bills: burst, base load, attached nodes and storage, on VM and
Kubernetes clusters alike. The meter closes one window every 5 minutes,
about 5 minutes after the fact, so the figure is 5 to 10 minutes behind
real time and changes at most every 5 minutes; polling faster buys
nothing. The meter writes no window in which nothing was billed, so a
newest window older than 20 minutes reads as a rate of 0, with as_of
still naming it. For one Kubernetes cluster's live market rate, ahead
of the meter, read
GET /api/k8s/market/spend.
Balance over time¶
GET /api/billing/balance/history returns the balance as a series over
the last hours (1 to 8760, default 24; a value out of range is
422 bad-request). The path is the operation; hours rides the query
string.
{"start": "2026-09-10T17:10:00Z", "step_s": 300,
"balance_ucredits": [4300000000, 4300000000, 4289333333]}
step_s is the bucket width, max(300, span / 400) seconds, so a
window is at most 400 points; bucket i covers
(start + i × step_s, start + (i + 1) × step_s] and the last bucket
closes now. balance_ucredits[i] is the balance at the close of bucket
i: a balance is a step function, so buckets with no ledger event carry
the last value forward, seeded from the last event before the window,
and 0 before the first ever event. For the exact stamp of a deposit or
charge read the ledger, whose rows carry
balance_after_ucredits; for a day's closing balance read the
daily totals.
Credit balances and debt¶
The balance read and the summary carry the same block: the Billing page's breakdown of your credit balances and debt.
| Field | Meaning |
|---|---|
total_balance_ucredits |
the sum of your credit balances, locked included, minus your debt; always equal to balance_ucredits |
available[] |
available to spend per scope: scope (kind cluster with its cluster_id and cluster, inference for Marshall models, public_research for the pool on a public research organization, or org for anything else; service), label (the Billing page's line), available_ucredits and unpaid_ucredits, the unpaid that hits the scope. Gates compare available_ucredits minus unpaid_ucredits |
credit_balances[] |
open balances first, oldest first: id, kind (standard, restricted or promo), applies_to (the Billing page's line; anything when unrestricted), restriction, original_ucredits, remaining_ucredits, locked_ucredits, available_ucredits (remaining minus locked), expires_at_ms (null: never), status (open, revoked or expired), created_ms, locked_for (the reservations its locked credits fund), source ({category, reason}: the category and the note of the deposit that created the balance; null when no deposit is on record for it). A balance with nothing left is listed for 90 days after it was created |
spend_order[] |
the spend order in force for your organization, steps 2 to 5 of it: restricted, promo, standard and advances, each used up before the next where it applies. A lock or a line of credit always pays first and unpaid comes last; neither is listed |
debt_ucredits |
advance draws plus unpaid; the draws on a line of credit included |
unpaid[] |
applies_to, restriction, amount_ucredits, since_ms, and holds: the clusters this unpaid puts on hold |
advances[] |
your advances: id, applies_to, limit_ucredits, drawn_ucredits, room_ucredits (the limit less draws and the part a lock holds), invoice_id (null when none), due_at_ms, grace_until_ms, status: open (drawing through grace_until_ms), overdue (its draws turned unpaid), closed (no new draws, draws still owed) or settled (closed and repaid); purpose (rsv_funding on a funding advance, else null) and funding_id (its entry in fundings[], else null); terms (fixed on these advances), net_days (null), deal_id (the agreed deal a fixed advance was opened for, else null), alert_limit_ucredits (null), alert_crossed (false) and months ([]). An agreed deal's line of credit is an entry too, which reads these fields its own way |
locks[] |
credits locked for a Base Load block's term: reservation_id, cluster, term_total_ucredits, billed_ucredits, locked_ucredits (still locked, a rounding margin of up to 6 microcredits per hour of the term included), ends_at_ms and funding_id (the block's entry in fundings[] when it was bought under a funding window, else null). A lock is listed until it closes, after the meter has billed the block's last hours |
fundings[] |
your Reserved funding windows: every pending one, and those funded, lapsed or cancelled in the last 30 days |
notices[] |
what needs acting on (Promo credits expiring, an advance due or overdue): kind, message (the sentence the Billing page shows) and at_ms. An advance raises advance_due_soon before its due date while anything is drawn, advance_due from the due date through grace, and advance_overdue once its draws are unpaid; at_ms is the due date. Promo credits expiring within the notice window raise promo_expiring, one per expiry day, with at_ms the expiry. A funding window raises reservation_funding_due_soon from 2 days before its due date (currently), reservation_funding_due from the due date until it is funded or lapses, and reservation_funding_lapsed once it has lapsed; at_ms is the due date, or the lapse for reservation_funding_lapsed. A funding advance raises these instead of the advance notices. A line of credit raises deal_credit_due_soon from 7 days before a month's due date (by default) and deal_credit_due from the due date, one per month still owing $1.00 or more, with at_ms the due date, and deal_credit_limit while its draws are at or past its credit alert, with at_ms the crossing; never the advance notices. A hold is not a notice: read billing_hold |
A restriction is {clusters, services}: clusters as {id, name}
(a cluster since deleted reads a deleted cluster), services from
compute (which covers compute.static, compute.market and
compute.reservation), storage, inference (Marshall models) and
public_research. Money applies where it matches every list that is
set and any one entry within a list; both lists empty means anything.
A restriction to a site never names the site: alone, it lists your
clusters there in clusters; beside named clusters, only those
clusters.
When the breakdown cannot be read, its fields are absent and the rest of the body answers as usual.
Reserved funding¶
A Base Load purchase your credits could not lock in full, on an island
with a funding window,
carries one funding entry: the Billing page's Reserved funding row.
The same object rides fundings[] here, each row of the
Base Load book, and the answers of
the console's accept and Fund now actions
(deal offers).
| Field | Meaning |
|---|---|
id |
the funding's id, as funding_id on its lock and advance |
kind |
sale (a purchase), offer (an accepted deal offer) or resize (a size increase) |
status |
pending (the remainder is still due), funded (the whole price is locked), lapsed (unfunded at the deadline: the block ended at its last funded hour; of an offer's overlapping blocks, each one not funded to its end did, and a block funded to its end runs on) or cancelled (the block was cancelled before it drew any credit) |
site |
the island's opaque id |
cluster, cluster_id |
the cluster the block runs on, by name and by id |
term_total_ucredits |
the price of the whole term |
deposit_ucredits |
the deposit the purchase had to lock |
locked_ucredits |
what is locked for the block now |
remainder_ucredits |
what is still due before the deadline; 0 unless pending |
due_at, cut_at |
the due date, and the deadline: the due date plus the grace period |
funded_at, lapsed_at |
when it became funded or lapsed; else null |
reservation_ids |
the blocks it funds (one per step of an accepted offer) |
A payment that lands while a funding is pending tops its lock up by
itself; nothing on this API funds one. Fund now is a console action
for an org admin.
Line of credit¶
An agreed deal's line of credit is one
advances[] entry, the Billing page's Line of credit card. Only
the deal's own charges draw on it (its blocks, its
other charges and storage at its
price), and only a payment recorded against
the deal repays it; nothing on this API pays it. Accepting a
deal offer paid on a line of credit
opens one, and the accept answers it as credit in this shape. Its
fields read:
| Field | On a line of credit |
|---|---|
applies_to |
charges billed under your agreement |
terms |
net (each UTC month's draws fall due net_days after the month ends) or none (no due date) |
net_days |
the days after a month's end its draws fall due; null with terms none |
deal_id |
the agreed deal the line belongs to |
drawn_ucredits |
what the line's draws still owe |
limit_ucredits, alert_limit_ucredits |
the credit alert, a notice only; null when the line has none. Nothing caps the draws |
alert_crossed |
true once the draws have reached the credit alert, until they fall back below it |
room_ucredits, invoice_id, due_at_ms, grace_until_ms |
always null: each month carries its own due date |
status |
line (open: the deal's charges draw on it), closed (no new draws; months already charged still fall due) or settled (closed and repaid) |
months[] |
newest first, at most 12; one entry per UTC month the line was drawn in |
months[] field |
Meaning |
|---|---|
month |
the UTC month, YYYY-MM |
charged_ucredits |
what the deal's charges drew on the line for that month |
outstanding_ucredits |
what the month still owes, with payments matched to the oldest month first |
due_at_ms, cut_at_ms |
the due date, and the end of the grace period after it; both null with terms none |
status |
paid (nothing outstanding), open (not yet due, or no due date) or due (due and still owing) |
Balance and totals¶
GET /api/billing/summary:
| Field | Meaning |
|---|---|
balance_ucredits |
the total balance; negative when charges outran deposits |
deposited_ucredits, charged_ucredits |
lifetime totals. Deposit reversals, expiries and revocations net against deposits and never count as charges (a revocation written before credit balances existed still counts as a charge); each Void counts in the class of the row it corrects, so a voided charge lowers charged_ucredits and a voided deposit lowers deposited_ucredits |
month |
start, end, and charged_ucredits for the current calendar month in your zone, deposit reversals, expiries, revocations and voided deposits left out. A charge voided this month and the credits back issued this month are netted against it, whichever month the charges they offset fell in. pledged_ucredits is what live blind auction bids and won weeks still hold on your credits; the spend limit counts it beside charged_ucredits |
spend_limit_ucredits |
the monthly spend limit, or null; set on the console, or tightened by token |
spend_limit_used_pct |
month.charged_ucredits plus month.pledged_ucredits as a percentage of the limit, one decimal; null without a limit. The console's limit bar warns at 75 and turns critical at 99. The value can exceed 100 |
billing_hold |
the hold state, or null — the same object the capacity read carries |
spend_limit_enforced |
true when reaching the spend limit holds your organization's capacity. false when the platform records the limit and does not act on it for your organization's clusters; the cap is then the instruction a person gave the agent and nothing else stops it |
billing_hold_enforced |
true when running out of credits holds your organization's capacity. false when the platform records the balance and does not hold on it for your organization's clusters. spend_limit_enforced requires it |
base_load |
true when your organization is on a base load arrangement |
purchases |
true when self serve credit purchases are open to your organization on the console's Billing page |
payment_method |
the card on file as {brand, last4}, or null when none is saved |
card_max_usd, card_window_days |
the card cap: your organization's card payments may total card_max_usd USD inside any rolling card_window_days days (currently $100,000 per 7 days). Every card payment counts, checkout and auto reload alike |
card_window_remaining_usd |
whole dollars a card payment can still carry right now: the cap minus the card payments inside the window, never negative. It rises as payments age out of the window |
card_window_blocked |
true while card_window_remaining_usd is below the smallest purchase: no card payment goes through right now |
min_usd, max_usd |
the smallest and the largest single checkout, whole dollars (platform constants; the card cap still applies) |
auto_reload |
the auto reload setting (the Billing page's Auto top-up): enabled, threshold_ucredits, amount_ucredits, last (status, reason, at) for the newest attempt whether or not auto reload is enabled now (null before the first), and cooldown_until: the stamp until which a failed attempt pauses new ones, or null |
wire |
the wire transfer rail, or null while purchases is false |
recent_deposits[] |
the last 20 deposits: at, amount_ucredits, source (card, airdrop or manual) |
inference |
Marshall model usage charged to credits, dollars with cents: billed (true when model usage can be charged to the organization's credits; false when the organization's account setup covers it), charging (true when the caller's own model usage is charged right now; for an org token, whenever billed is true), charged_month_to_date_usd and charged_lifetime_usd (the organization's charged model usage) |
public_research |
Public Research leases, as {gpu_hours_month_to_date, charged_month_to_date_usd}: GPU-hours this calendar month from the lease records (an open lease counts up to now; a free rate still counts) and the charged amount from the ledger's public_research entries, dollars with cents. Both null while the ledger cannot be read. The MCP billing_read summary view carries the same object |
total_balance_ucredits, available, credit_balances, debt_ucredits, unpaid, advances, locks, fundings, notices |
the credit balances and debt block |
membership |
your organization's membership level: how it is held, this month's progress, the membership fee, what the level includes and every level's figures; absent where membership is not turned on |
runway |
how long the balance lasts at the last 24 hours' usage charges, with your organization's low balance email setting (runway); absent when notifications are not available to your organization |
These read what the console's balance card shows. The writes start three of the console's actions for a person (buying credits, saving a card, opening the payment portal), tighten the spend limit and configure auto reload.
Hold state¶
billing_hold is one object on the summary, the balance read
and the capacity reads, or null when nothing holds or counts down.
| Field | Meaning |
|---|---|
state |
hold: an active hold. grace: a countdown to a hold |
reason |
balance (the balance at or below zero), spend_limit (the month's charges at spend_limit_ucredits), or balance+spend_limit (both at once) |
stage |
hold only. notice: growth is blocked and nothing is reclaimed yet. enforce: capacity is being reclaimed |
enforce_after_ms |
hold only: epoch milliseconds when stage turns enforce |
remaining_min |
grace only: minutes until the hold opens. The grace is 0 by default, so this state is rare |
base_load_min |
present only while your organization holds at least one live base load block without a lock during a balance condition on the whole organization: minutes left before its unlocked base load blocks are cancelled, all at the same moment. A locked block is never cancelled for the balance |
scope |
org: the whole organization is held. units: only what units lists is held (per cluster holds). Absent for an organization whose money is one pool, where every hold is the whole organization |
units[] |
scope units only, one entry per held unit: unit (cluster, or inference for Marshall models), cluster_id and cluster (null on inference), cause, unpaid_ucredits, available_ucredits, and the unit's own stage and enforce_after_ms. Marshall models are refused at once: their entry reads enforce with enforce_after_ms null |
A unit's cause:
cause |
Meaning |
|---|---|
unpaid |
usage there is unpaid, an advance's draws past their due date and grace included (unpaid_ucredits) |
no_eligible_credits |
it runs paid usage and nothing available to spend can pay for it |
On a units hold, reason reads balance, stage reads enforce
once any unit is enforcing, and enforce_after_ms is the earliest
unit's edge (null when only Marshall models are listed). Each unit
lifts on its own.
Credits that apply to the held scope, or a payment, cure a balance
condition. Only a raised or cleared limit, or the month rolling over,
cures a spend_limit one. billing_hold_enforced and
spend_limit_enforced say whether either can open for your
organization at all.
The capacity reads (VM capacity, the
limit price read and the
cluster pages) carry the hold that applies to
their cluster: a hold on the whole organization, or a units hold that
lists the cluster, in full. A units hold that lists only other
clusters, or only Marshall models, reads null there.
Wire transfer¶
wire carries what the console's Billing page shows under Wire
transfer, for amounts the card cap refuses. It is null while
purchases is false: an organization on a reserved arrangement pays
by invoice.
| Field | Meaning |
|---|---|
bank_name, aba_routing, bank_address |
the receiving bank; aba_routing serves domestic wires and ACH |
aba_routing_alt |
the routing number to use when the sending bank does not recognize aba_routing |
swift_bic, intermediary_swift_bic |
international wires: the receiving bank's SWIFT code and the intermediary bank the wire must name |
beneficiary_name, account_number, account_kind, beneficiary_address |
the beneficiary |
reference |
your organization's memo for the current UTC day. It rolls at midnight UTC: read it on the day of the wire. It must ride the wire's reference or memo field, or the deposit is not matched to your organization promptly |
notify_email |
the address to email when the wire is sent |
The bank and beneficiary values are platform constants and appear on this wire and the console only.
Membership¶
membership is your organization's
membership level: the level and the path that gives
it, whether your organization is
grandfathered, this
month's progress, the membership fee, a grant, what the level includes,
every level's figures for your organization, and the notices
the Billing page shows. It is the object the console's Billing and
Compare pages render, and the MCP billing_read summary view and the
grid_api path /api/billing/summary carry it unchanged. Money is
dollars with cents; dates are UTC days, YYYY-MM-DD. The field is
absent where membership is not turned on, and absent when the read
fails.
{
"known": true,
"level": "max",
"path": "spend",
"earned": "max",
"held_through": "2026-12-31",
"next_level": "pro",
"next_level_at": "2027-01-01",
"month": "2026-11",
"grandfathered": false,
"grandfathered_since": null,
"progress": {
"spend_usd": …, "paid_deposits_usd": …, "paid_consumption_usd": …,
"avg_balance_usd": …, "running_floor_usd": …,
"next": {"level": "ultra", "spend_usd": …, "balance_usd": …},
"next_by_path": {"spend": {"level": "ultra", "usd": …},
"balance": {"level": "pro", "usd": …}},
"bars": {"spend": {"pro": …, "max": …, "ultra": …},
"balance": {"pro": …, "max": …, "ultra": …}},
"streak": {"days": 0, "need_days": 7}
},
"buyin": {"active": false, "status": null, "level": null,
"interval": null, "period_end": null,
"cancel_at_period_end": false, "can_resume": false,
"pending_level": null},
"grant": {"level": null, "kind": null, "ends_at": null},
"benefits": {"marshall_weekly_usd": …, "marshall_unlimited": false,
"workspace_size": "…", "workspaces_per_member": 1,
"managed_compute": true, "managed_compute_kept": false,
"site_storage_tib": …,
"site_cpu_nodes": 0, "resource_monitoring": true,
"grafana": true, "reserved_capacity": true,
"reserved_on": ["managed"], "reserved_required": null,
"rate_multiplier": 2},
"compare": [{"level": "public", "invite_only": false, "qualify": null,
"buyin": null, "benefits": {…}}, …],
"notices": []
}
| Field | Meaning |
|---|---|
known |
false while the platform is still computing levels, or could not read this one: level, path, earned, held_through, next_level, next_level_at, progress and benefits are then null and notices is empty, while month, grandfathered, grandfathered_since, buyin, grant and compare still read |
level |
public, pro, max, ultra or steward |
path |
what gives the level: spend or balance (earned), bought (a membership fee), granted, steward, steward_tail (Ultra for one calendar month after a Steward term ends), rule (Pro for a Public Research organization) or public. When several paths give the same level, the first of steward, granted, bought, spend or balance, steward_tail and rule is named |
earned |
the level spend and balance alone give, through the hold and soft landing, whatever the other paths add |
held_through |
the last day the level holds when nothing new happens; null when nothing is scheduled to lower it |
next_level, next_level_at |
the next scheduled change to the level and the day it takes effect; both null when none is scheduled |
month |
the calendar month progress covers, YYYY-MM, UTC |
grandfathered |
boolean, never null: true when your organization existed when membership launched and keeps the access it had then at every level (grandfathered organizations); false for an organization created after launch, and for one whose grandfathering National Compute ended |
grandfathered_since |
the UTC day your organization's grandfathering was recorded, YYYY-MM-DD; null when grandfathered is false |
progress |
this month so far: spend_usd (the larger of paid_deposits_usd and paid_consumption_usd), avg_balance_usd (the average daily paid balance so far), running_floor_usd (the daily values so far over all the days of the month), next (the level above yours with its spend and balance figures, null at Ultra and Steward), next_by_path (the next level on each path alone, as {level, usd}, null at its top), bars (every level's spend and balance figures), streak (days: completed days in a row at next_by_path.balance's figure; need_days: how many make a streak) |
buyin |
the membership fee: active (a subscription is live, even while a payment is late), status (the subscription's state, null without one), level, interval (month or year), period_end, cancel_at_period_end, can_resume (true while the fee is set to end at period_end and a member can still keep it on the console) and pending_level (a downgrade waiting for the period's end) |
grant |
the highest live grant: level, kind (admin, platform, status_match or steward) and ends_at (its last day, null when permanent); every field null without one |
benefits |
what your organization has at its level, with its figures: marshall_weekly_usd (the weekly Marshall allowance per member; null when unlimited), marshall_unlimited (true: unlimited up to a fair-use ceiling), workspace_size (<cpus>:<GiB>G of one workspace), workspaces_per_member (1 at every level: a member runs one workspace), managed_compute (true from Max, and at every level when grandfathered is true: your organization can get new managed clusters, Kubernetes or Slurm), managed_compute_kept (true below Max while your organization is not grandfathered and holds live managed clusters: it keeps every one with full access, and a new one needs Max; false otherwise, always false when grandfathered is true), site_storage_tib (shared volume storage included at the site this month), site_cpu_nodes (CPU nodes included at the site this month), resource_monitoring (true from Max: its GPU and host dashboards need managed compute), grafana (every level; a VM cluster's Your nodes board), reserved_capacity (true when your organization can buy reserved capacity now: from Pro, or within a grace period, on a managed cluster it has; from Max without one, since a base load block runs on a managed cluster and a new one needs Max; at every level when grandfathered is true), reserved_on (["managed"] whenever reserved_capacity is true: base load blocks on a managed cluster your organization has; empty otherwise), reserved_required (the level your organization needs before it can buy reserved capacity: pro when it has a managed cluster, max when it has none; null when reserved_capacity is true) and rate_multiplier (the token API and MCP request budget multiplier). The other benefits are the level's, grandfathered or not. These say what your organization has; the Base Load book's checkout_open says whether self-serve buying is open where the cluster runs |
steward |
present only on a Steward organization; your account team explains its fields |
compare[] |
one entry per level, public to steward, with your organization's figures: level, invite_only (true for Steward), qualify ({spend_usd, balance_usd}, null for Public and Steward), buyin (the membership fee's monthly and yearly figures, the members included, the per-member add-on and whether it can be invoiced, then what your organization pays for the level now: members (its members), extra_members (those beyond the members included, never below 0), org_month_usd and org_year_usd (the fee plus the per-member add-on for each extra member); null for Public and Steward) and benefits (the level's own benefits by the names above, the same whether or not your organization is grandfathered, without managed_compute_kept and reserved_required, which are your organization's own, and except that reserved_capacity is the level's for an organization with no managed cluster yet, true from Max, and that site_storage_tib is Max's included storage, Ultra and Steward give site_storage_tib_per_musd and site_cpu_nodes_per_musd per million dollars of the previous month's paid spend, site_cpu says whether the level includes site CPU nodes, and first_access_new_capacity is true for Steward) |
notices[] |
the notices the Billing page shows: kind, message (the sentence shown) and at (the day the change takes effect). kind is one of four: soft_landing (an earned level steps down at the coming month boundary), grant_expiring (a granted level, Steward or its Ultra month ends), exemption_ending (the grace period of an organization created after launch ends within the notice window while its requirement is in force; at is its end day; never when grandfathered is true) and reduction_notice (a change to what a level includes, when one is announced before it takes effect; advance notice of a change is not guaranteed) |
The object is read only on every wire: buying, changing, cancelling or keeping a membership fee is a console action for a person, with no route on the token API and no MCP tool.
Runway¶
runway is the projection the console's Billing page shows beside the
balance and the one the low balance email
reads: the balance drained at the last 24 hours' usage charges, with
each Promo balance counted only until it expires
(the projection). The MCP
billing_read summary view and the grid_api path
/api/billing/summary carry it unchanged. It is absent when
notifications are not available to your organization.
"runway": {"state": "ok", "hours": 130.75,
"figure_ucredits": 523000000, "spend_24h_ucredits": 96000000,
"as_of_ms": 1762531200000,
"low_balance": {"enabled": true, "mode": "runway",
"runway_days": 3, "amount_ucredits": null}}
| Field | Meaning |
|---|---|
state |
the first that holds: not_metered (your organization's usage is not billed to its credits, so the balance is never checked; the numbers still read); empty (figure_ucredits at or below zero); below (under your organization's low balance threshold, whether the email is on or off); idle (above the threshold, with no usage charges in the last 24 hours); ok. unknown when the read failed: the numbers are then null |
hours |
hours until figure_ucredits reaches zero at the 24-hour rate, two decimals. null whenever there were no usage charges in the last 24 hours, whatever the figure; otherwise 0 when figure_ucredits is at or below zero |
figure_ucredits |
the balance the projection drains: the total balance for an organization whose money is one pool, else the available to spend for anything else less the unpaid that hits it |
spend_24h_ucredits |
the usage charges of the last 24 hours (category usage), less storage a line of credit pays |
as_of_ms |
when the figures were read |
low_balance |
the low balance email's setting in force, saved or default: enabled (null when the setting could not be read; the rest then shows the default), mode (runway or amount), runway_days and amount_ucredits (null when unset). Change it in Billing alerts on the Billing page or with notifications_write |
Payment history¶
GET /api/billing/payments lists the money your organization sent,
newest first: card payments, and the wire, ACH and check payments the
platform recorded when the money arrived. Grants, welcome credits,
credits back and adjustments are not payments and are not listed; the
ledger has them. The console's Billing page shows the
same rows on its Payments tab.
{
"payments": [
{"id": "…", "at": "2026-11-03T16:20:00Z", "kind": "card_purchase",
"method": "card", "card": null, "invoice_id": null,
"status": "paid", "amount_ucredits": 1000000000,
"decline_reason": null, "receipt": true}
],
"next": null,
"year": 2026,
"paid_year_ucredits": 1000000000
}
| Field | Meaning |
|---|---|
id |
opaque and stable; pass it to the receipt route |
at |
when the payment landed on the ledger (for a wire, when the money arrived); for a declined or processing row, when the charge was tried |
kind |
card_purchase (a one time card payment), auto_topup (an auto reload charge), monthly_plan (a cycle of the retired monthly plan), wire, ach or check |
method |
card, wire, ach or check |
card |
always null on the list; the receipt route answers the card that paid |
invoice_id |
the invoice the payment paid, yours or one we issued: the one its memo named, or the one we marked paid by it; else null |
status |
paid (the credits landed), declined (the card was declined and no credits moved), processing (an auto reload charge still in flight), refunded (the whole amount was taken back) or disputed (a card dispute withdrew it and has not been won back) |
amount_ucredits |
the payment's amount |
decline_reason |
why a declined row was declined; else null |
receipt |
true when the receipt route has a document for the payment |
refunded_ucredits |
present when part or all of the payment was taken back: how much. A partly refunded payment keeps status paid |
year, paid_year_ucredits |
the current UTC calendar year and what was paid in it across every page: the paid rows' amounts less what was refunded of them |
next |
the page cursor; pass it back as before. null ends the walk |
A declined card payment is a row of its own, whether a person tried it
(card_purchase) or auto reload did (auto_topup). A payment that goes
through afterwards is a separate paid row, and the declined row
stays. limit counts payments (1–100, default 50). A page never splits
payments that share one stamp, so it can run past limit.
GET /api/billing/payments/{payment_id}/receipt answers {url, card}
for a payment whose receipt is true. For a card payment made on the
Billing page, url is the card processor's hosted receipt page and
card is {brand, last4} (null when the processor reports none),
read from the processor on each call. For any other payment that paid
one of your invoices (a wire, ACH or check, or a card payment we
recorded), the answer is {url} alone, the path of that invoice's
PDF. An unknown id, another organization's
id and a payment with no receipt are the same 404 not-found. Read it
for the payment a person asks about, not for every row.
Statements¶
A statement is one UTC month of your organization's credits, opening balance to closing balance, the document the Billing page's Activity tab downloads. Each month answers as JSON, PDF or CSV:
| Route | Answers |
|---|---|
GET /api/billing/statements |
the months list |
GET /api/billing/statements/{month} |
the statement, application/json |
GET /api/billing/statements/{month}.pdf |
the PDF, application/pdf, as an attachment |
GET /api/billing/statements/{month}.csv |
the CSV, text/csv; charset=utf-8, as an attachment |
{month} is YYYY-MM, a UTC month from your organization's first
month with a ledger entry through the current one. Downloads are named
National_Compute_statement_<org>_<YYYY-MM>.pdf or .csv, where
<org> is the first 8 characters of your organization's id. Every
answer carries Cache-Control: no-store, refusals included. A
statement is built from the ledger on request and nothing is stored.
The JSON, PDF and CSV of one month share one build, which later reads
reuse for up to 10 minutes (currently) while nothing it was built from
has changed; generated_at_ms says when it ran.
curl -OJ -H "Authorization: Bearer $NC_TOKEN" \
https://nationalcompute.com/api/billing/statements/2026-10.csv
Statements are metered per organization, over any 60 seconds, by three budgets (currently):
budget |
Limit | What counts |
|---|---|---|
statements |
30 a minute | every statement request, JSON, PDF or CSV, on every route: these, the MCP billing_read statement view and a member's download on the console. A request answered from a build already made counts, and so does a malformed month |
months |
60 a minute | every months list read on every route, the MCP statements view and grid_api included |
builds |
6 a minute | a fresh build that these routes or the MCP statement view start. A request answered from a build already made or already running, a malformed month and a statement-busy refusal spend none |
A request refused before it reaches a budget (a bad token, or
statements not available to your organization) spends nothing. Past a
budget the answer is 429 rate-limited, with budget naming it and
retry_after_s and a Retry-After header giving the seconds until the
oldest request ages out of the minute. The token's own request budget
still applies; its 429 carries no budget.
| Status | Code | When |
|---|---|---|
404 |
not-found |
a month before your organization's first ledger month or after the current one, with a detail; every route reads exactly {"error": "not-found"}, with no detail, while statements are not available to your organization |
422 |
bad-month |
{month} is not YYYY-MM; it spends the statements budget and no build |
429 |
rate-limited |
past a budget above (budget names it) or the token's request budget; wait retry_after_s |
500 |
statement-untied |
the statement's lines did not add up to its balances, so nothing was produced; the failure is logged for the platform team, and a retry against the same ledger gives the same answer: contact support |
503 |
statement-busy |
the server is building as many statements as it runs at once, your organization already has a build running (for any month), or too many requests are already waiting on the same build; wait retry_after_s (5) |
503 |
statement-timeout |
the build ran past its deadline (about 20 seconds); wait retry_after_s (5) |
503 |
unavailable |
the ledger could not be read, or the statement could not be produced (detail "The statement could not be produced. Try again shortly."); wait retry_after_s (5) |
A refusal is {"error": code, "detail": words}, detail a sentence a
person can read. rate-limited, statement-busy,
statement-timeout and unavailable add retry_after_s and the
matching Retry-After header.
The months list¶
{
"enabled": true,
"basis": "utc",
"months": [
{"month": "2026-11", "label": "November 2026", "status": "preliminary",
"start_ms": …, "end_ms": …,
"opening_ucredits": …, "closing_ucredits": …,
"by_class": true,
"json_path": "/api/billing/statements/2026-11",
"pdf_path": "/api/billing/statements/2026-11.pdf",
"csv_path": "/api/billing/statements/2026-11.csv"}
],
"now_ms": …
}
| Field | Meaning |
|---|---|
enabled |
true on every answer |
basis |
utc: months are UTC calendar months on a posting basis |
months[] |
newest first, from the current UTC month back to your organization's first month with a ledger entry, at most 36 (currently); [] when the organization has no ledger entry |
month, label |
YYYY-MM and the month's name |
status |
preliminary, closed or revised (status) |
start_ms, end_ms |
the month's bounds, UTC |
opening_ucredits, closing_ucredits |
the month's opening and closing balance, exact: the figures its statement carries |
by_class |
true when the month carries the funding split and the balance by class |
json_path, pdf_path, csv_path |
the month's three routes |
now_ms |
the server's clock when the list was read |
The statement¶
GET /api/billing/statements/{month}, shortened:
{
"enabled": true,
"month": "2026-10", "label": "October 2026", "basis": "utc",
"period": {"start_ms": …, "end_ms": …,
"first_day": "2026-10-01", "last_day": "2026-10-31"},
"status": "closed",
"generated_at_ms": …,
"version": "…",
"account": {"org_id": "…", "name": "…", "address": ["…"]},
"summary": {"opening_ucredits": …, "credits_added_ucredits": …,
"usage_ucredits": …, "other_charges_ucredits": …,
"corrections_ucredits": …, "closing_ucredits": …,
"billing_spent_ucredits": …},
"credits_added": {"by_type": […], "lines": […]},
"usage": {"by_sku": […], "daily": […], "by_cluster": […],
"funding": {…}, "lines": […]},
"other_charges": {"lines": […]},
"corrections": {"lines": […]},
"by_class": {…},
"entered_after_close": […],
"late_check": "ok",
"notes": ["…"],
"downloads": {"pdf_path": "…", "csv_path": "…"}
}
| Field | Meaning |
|---|---|
enabled, month, label, basis |
as on the months list |
period |
the month's bounds (start_ms, end_ms) and its first and last UTC days |
status |
preliminary, closed or revised |
generated_at_ms |
when the build ran |
version |
16 hex characters fingerprinting the statement's content (everything but generated_at_ms, version and downloads), so a closed month keeps it until its content changes; printed on every PDF page and every CSV row |
account |
org_id, and name and address[] from the billing profile; without a profile, your organization's display name and no address |
summary |
opening_ucredits + credits_added_ucredits − usage_ucredits − other_charges_ucredits + corrections_ucredits = closing_ucredits, always; corrections_ucredits is signed, positive when corrections gave credits back. billing_spent_ucredits is the tie-out line, Charged this month as Billing counts it (UTC) |
credits_added.by_type[] |
type, label, count and amount_ucredits, one per type present |
credits_added.lines[] |
one per credit added: posted_at_ms, type, label, description, reference (on a payment, its id in the payment history, pay_<ms>; else null), invoice_id (the invoice it paid; else null), credit_kind (the credit balance kind it created; null when it created none, as when it paid debt), expires_at_ms (null when the credit never expires or none was created), service_start_ms and service_end_ms (null without a service period), amount_ucredits, ledger_ref, entered_after_close |
usage.by_sku[] |
the month's metered usage per SKU: sku, product, product_label, resource_label, label, unit, quantity and amount_ucredits. Where metered entries' itemized lines do not add up to the entries, the difference is the SKU other:unitemized (product other, product_label Not itemized, resource_label "", label Usage not itemized), with unit and quantity "" and a signed amount; it sorts last |
usage.daily[] |
the same usage per UTC posting day, the not itemized line included: day (YYYY-MM-DD), total_ucredits, and lines[] per SKU (sku, label, unit, quantity, amount_ucredits) |
usage.by_cluster[] |
cluster and amount_ucredits, for the usage whose entries name a cluster; usage with no cluster (Marshall models among it) is in no line, so these sum to at most the itemized SKUs' total (every SKU but other:unitemized); a negative Usage not itemized line can leave them above the by_sku total |
usage.funding |
how the month's usage was paid: paid_ucredits, promo_ucredits (promotional and service credits), advance_ucredits (drawn on an advance or a line of credit), unpaid_ucredits and unallocated_ucredits (not yet matched to the money that pays it), which sum to summary.usage_ucredits |
usage.lines[] |
the usage that is an entry of its own rather than metered: posted_at_ms, type, label, description, amount_ucredits, service_start_ms and service_end_ms (null without a service period), ledger_ref, entered_after_close |
other_charges.lines[] |
posted_at_ms, type, label, description, amount_ucredits, ledger_ref, entered_after_close |
corrections.lines[] |
the same fields, amount_ucredits signed as in summary, plus links_to: the entry it corrects, {ledger_ref, posted_at_ms, label, amount_ucredits}, or null where no entry is linked (credits restored, and older payment reversals) |
by_class |
classes[]: all five classes, always, in the order paid, promo, unpaid, advance, line_of_credit, each with class, label, owed (true for an amount owed), opening_ucredits, closing_ucredits and movements[] (label, amount_ucredits; only the movements that moved it). A movement's label is Credits added, Applied to amounts owed, Usage, Expired or revoked, Corrections, Overdue advance moved to unpaid usage or Balance moves. expiring[]: up to 5 {expires_at_ms, amount_ucredits}, the next expiry times of the promotional and service credits still held at the month's end (now, on the month in progress) and the amount expiring at each. locked_ucredits: on the month in progress, the credits locked in your balances plus the amounts reserved on your advances; null on every other month. The credit classes' closing balances less the owed classes' equal summary.closing_ucredits, and the same for the opening |
entered_after_close[] |
the entries dated in the month and found written after it closed (the late rule), from every section: ledger_ref, posted_at_ms, label (Usage for a metered entry) and amount_ucredits, signed as the entry moved the balance |
late_check |
ok (checked; none found), late (found; status is revised) or not_checkable (neither close mark exists yet, or the month holds entries written before your organization had credit balances) |
notes[] |
the notes the PDF prints: the basis, the corrections rule, the rounding, the tie-out rule, the card refund note, membership fees, the clocks, not an invoice, and the status where it needs one |
downloads |
pdf_path and csv_path |
usage.funding and by_class are never null. They carry their
figures only with available true; with false, the figures are
absent and reason is the sentence the PDF prints in their place:
the month comes before the funding split and the balance by class (the
months list's by_class is false), an allocation names money the
statement cannot read, the split or the classes do not tie to the
ledger, or, for by_class, Breakdown unavailable: some entries are
not allocated yet.
Line amounts are positive, and the summary says which way each
section moves the balance. Signed are a correction's amount, an
entered after close entry's, and Usage not itemized; a class's
movements[] take it from its opening to its closing. The summary's
and the months list's balances are negative when more is owed than
held; an owed class's balance is the amount owed. quantity is a
decimal string with 6 places, in the Usage tab's units, which unit
names: GPU-hours, node-hours, GiB-hours, unit-hours or, for
Marshall models, tokens. sku is
<product>:<resource type number> for capacity and storage, or
inference:<model> for Marshall models; label reads
<product label> · <resource label>, or Marshall models · <model>.
ledger_ref names the ledger entry as <type>/<ms>: 1 for a charge,
2 for a deposit, then its stamp in epoch milliseconds.
Line types¶
| Section | type |
label |
The line |
|---|---|---|---|
| credits added | card |
Card payment | a card payment made on the Billing page, or one we recorded |
| credits added | auto_topup |
Card payment (auto top-up) | an auto reload charge |
| credits added | wire, ach, check |
Wire transfer, ACH transfer, Check | a payment recorded when the money arrived, or a platform-authored deposit from before your organization had credit balances that our finance team classed as paid and whose note names the method |
| credits added | welcome |
Welcome credits | the credits a public research organization receives at sign-up |
| credits added | reward |
Rewards | a feedback reward or a data-sharing credit |
| credits added | promo |
Promotional credits | a grant, or a platform-authored deposit our finance team classed as promotional |
| credits added | credit_back |
Credit back | credits owed to you, naming the period they cover (corrections), or a platform-authored deposit our finance team classed as a service credit |
| credits added | true_up |
Agreement adjustment | an agreement true-up in your favor |
| credits added | legacy |
Credits added | a platform-authored deposit our finance team has not classed; its note is the description |
| credits added | legacy_paid |
Credits added (paid) | a platform-authored deposit our finance team classed as paid, read as no particular method |
| credits added | other |
Other credits | any other deposit |
| usage | agreement |
Agreement charge | an agreement's charge for one closed period: its blocks, or one of its other charges |
| usage | whole_system |
Whole system term | |
| usage | auction_leftover |
Auction charge | the rest of a won week taken back, charged as one entry |
| usage | true_up |
Agreement adjustment | an agreement true-up against you, naming the month it corrects |
| usage | manual |
Manual charge | a platform-authored charge, or any charge no other type names; on a platform-authored charge its note is the description |
| other charges | expiry |
Promo credits expired | what was left of a Promo balance at its expiry |
| other charges | revocation |
Credits revoked | what was left of a revoked credit balance |
| corrections | void_charge |
Charge voided | a Void of a charge, giving its amount back |
| corrections | void_deposit |
Payment voided | a Void of a deposit, taking it back |
| corrections | void_writeoff |
Write-off undone | a Void of an expiry, a revocation or a payment reversal |
| corrections | card_refund |
Card refund | a card payment refunded |
| corrections | chargeback |
Chargeback | a card dispute withdrew a payment |
| corrections | chargeback_reversed |
Chargeback reversed | the dispute ended with the funds returned; never a second card payment |
| corrections | payment_reversed |
Payment reversed | any other payment reversal |
| corrections | credits_restored |
Credits restored | credits given back after a revocation |
| by class | paid |
Paid credits | credits that came from a payment; not owed |
| by class | promo |
Promotional and service credits | every other credit, such as Promo grants, welcome credits, rewards and credits back; not owed |
| by class | unpaid |
Unpaid usage | unpaid; owed |
| by class | advance |
Advance | draws on an advance; owed |
| by class | line_of_credit |
Agreement line of credit | draws on an agreement's line of credit; owed |
A usage SKU's product is reserved (Reserved capacity), market
(Pay-as-you-go), dedicated (Dedicated capacity), storage (Shared
storage), public_research (Public Research), inference (Marshall
models) or other (Not itemized).
Spend per workload¶
GET /api/billing/usage/workloads?range=7d re attributes charge
entries to the jobs and pods that occupied the charged nodes, from the
platform's occupancy samples. The figures are approximate by design:
idle capacity and spend that cannot be attributed ride as their own
labeled series, never smeared across jobs.
| Parameter | Meaning |
|---|---|
range |
one of 1d, 7d, 30d, 90d, mtd, ytd, lastmonth (default 7d); anything else is 422 bad-request |
tz_offset_min |
the calendar the buckets use, as on the other reads |
The response carries starts[] (one stamp per bucket) and end,
labels[] (HH:00 for 1d, MM-DD otherwise), today_index (the
bucket holding today, null for lastmonth), and groups with two
groupings, workload and user. Each grouping has order[], series
(per name: spend[] in microcredits and unit_ms[], milliseconds of
unit time, per bucket) and meta (per name: label, who, cluster,
unit, handover_ucredits; the user grouping adds workloads, how
many workloads the user ran). who names the person who started the
workload: the Slurm username, or the creator of the Kubernetes object
as the cluster's audit log recorded it (the console's "Started by").
A workload with no recorded creator carries its Helm release or app
group instead. A workload with neither carries an empty who, and the
user grouping lists it under "No user recorded". Series names are
workload ids plus three sentinels: IDLE (held capacity no job used),
UNATTRIBUTED (spend no sample explains) and OTHER (the fold of the
smaller workloads, the way the console's chart folds them). The payload
is served through a cache: cache_age is its age in seconds, and
stale: true means a refresh is in flight, so read again in a moment
for fresh figures.
by_product carries the same two groupings over one product's spend
alone, as {product: {workload, user}}, for the products the range
bills node time under: reserved (base load blocks), market (burst
capacity), dedicated (attached nodes at the price posted for your
organization) and public_research (Public Research leases). A payload
computed before the field existed answers without it until its next
refresh.
A range nobody has read yet is computed on first request. When the
computation takes more than a few seconds, the call answers
202 Accepted with {"pending": true, "retry_after_s": 3} and a
Retry-After header instead of holding the connection. Poll the same
URL after that many seconds. The 200 lands once the figures are
ready, and later reads of the same range come from the cache.
Prices in force¶
GET /api/billing/rates lists every resource type priced specifically
for your organization right now:
{"rates": [
{"resource_type": "GPU_…", "label": "…", "unit": "GPU",
"unit_hourly_price_ucredits": …, "since": "2026-09-01T00:00:00Z"}
]}
unit is GPU, CPU, node, or GiB (a storage price). Burst capacity does not appear here —
it bills at the clearing rate,
which the price feed publishes.
A public research organization also sees its
Public Research rate as one line per
site that offers the program: resource_type the node's GPU type,
label Public Research · <GPU model> GPU, unit GPU,
unit_hourly_price_ucredits the flat rate a lease granted now is
fixed at, and since the stamp the rate was last set. A free rate is
listed at 0; a standard organization never sees the line. The MCP
billing_read rates view carries the same rows.
Writes¶
The five writes are the console's billing actions an agent starts for the person it works for. Bodies are JSON; every amount is a whole number of dollars.
curl -X POST -H "Authorization: Bearer $NC_TOKEN" \
-H "Content-Type: application/json" -d '{"usd": 250}' \
https://nationalcompute.com/api/billing/checkout
{"url": "https://checkout.stripe.com/c/pay/…"}
| Route | Body | What comes back |
|---|---|---|
POST /api/billing/checkout |
{"usd": 250} |
a hosted payment page URL ($1 = 1 credit). Hand it to a person; the page never offers the organization's saved card, the person enters a card, so the URL alone cannot pay. The deposit lands on the ledger when they pay, so read the summary again afterwards. Card payments are capped at card_max_usd total per rolling card_window_days days per organization. card_window_remaining_usd on the summary is what a card can still carry right now. Larger amounts go by wire transfer |
POST /api/billing/setup |
none | a hosted page URL that saves a card and charges nothing. The on ramp for auto reload |
POST /api/billing/portal |
none | the payment portal URL: receipts and card changes. Before the first purchase there is no customer record to manage |
PUT /api/billing/limit |
{"usd": 500} |
{"ok": true, "spend_limit_ucredits": 500000000}. Sets the monthly spend limit where none exists, or lowers the one in force |
PUT /api/billing/reload |
{"enabled": true, "threshold_usd": 50, "amount_usd": 150} |
{"ok": true, "enabled": true, "threshold_ucredits": 50000000, "amount_ucredits": 150000000}: the setting as stored. Tightens the auto reload setting: lowers amount_usd, raises threshold_usd, or disarms it with {"enabled": false} (nothing else needed; the stored amounts stay for the next enable). A write that changes nothing is a no op |
The spend limit is the cap a person sets on the month's charges
(month.charged_ucredits: a deposit reversal, an expiry or a revocation never counts toward it,
and a voided charge or a credit back lowers it in the month it is voided or issued).
month.pledged_ucredits, what live
blind auction bids
and won weeks still hold on your credits, counts toward the limit beside it. Read
spend_limit_enforced on the summary before relying on it. When it is
true, reaching the limit holds capacity until the month's charges
plus what is pledged fall back under it: the limit is raised, the month
rolls over (charges restart; pledges carry over), or a
pledge is released (a bid
withdrawn or lost). When it is false, the platform records the
limit and does not act on it for your organization's clusters. The
flag differs between organizations: read it, never assume it. A token
may only tighten the limit:
raising the limit, or clearing it with null, is refused
403 session-required and stays a console action. The hosted page URLs
are short lived; request a fresh one if it expired before the person
opened it.
Auto reload is a standing spending authorization: every charge it fires
runs off session with no further approval and counts against the card
cap. A token may only tighten it, the spend limit's posture: disable it,
lower amount_usd, or raise threshold_usd. Enabling it, raising the
amount, or lowering the threshold is refused 403 session-required and
stays a console action for a person. An update sends enabled: true
with both amounts (threshold_usd 1 to 1000000, amount_usd within
min_usd and max_usd; the bounds apply to every write, a disable
included). A failed charge pauses attempts for 24 hours, or until a
change is saved on the console, whichever comes first; the summary's
auto_reload.cooldown_until names the stamp, and a no op by token never
moves it. On the MCP server the
same write runs in both directions, because a person approves the
preview there: billing_write carries human_confirmation on it.
Errors¶
| Status | Code | When |
|---|---|---|
401 |
unauthorized |
missing, malformed, expired, or revoked token |
403 |
reserved-arrangement |
credits are managed by the platform team for your organization; purchases are not self serve |
403 |
session-required |
raising or clearing the spend limit by token, or enabling auto reload, raising its amount or lowering its threshold by token: console actions |
409 |
card-window |
the card cap for the rolling window is spent (card_window_remaining_usd is 0); wait for payments to age out of the window, or pay by wire transfer |
409 |
no-purchases |
the payment portal before the first purchase: nothing to manage yet |
409 |
no-card |
enabling auto reload with no card on file; POST /api/billing/setup hands back the page that saves one |
404 |
not-found |
a receipt for an id that is no payment of your organization, or for a payment with no receipt; a statement month out of range |
422 |
bad-month |
a statement month that is not YYYY-MM |
422 |
bad-request |
a query value or body field out of range or malformed; detail names it |
422 |
card-cap |
usd above what a card can still carry this window (card_window_remaining_usd on the summary); lower the amount, or pay larger amounts by wire transfer |
429 |
rate-limited |
past the token's request budget for the minute (300 by default; the vm contract states the figure); wait retry_after_s. Also past a statements budget, with budget naming it |
500 |
statement-untied |
a statement whose lines did not add up; nothing was produced |
503 |
purchases-unavailable |
self serve purchases are off |
503 |
station-unavailable |
the ledger or the payment provider is unreachable; retry |
503 |
statement-busy, statement-timeout, unavailable |
a statement build found the server busy, ran past its deadline, or could not reach the ledger; retry |
Every error is the plain {"error": code} body of the
API conventions.