Skip to content

nodus.spot

View Markdown

Spot pilot: dedicated interruptible nodes using the platform account and API key.

class Spot(transport: Transport) -> None

Use client.spot to quote, request, inspect and release Spot nodes (pilot).

get(node_id: str) -> Obj

Read a node, including its Nodus SSH command, uptime and cost.

list() -> Objs

List the current account’s nodes, including terminal states.

prices() -> Objs

Current USD prices per complete node-hour; quotes do not reserve capacity.

release(node_id: str) -> Obj | None

Stop billing and request deletion of the node and boot disk. Repeated calls are safe.

request(gpu: str, max_price: float | None = None, wait: bool = True, poll: float = 30, *, timeout: float = 900, ssh_public_keys: Sequence[str] | None = None, regions: Sequence[str] | None = None, providers: Sequence[str] | None = None, idempotency_key: str | None = None, workspace_id: str | None = None, workspace_slot: str | None = None, placement: str | None = None, local_wait_s: int | None = None) -> Obj

Request one node, optionally waiting for SSH readiness (15-minute timeout by default).

max_price is USD per complete node-hour. Waiting retries unavailable capacity with one stable key. An ambiguous initial POST stops for inspection; only accepted-node reads retry connection failures. Unstarted capacity failures retry only after confirmed cleanup; other ended nodes stop waiting. Save your own key to inspect or recover requests across process restarts. Timeout/cancellation never deletes a node or launches a replacement. wait=False performs one POST and returns its provisioning state or raises the API error. workspace_id mounts retained regional storage at /workspace. Placement defaults to local_first with a 300-second local wait; local_only and cheapest are alternatives. A newly created regional slot starts empty. Releasing a node retains its Workspace files.

usage(*, from_: str | None = None, to: str | None = None) -> Objs

Per-node price intervals and charges; bounds are RFC 3339 timestamps.