Kubernetes limit price API¶
For a Kubernetes cluster, demand is derived from the cluster's own jobs:
a GPU job is one request priced in whole nodes on the market, capacity
follows the request, and idle nodes return to the pool
(Kubernetes clusters covers the full behavior).
There is nothing to declare except the
price — one number per cluster, the most you'll pay per GPU-hour —
or per job: the nationalcompute.com/starting-limit-price label at
submission, then PUT /api/k8s/workloads/bid
for a job that is queued or running
(the limit price).
Contract: GET /api/k8s/openapi.json.
| Route | Auth | What it does |
|---|---|---|
GET /api/k8s/bid |
capacity:read |
current limit price, its standing verdict, version |
PUT /api/k8s/bid |
capacity:write |
set (or withdraw) the limit price; expected_version makes it compare and set |
GET /api/k8s/workloads/bid?uid= |
capacity:read |
one job's effective limit price and its source (below) |
PUT /api/k8s/workloads/bid |
capacity:write |
change one queued or running job's limit price by its UID; null is the cluster's price (below) |
GET /api/k8s/storage/volumes |
capacity:read |
your shared storage volumes (below) |
DELETE /api/orgs/{org_id}/k8s/storage/volumes/{volume_id} |
console session only | destroy a preserved volume (below) |
GET /api/k8s/storage/bucket |
capacity:read |
your organization's object storage bucket (below) |
The same contract carries the five market analytics routes, and the cluster facts and Base Load book.
There are no slots, no node counts, no node IPs, and no release verbs on this surface — submit jobs and the market does the rest.
Setting the limit price¶
curl -X PUT -H "Authorization: Bearer $NC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"max_price_per_gpu_hour": <price>}' \
https://nationalcompute.com/api/k8s/bid
- The value is USD per GPU-hour, whole cents. The effective billed rate is often lower — this is a ceiling, not a price.
0withdraws the limit price.- A declare too low to ever clear the market is refused —
bid-too-low. Check the price-to-win ladder and the market feed for what wins now. - Add
"cluster": "<name>"(PUT body) or?cluster=<name>(GET) only with an org-wide token when your org holds several Kubernetes clusters. - Add
"expected_version": <n>with theversionthe GET returned. The write applies only while the version still matches. Otherwise the PUT reads409 version-mismatchwith the liveversionin the body and nothing changes. Without the field the write applies unconditionally. Your human on the console and your agent share one limit price, so send it. The version counts every accepted write on the cluster, a withdrawal included, and never restarts: a0that withdraws the limit price bumps it, and a version read before the withdrawal is stale for good.
The PUT returns the applied state — the same body the GET serves:
{
"cluster": "acme-inference",
"max_price_per_gpu_hour": …,
"bid_too_low": false,
"version": 4,
"updated_at": "2026-08-26T15:20:07Z",
"updated_by": "token:8dcbc6",
"billing_hold": null,
"spend_limit_enforced": true,
"billing_hold_enforced": true
}
updated_by names who wrote the standing limit price: token:<token_id>
for an agent, a member's console identity for a human, null without a
limit price. Read it before changing a ceiling. A value that is not a token is
a human's decision. The organization's whole trail, human and token
writes side by side, is GET /api/org/activity.
billing_hold is the billing hold that applies to this cluster, or
null: a hold on the whole organization, or a hold on some clusters
that lists this one (hold state). When set:
state (hold or grace), reason, and for hold a stage —
notice (new capacity paused) or enforce (capacity being reclaimed) —
plus enforce_after_ms; scope and units say when only some
clusters are held. A hold never alters the declared limit price itself.
spend_limit_enforced and billing_hold_enforced say whether your
organization's spend limit and a balance at or below zero hold its
capacity at all. false means the platform records the figure and does
not act on it for your organization's clusters, so the cap is the
instruction a person gave the agent and nothing else stops it.
The body also carries gpu_model (the GPU class this limit price buys; null
while the platform has not set one), gpu_vendor (its maker),
gpus_per_node (the auction's supply unit) and bid_too_low (true
when the standing limit price is too low to ever clear the market,
null while nothing is declared);
how the bid prices the market
explains the supply unit.
A declare too low to ever clear is refused with bid-too-low — the
error reference covers the full catalog.
Changing one job's limit price¶
curl -X PUT -H "Authorization: Bearer $NC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uid": "<job UID>", "max_price_per_gpu_hour": <price>}' \
https://nationalcompute.com/api/k8s/workloads/bid
One queued or running job bids the new price from the next tick on.
The job is named by the Kubernetes UID of what you applied — a Job,
JobSet or MPIJob, a LeaderWorkerSet (one price for every replica
group), a Deployment (one price for every replica, replacements
included) or a bare pod — never a member's, a group's or a replica's
pod: uid on a GET /api/k8s/workloads job
row, or kubectl get job <name> -o jsonpath='{.metadata.uid}'
(kubectl get lws <name> for a LeaderWorkerSet).
- The value follows the cluster PUT's rules — USD per GPU-hour, whole
cents, the same refusals.
0is a real zero limit price: the job waits with the reasonBidTooLow.nullis the cluster's limit price — the explicit default, never the job's label. There is no DELETE; to bid the label's number again, PUT it. - The label on the Job is never rewritten. It is the starting price,
frozen at creation (the limit price); the
response shows it as
starting_limit_pricebeside the price that applies. - A price below the one the job held when its gang started
(
protection_ref_usd_gpu_hr; for a Deployment, the highest of its replicas') voids its protection window. Read the GET first. - A Deployment's price outlives its replicas: a replacement pod bids it too. A Deployment that has had no pod at all for a day starts again from its template's label.
clusterandexpected_versionwork as on the cluster PUT. The version is the job's own and counts every accepted write on it.- One write per second per job; a faster PUT reads
429 rate-limited.
GET /api/k8s/workloads/bid?uid=<job UID> reads the same body the PUT
returns:
{
"uid": "7c1f…",
"kind": "Job",
"namespace": "ml",
"name": "train-a",
"cluster": "acme-inference",
"max_price_per_gpu_hour": …,
"source": "api",
"starting_limit_price": …,
"protection_ref_usd_gpu_hr": …,
"version": 2,
"updated_at": "2026-10-30T20:14:07Z",
"updated_by": "token:8dcbc6"
}
max_price_per_gpu_hour is the price the job bids; source says where
it comes from — api (this call), starting-label (the frozen label),
cluster-default (the cluster's own limit price; the number is null
when the cluster has none, and the job bids $0).
A UID that names nothing the call can price is refused:
404 not-found when no live job on the cluster carries it — a finished
or deleted job included (a re-run has a UID of its own), and a job
submitted seconds ago that the platform has not mirrored yet (retry in
a moment); 422 not-a-gang when it is a pod's inside a Job, JobSet,
MPIJob, LeaderWorkerSet or Deployment (the body's gang_uid names the
UID to send);
422 unsupported-kind when it is a DaemonSet pod's — such pods never
bid, nothing to price.
How the bid prices the market¶
Each request bids its gang's GPU total × your limit price — the
cluster's declared price, or the job's own
nationalcompute.com/starting-limit-price label (USD per GPU-hour)
when it carries one; "0" is a real zero limit price, never a fallback
to the cluster's price — in whole nodes, so a request's exposure is its
node count × gpus_per_node × your ceiling. The cluster's limit price
is read live every auction tick for a request's whole life: you may
change it at any time; an increase is always fine, and a decrease below
the price a job held when its gang started (Provisioned=True) voids
its protection window. A
job's price is, in order: the number last written through
PUT /api/k8s/workloads/bid (null
there is the cluster's price), else its label, read once at creation,
else the cluster's price (the limit price).
Capacity sells in whole nodes.
Launch admission enforces the
shape that clears. Every pod template's GPU request must be a multiple
of gpus_per_node. A smaller request is refused with JobSizeTooSmall.
So a request prices its nodes whole. On a cluster with packing onto
the base load block enabled a
smaller pod is admitted. It runs on your base load blocks and bids
nothing.
A ceiling can be too low to ever clear:
the write refuses it outright (422 bid-too-low), because pending
demand costs nothing but a bid the market can never meet means nothing
will ever arrive. What to bid is read off the market's own numbers —
the price-to-win ladder and the
market feed — never off a posted price.
Market conditions can also move past a standing bid (the write-time check never re-runs). You do not have to detect this yourself:
- The limit price read echoes
bid_too_low:truemeans the standing limit price can never clear at any packing — check the market's recent clearing prices and raise it.nullmeans there is no standing limit price, or no verdict to give. - The market also says so inside your cluster: the request's reason
reads
BidTooLowand its message, posted on the Job as an Event, names your own bid's numbers (queue events). The console's Workloads page shows the verdict as the reason bid too low to ever clear. The signals clear the moment the bid becomes viable.
No limit price means $0. Your jobs still create demand, but nothing is granted until you set a real ceiling.
CPU-only work is outside the market. A job requesting no GPUs runs on the cluster's CPU worker and neither bids nor holds a GPU node: CPU-only queued work doesn't pull capacity, and a GPU node running only CPU pods reads as idle and returns to the pool after the five-minute grace, billed at the departed job's rate (once its one-hour minimum hold has run).
Queue events¶
The market posts its verdicts inside your cluster on the job's
ProvisioningRequest — as the reason of its Provisioned=False
condition, with the sentence as the message — and as a Normal Event on
the owning Job, JobSet, MPIJob or LeaderWorkerSet, one per change
of reason (kubectl describe job; for a set kubectl describe
leaderworkerset, where every replica group's stream lands and every
Event's message — the reason, NodeGranted, a revoke — opens with
group <index> (<workload>):, the group's index first and its
Workload's name after it; the condition carries the sentence without
the prefix). Kueue copies the same message into the
Workload's admission check. A new request carries no reason until the
market's first read, one tick after it appears. Reasons, highest
precedence first:
| Reason | Meaning | Clears |
|---|---|---|
BalanceTooLow |
the credits the cluster can spend (available to spend less the unpaid that hits it; the total balance for an organization whose money is one pool) cannot fund two hours of the request at its limit price; the message names the balance available and what the request costs | after credits that apply to the cluster land |
BidTooLow |
the limit price is too low to ever clear the market; the message names your own bid's numbers | when the bid becomes viable |
NoSupply |
the site holds fewer nodes than the gang needs | when the site grows, or with a smaller gang |
PendingSupply |
protected nodes hold the supply the gang needs | on its own, as windows lapse |
Outbid |
lost on price; the message names the limit price that wins right now (outbid · needs over $X per GPU-hour) |
raise the limit price, or wait |
ReservedBusy |
the request is smaller than one node and waits for GPUs of your base load blocks to free; it never bids; the message names the request's GPU count and why it waits | when block GPUs free |
ReservedTooSmall |
the request's pods are each smaller than one node and together exceed one node; a request with pods that small runs on one reserved node only and never bids | with whole node pods or with fewer pods that fit one node |
Pending |
no verdict this tick (waiting for the market): the request was seated this very tick, or the tick left it unfilled |
next tick |
The two reserved reasons appear only on clusters with reservation packing enabled. On such a cluster a request smaller than one node takes no other market reason. A higher limit price never clears it.
A grant reads NodeGranted on the Job once per node; the request's
condition reads Provisioning (k of N granted nodes ready) until it
turns Provisioned=True and the gang starts. On a cluster with packing
enabled a request smaller than one node reads waiting for N GPUs to
free on reserved node <node> while it waits for GPUs. Once seated it
reads reserved node <node> is ready with N GPUs for this job. A
reclaim rides the request's PreemptionNotice condition and
NodePreempting events on the node and its pods; at the deadline the
whole job is suspended and requeued as a new request
(when the market reclaims a node).
A granted node that leaves the cluster after Provisioned=True fails the
request the same way (Failed=True, reason MarketRevoked) and the job
requeues as a new request.
A site out of capacity shows on the console's Workloads page as
capacity unavailable; the request's own reason carries no shortage
token and reads PendingSupply, Outbid or Pending as usual
(when the site has no capacity).
The object storage bucket¶
GET /api/k8s/storage/bucket answers your organization's
object storage bucket: its facts, its usage,
its billing quote or its soft cap and the state of the credential
Secret on each of your Kubernetes clusters. It never carries the secret access key. The
read is organization wide whatever the token's binding. Show and Rotate
are console actions on the Storage page. They have no route on this
contract and no MCP tool. A token on the console's own paths for them
is refused with 403 session-required, whatever its scope.
| Route | Auth | What it does |
|---|---|---|
GET /api/k8s/storage/bucket |
capacity:read |
the bucket's facts, usage, billing quote or cap and per cluster Secret state |
curl -H "Authorization: Bearer $NC_TOKEN" \
https://nationalcompute.com/api/k8s/storage/bucket
| Field | Meaning |
|---|---|
bucket |
the object below, or null while the organization holds no bucket; reason then reads not-provisioned |
viewer |
{can_reveal, can_rotate}, both false on this route and on the MCP twin: no token shows or rotates the pair |
bucket.name |
the bucket's name, the value NC_BUCKET carries |
bucket.endpoint |
the S3 compatible endpoint, the value AWS_ENDPOINT_URL carries |
bucket.region |
the signing region, always auto; the value AWS_DEFAULT_REGION carries |
bucket.access_key_id |
the access key ID of the current pair; a rotate replaces it (rotation) |
bucket.location_hint |
the placement hint the bucket was created with |
bucket.created_at |
when the bucket was created, ISO 8601 |
bucket.rotated_at |
when the pair was last rotated, ISO 8601; null before the first rotate |
bucket.credential_version |
starts at 1 and counts up by one at every rotate |
bucket.credential_state |
active; rotating while a rotate is in flight; suspended once the pair is revoked; destroying while the bucket is being destroyed |
bucket.suspended_at |
when the pair was suspended, ISO 8601; null while it is not |
bucket.suspended_reason |
admin, over-cap, billing-hold or organization-deleted; null while the pair is not suspended. No suspension for the cap or for a billing hold is in force today (the soft cap) |
bucket.rotate_recommended_at |
when the platform last advised a rotate, ISO 8601: a member was removed or a cluster left the organization; null otherwise. The next rotate clears it |
bucket.usage.bytes |
the bytes held at the latest hourly sample; null means no sample has landed yet. It is never a measured 0 |
bucket.usage.objects |
the objects held at the latest hourly sample; null means no sample has landed yet |
bucket.usage.observed_at |
when the latest sample was taken, ISO 8601; null before the first sample |
bucket.soft_cap_bytes |
the soft cap in bytes; null on a billed bucket, which has no cap |
bucket.over_cap |
true when the latest sample exceeds the soft cap; false while usage.bytes is null and always false on a billed bucket |
bucket.billing |
null while the bucket is not billed; otherwise the quote below |
bucket.billing.gib |
the whole GiB billed at the latest sample; null before the first sample |
bucket.billing.rate |
the price in ucredits per GiB per hour; 0 when the bucket is billed at no charge |
bucket.billing.usd_per_gib_month |
the same price in dollars per GiB per month of 730 hours |
bucket.billing.ucredits_per_hour |
gib times rate; null before the first sample |
bucket.billing.ucredits_per_month |
the charge for a month of 730 hours at the current gib; null before the first sample |
bucket.billing_notice |
null, or the dated notice that billing starts for this bucket: starts_at (ISO 8601), gib (the whole GiB held now), rate (ucredits per GiB per hour), usd_per_gib_month, ucredits_per_month (the estimate for a month of 730 hours at the current gib) and message (the console banner's text). Present only before starts_at, for a bucket that holds 1 GiB or more and is not billed yet |
bucket.clusters[] |
one entry per live Kubernetes cluster of the organization |
bucket.clusters[].site |
the cluster's site |
bucket.clusters[].cluster |
the cluster's name |
bucket.clusters[].current |
true once the cluster holds the pair at credential_version |
bucket.clusters[].pushed_at |
the last successful write of the Secret, ISO 8601; null before the first |
bucket.clusters[].error |
one of the nine push codes (below); null when the last write landed |
bucket.clusters[].attempts |
failed writes in a row; 0 once a write lands. A station-unbound write adds nothing |
bucket.clusters[].stuck |
true after 20 failed writes in a row (the limit today); the platform then stops retrying until a rotate or a support re push |
bucket.clusters[].secret |
default/nc-storage, the Secret the cluster holds |
Push codes¶
clusters[].error carries one of these codes. The platform retries on
its own (the Secret). A
cluster that reads stuck, or station-bind-mismatch, is a support
matter.
| Code | Meaning |
|---|---|
station-unreachable |
the site did not answer the platform's write |
station-outdated |
the site runs a platform release without the Secret write |
fence-unarmed |
the site's organization access enforcement is not enabled yet |
station-refused |
the site refused the platform's credentials |
station-unbound |
the site has not bound the cluster to your organization yet; pending until the bind lands |
station-bind-mismatch |
the site binds the cluster to another organization |
apply-failed |
the site reached the cluster and the write to it failed |
brain-config |
the platform could not unwrap the stored secret |
failed |
any other failure |
On the MCP server the read is
grid_api get /api/k8s/storage/bucket, same
body.
Shared storage volumes¶
A shared volume is added to a Kubernetes cluster by support on request
(Kubernetes clusters). The same
contract lists your organization's volumes and deletes a preserved one.
Both routes are scoped to your organization: a volume outside your org
is a 404, the same as one that does not exist.
| Route | Auth | What it does |
|---|---|---|
GET /api/k8s/storage/volumes |
capacity:read |
your volumes: attached and preserved |
DELETE /api/orgs/{org_id}/k8s/storage/volumes/{volume_id} |
console session only | destroy one preserved volume (irreversible) |
The list takes an API token. The organization is the token's own and nothing identifies it on the wire; the list is organization wide whatever the token's binding, so scripts can inventory your volumes.
curl -H "Authorization: Bearer $NC_TOKEN" \
https://nationalcompute.com/api/k8s/storage/volumes
Each volume row carries volume_id, name, label, cluster (null
for a preserved volume), status (attached or preserved),
provisioned and used bytes (null until the platform's storage scan
lands, never 0), mounted (how many nodes currently mount it, null
when unknown), billing (the current charge where storage billing is
enabled for your site, else null; below) and
preserved ({former_cluster, deleted_at, used_at_delete} for a
preserved volume, else null).
label is the name the console shows for the volume: <cluster>-shared,
with the former cluster for a preserved volume. name is the storage
name. The two can differ; when they do, the console shows the storage
name under the label. name is the value the delete's confirm takes.
label is a display name and is not unique: two volumes can share it
after a cluster is deleted and created again under the same name.
Scripts key on volume_id or name, never on label.
The billing quote¶
billing quotes your organization's usual storage price for the
volume: gib, usd_per_gib_month, ucredits_per_month and the
spec's other keys. While
storage under an agreement
prices your storage now, the volume bills at the agreement's price
instead, and billing adds three keys:
| Key | Meaning |
|---|---|
billed_under_agreement |
true; present only with the other two |
deal_id |
the agreed deal |
agreement_usd_per_tb_month |
the agreement's price per TB-month as billed (1 TB = 1,024 GiB, a month = 730 hours), unrounded |
The other keys stay at the usual price while the agreement's price
bills, and the read carries no monthly amount at the agreement's
price. When no agreement prices your storage now, none of the three
keys is present. A preserved volume's quote follows the same rule.
The Storage page read's shared[].billing
(cluster pages)
is the same quote.
Deleting a volume is a console action¶
The DELETE takes no API token. Sign in to the console and use
Delete volume on the Storage page
(seeing and deleting your volume).
A request carrying a Bearer token is refused with
403 session-required, whatever the token's scope.
A limit price is reversible. Data destruction is not. An irreversible delete keeps a human in the loop: a member of your organization, signed in, typing the volume's storage name back.
The console's delete rides the same route, with the same body
({"confirm": "<volume name>"}) and the same refusals:
confirmmust be the volume'sname, the storage name shown under its label. The display label is refused. Anything else isconfirmation-mismatchand nothing is destroyed.- Only a preserved volume can be deleted here. An attached one is
volume-attached: delete the cluster first (the volume detaches with it and is preserved by default), or opt to delete the storage with the cluster. - A preserved volume a node still holds is
volume-held; retry in a few minutes. - The delete is accepted asynchronously: the response is
{destroyed, operation}and the volume leaves the list once it is gone. There is no undo.
Tokens¶
Token minting is the normal org token flow (authentication); a token can be bound to a Kubernetes cluster. A k8s-bound token is refused on the VM surfaces and a VM-bound one is refused here.