Cluster facts and the Base Load book¶
Three read only routes answer what an agent asks right after
/api/whoami:
what this Kubernetes cluster is, how to connect to it, and what Base
Load it can hold. Beside them sit the purchase quote
and the deal offers National Compute makes your
organization.
| Route | What it serves |
|---|---|
GET /api/k8s/cluster |
the cluster's facts: GPU shape, market posture, storage, endpoints |
GET /api/k8s/cluster/kubeconfig |
the cluster's kubeconfig, by token (below) |
GET /api/k8s/reservations |
the Base Load book: rate sheet, availability by size, your blocks |
GET /api/k8s/capacity/pools |
the pools your organization can buy into, one per island, with their deal offers, and an entry per blind auction |
Contract: GET /api/k8s/openapi.json.
Every route takes an org API token and resolves the cluster the way the
limit price read does: a token bound to a Kubernetes cluster reads its
own; an org wide token resolves when the organization holds one
Kubernetes cluster and otherwise passes ?cluster=<name> or gets a
409 ambiguous-cluster. A token bound to a VM cluster is refused with
422 bad-request. A cluster outside your organization is a 404, the
same as one that does not exist.
The cluster's facts¶
curl -H "Authorization: Bearer $NC_TOKEN" \
https://nationalcompute.com/api/k8s/cluster
| Field | Meaning |
|---|---|
cluster, kind, status |
the name, k8s, and the platform's status word (ready for a usable cluster) |
market |
true when the cluster trades on the market; false for a fixed cluster the platform sizes |
nodes, gpus |
the nodes and GPUs the cluster holds right now |
gpus_per_node |
the node to GPU conversion every bid uses |
cpu_worker |
true when the cluster carries a CPU worker |
shared_volume |
true when a shared volume is bound to the cluster |
nccl_env |
the environment the platform injects for high performance networking on this cluster, as {VAR: value}; null when there is none |
cni |
the pod network the cluster runs, canal or cilium (Kubernetes networking); null when the platform has not recorded one |
gpu_vendor |
which vendor's runtime the nodes carry, so you pick the matching manifests |
gpu_model |
the GPU class the cluster's island sells, what a limit price buys. null while the platform has not set one |
base_load_offered |
true when Base Load is sold for clusters where this one runs |
kubeconfig_url |
the kubeconfig download on this API, GET /api/k8s/cluster/kubeconfig?cluster=<name>, with your token (below). Signing in is the device code flow the kubeconfig triggers |
api_url, ingress_url, ingress_port |
the API server and the workload ingress endpoint, or null where the platform does not derive them for this cluster. The kubeconfig carries the API server regardless |
island_stale |
null while the platform hears the island's heartbeat; {since} once it has lost the island, and every node read then shows the last snapshot (island staleness) |
feed_error, feed_age_s |
the last error of the platform's pull of the node health feed (null when the last pull landed), and the data age of what that feed serves in seconds: the time since the newest landed pull plus the platform's cache age at that pull (null when no pull has ever landed) |
A 404 right after a cluster is created means its record has not
landed yet. Retry.
The upgrade read¶
On the MCP server, grid_api get /api/k8s/cluster/upgrade with
params.cluster answers the cluster's release and its open upgrade
notice, the body the cluster page's Release block and banner render
(Kubernetes versions and maintenance).
upgrade_write is the action beside it (MCP server).
Every stamp is ISO 8601 in UTC.
| Field | Meaning |
|---|---|
cluster |
the name |
release |
the cluster's pin, the RKE2 release it runs; null when the platform holds no pin for it |
platform_release |
the release the platform validated for clusters where this one runs, as {release, moved, cve}: moved is the date the release was declared, cve the identifier on a security release, else null; the whole object is null while none is declared |
behind |
true when release is below platform_release; null when either is missing |
upgrade |
the open notice, or the one that finished within the last seven days; null otherwise |
upgrade.id, upgrade.state |
the notice id and pending, scheduled, running, done or parked |
upgrade.kind, upgrade.cve |
minor, patch or cve; the CVE identifier on a cve notice, else null |
upgrade.current, upgrade.target |
the release at the notice and the release the upgrade moves to |
upgrade.notice_at, upgrade.window_open_at, upgrade.deadline_at |
when the notice went out, when the window opens and the deadline |
upgrade.scheduled_at, upgrade.approved_by, upgrade.started_by |
the time set and the identity that set it; approved_by reads deadline on a run the platform started and started_by reads the member, else the platform; all null while pending |
upgrade.step, upgrade.progress |
control_plane or workers while running, else null; progress is always null: the position inside a part is not reported |
upgrade.outcome, upgrade.finished_at |
on done: upgraded or superseded with the time it closed; null before |
upgrade.held |
true while the platform has paused upgrades on the cluster; a choice made meanwhile is recorded and runs once the pause lifts |
upgrade.parked, upgrade.support_ref |
on parked: {text, what_happened, cluster, support_ref, contact} with text reading the platform is on it and contact the support address; null otherwise. The body never carries the station's error text |
upgrade.actions |
the actions open to you: schedule and upgrade_now while pending, change and upgrade_now while scheduled, dismiss on done, none while running or parked |
banner |
the banner the console shows for the notice: state, hue (warn, run, ok or hold), chip, title, detail, actions and the notice's releases and stamps; null when nothing shows |
events |
the notice's trail, one entry per state change: at, from_state, to_state, by (the member, else the platform) and label (the line the console shows); empty when no notice shows |
last_upgrade |
the newest upgrade that finished: target, started_at, finished_at, approved_by, started_by; null when none |
site_running |
true while another cluster's upgrade is running where this cluster runs; an "Upgrade now" queues behind it |
held |
true while the platform has paused upgrades on the cluster, with or without a notice |
docs_url |
the upgrade section of Kubernetes versions and maintenance |
The kubeconfig¶
curl -fsSL -H "Authorization: Bearer $NC_TOKEN" \
"https://nationalcompute.com/api/k8s/cluster/kubeconfig?cluster=<name>" \
-o ~/.kube/<name>.yaml
GET /api/k8s/cluster/kubeconfig answers the cluster's kubeconfig as
application/yaml: a public client and the cluster's certificate, no
secret inside. The first kubectl call prints the device code sign in
link a person approves. The cluster resolves like every read here, from
the token's binding or ?cluster=. Another organization's cluster can
never answer, whatever its name. When your own organization carries one
name on two clusters, the read answers 409 ambiguous-cluster and the
platform team resolves it.
| Status | Meaning |
|---|---|
409 cluster-not-ready |
the cluster is still building |
503 station-unavailable |
the island cannot publish the file right now. Retry |
On the MCP server the same read is a grid_api path
answering JSON with the YAML inside.
The public onboarding path at access.nationalcompute.com resolves a
bare name without a token. When more than one cluster carries the name
it answers 409 ambiguous-cluster and points here.
The Base Load book¶
curl -H "Authorization: Bearer $NC_TOKEN" \
https://nationalcompute.com/api/k8s/reservations
The response is the cluster's Base Load book, read only:
offeredisfalsewhen no rates are posted where the cluster runs.checkout_openisfalsewhile self serve buying is closed there.membership_requirednames the membership level a purchase needs (pro) when your organization's level is below it and the organization was created after membership launched; the field is absent otherwise (membership levels).ratesis the posted sheet, USD per GPU-hour keyed by size in GPUs and then by term in days.dayslists the posted terms. A purchase of any whole number of nodes for 3 to 30 days is priced from the sheet: the posted cell for its size and term when there is one, else the rate for the longest posted term at or under its term (the shortest posted term when it is shorter than every one), at the largest size posted for that term at or under its size (the smallest posted size when it is smaller than every one). A posted term outside 3 to 30 days is sold at its posted sizes only.sizes[]is the size matrix: each entry'schips,nodes, whether it isavailablenow, elsesold_out_untilas an epoch second (nullwhen no live block's end would free it).reservations[]is the cluster's own book: blocks that are live, and blocks that ended or were cancelled within 30 days, each withid(the block's handle),nodes,chips,rate_usd_per_gpu_hr,starts_atandends_at(epoch seconds), andstatus(scheduled,active,ended,cancelled). Several rows can beactiveat once; the cluster's base load capacity is the sum of theirnodes. A block billed under your agreement addsbilled_under_agreement: trueanddeal_id(the agreed deal), and itsrate_usd_per_gpu_hris the deal's rate for it; the agreed deal's charges bill it, not the meter. Every other row has neither key. The pools read (GET /api/k8s/capacity/pools) lists the same live and scheduled blocks on each cluster entry'sblocks[], with the same two keys.lock_full_termistrue: buying locks the block's price from your credits (Base Load).deposit_cap_ucreditsis the largest price a purchase can have, in microcredits (1,000,000 = $1), so a deposit computed as the smaller of the block's price and this figure reads the block's full price. The purchase quote gives the real deposit and what a purchase locks for one pick.fundingis{on, window_days, grace_days}:onistrue(a purchase your credits cannot lock in full gets a funding window), andwindow_daysandgrace_daysare the window and grace a purchase gets now. Eachreservations[]row carriesfunding: the Reserved funding it was bought under, ornull.
Buying is a console action (Base Load).
This API has no purchase route, and neither does the MCP server, where
the book is a grid_api path.
The purchase quote¶
The quote answers what a Base Load purchase would lock now, for one pick, read only. The console's Capacity page reads it before Buy.
| Route | Auth | Takes |
|---|---|---|
GET /api/orgs/{org}/reservations/quote |
console session, any member | cluster (the name), chips (GPUs, whole nodes), days (3 to 30, or a posted term), optional starts_at (ISO 8601; absent is now, at most 90 days out); or offer_id alone, for a deal offer |
grid_api get /api/k8s/reservations/quote |
MCP server | params.cluster, chips, days, optional starts_at; no offer_id |
| Field | Meaning |
|---|---|
total_ucredits |
the block's price for the whole term |
deposit_ucredits |
the least the purchase must lock: the deposit |
lockable_ucredits |
what your credits can lock for the block now |
lock_now_ucredits |
what buying would lock: the smaller of lockable_ucredits and total_ucredits |
remainder_ucredits |
what would fall due within the funding window; 0 when your credits lock the whole price |
shortfall_ucredits |
what is missing for deposit_ucredits; a purchase now is refused insufficient-credits while it is above 0 |
funding_window |
true when the credits cannot lock the whole price and the rest would be due within the window |
window_days, grace_days |
the window and grace a purchase gets now |
funding_due_at, funding_cut_at |
the due date and the deadline (due date plus grace) a purchase now would get; null when funding_window is false |
rate_ucr_per_gpu_hr |
the rate the pick buys at (priced from the sheet as rates describes), microcredits per GPU-hour |
A chips that is not a positive multiple of gpus_per_node is refused
409 bad-size, a term outside 3 to 30 days that is not posted, or an
island that posts no rates, 409 not-offered, and a start more than
90 days out 409 bad-start. A missing chips or days is 400 bad-request on the
console route and 422 bad-request on the MCP server; an offer that is
not your organization's is 404 no-offer, and an offer paid on a line
of credit, which locks nothing, 409 not-prepaid. The quote reserves nothing:
a purchase made later reads your credits again.
The calendar for one size¶
The pools read's calendar lists, for each size in its matrix, whether
a block of that size fits on each UTC day for 45 days from t0. The
calendar read answers the same for one size of your choice, so a size
between two matrix sizes gets its own row.
| Route | Auth | Takes |
|---|---|---|
GET /api/orgs/{org}/capacity/calendar |
console session, any member | site (the pool's site), chips (GPUs, whole nodes) |
grid_api get /api/k8s/capacity/calendar |
MCP server | params.site, chips |
The answer is {site, t0, fits: {"<chips>": [...]}}: t0 is the first
day (YYYY-MM-DD, UTC) and the list holds one boolean per day, true
when a block of chips fits that whole day under what is already held.
A chips that is not a positive multiple of gpus_per_node, or a
missing site, is 400 bad-request; a site with no pool for your
organization is 404 not-found. The read reserves nothing.
Deal offers¶
A deal offer rides
the pools read, on the pool of the island it is for. The read is org
keyed, not cluster keyed: GET /api/k8s/capacity/pools by an org API
token with capacity:read, grid_api get /api/k8s/capacity/pools on
the MCP server, and the console's Capacity page. Each pool's
deal_offers[] lists the offers made to your organization for that
island: every open one, and those decided in the last 7 days. Where
the platform does not run deal offers the key is absent. Its times
(starts_at, ends_at, accept_by, decided_at) are ISO 8601 in
UTC; a step's end is exclusive. The console shows the same instants in
Pacific time (times).
| Field | Meaning |
|---|---|
id, deal_id |
the offer, and the deal it belongs to. A revised offer has a new id under the same deal_id |
status |
offered (open), accepted, declined, withdrawn (by National Compute) or expired (past accept_by unaccepted) |
site |
the island's opaque id |
cluster, cluster_name, cluster_id |
the cluster the offer is for: cluster and cluster_name both carry its name, cluster_id its id |
steps[] |
the term, one entry per step in order of start; steps can overlap, and overlapping steps become blocks that run at the same time: seq, starts_at, ends_at, chips (GPUs), nodes, usd_per_gpu_hr and rate_ucr_per_gpu_hr (the rate, in USD and in microcredits), total_ucredits (the step's price), block_id (the deal's block the step comes from; null on an offer sent before steps named one) |
total_ucredits |
the price of every step together |
payment |
prepaid (paid up front, with a deposit and a funding window) or credit (paid on a line of credit: no deposit and no funding window) |
credit |
on a credit offer, the line of credit accepting opens: terms (net: each UTC month's charges fall due net_days after the month ends; none: no due date, net_days null), net_days, grace_days (the grace after a due date) and alert_limit_ucredits (the credit alert, a notice only; null: none). null on a prepaid offer |
lines[] |
the offer's other charges, one entry per charge (a charge whose price changes within its term has one per price): kind (one_time, recurring, quantity, or metered for storage), description, per (hour, day or month), unit_label and quantity (a quantity charge's unit and how many), unit_usd (a quantity charge's price per unit), usd (a one-time amount, or a recurring fee per per), usd_per_tb_month (a storage price, as billed), starts_at and ends_at (every kind but one-time), at (a one-time charge's moment) and total_ucredits (null for storage, which bills on usage). A key a kind does not use is null |
lines_total_ucredits |
the other charges' totals together, storage left out |
grand_total_ucredits |
total_ucredits plus lines_total_ucredits |
deposit_ucredits |
the least accepting must lock; 0 on a credit offer |
remainder_ucredits |
the most that can fall due within the funding window: the total less the deposit; 0 on a credit offer |
window_days, grace_days |
the offer's funding window and the grace after it; both 0 on a credit offer, whose grace is credit.grace_days |
accept_by |
the last moment the offer can be accepted, exact to the minute |
terms_hash |
the fingerprint of these exact terms; the accept sends it back |
can_accept |
true while the offer is open and the caller holds the organization role admin (every member holds it today) |
decided_at |
when it was accepted, declined, withdrawn or expired; null while open |
reservation_ids |
the blocks an accept bought, one per step; null until accepted |
Where the platform does not offer payment terms and other charges,
payment, credit, lines, lines_total_ucredits,
grand_total_ucredits and steps[].block_id are absent. An offer sent
before them reads payment prepaid, credit null, lines []
and grand_total_ucredits equal to total_ucredits.
Acting on an offer, and funding a block, are console actions for an org admin: no API token and no MCP tool reaches them.
| Route | Body | Answers |
|---|---|---|
POST /api/orgs/{org}/deal-offers/{id}/accept |
{terms_hash, agree: true, request_id} |
{offer, reservations, funding}: the offer, the blocks bought (as the book's reservations[] rows) and their Reserved funding, null when the whole total locked. A credit offer answers funding null and adds credit: the line of credit it opened, as the billing balance's advances[] lists it |
POST /api/orgs/{org}/deal-offers/{id}/decline |
{reason} (optional) |
{offer} |
POST /api/orgs/{org}/reservations/fundings/{id}/fund |
{amount_usd} (optional: at most this much) |
{funding}: Fund now locks credits your organization already holds into the unfunded hours of its blocks, earliest first across them |
The accept is all or nothing: every step is bought, or none. Repeating
it with the same request_id answers the first result again and buys
nothing more. Its refusals are must-agree, not-org-admin,
no-offer, terms-changed, offer-expired, offer-closed,
sold-out, on-hold and insufficient-credits; a credit offer is
never refused on-hold or insufficient-credits, and is refused
credit-refused when its line of credit cannot open. Fund now refuses
nothing-to-fund and no-available-credits
(errors).