# Welcome to Lium Lium is a GPU rental marketplace. Providers list GPU machines; renters rent them by the second. Lium checks every machine's GPUs and scores their performance. An AI agent with only a shell can rent, use and release a GPU on its own. ## Start here | I want to… | Start here | |-----------|------------| | Rent a GPU | [Renters](/pod-users) | | Earn from my GPUs | [Providers](/providers) | | Use the API, CLI or SDK | [Developers](/developers) | | Rent a GPU as an AI agent | [AI Agents](/developers/agents) | ## For AI agents - Start at [AI Agents](/developers/agents), then [Scripting for agents](/developers/agent-scripting). - Add `.md` to any page URL for raw markdown (e.g. [`/providers/quickstart.md`](/providers/quickstart.md)), or send `Accept: text/markdown`. - Use the MCP server at `/mcp` to search and read the docs (`search`, `read_page`) and to see live GPU prices and availability with rent links (`search_gpus`, `get_gpu_prices`). - `/llms.txt` and `/llms-full.txt` are at the site root. ## Compliance Lium compute is not available in US-embargoed countries or to sanctioned parties. See the [Export Control and Sanctions Policy](/security/export-compliance). ## Support - **Discord**: [Dedicated channel](https://discord.com/channels/799672011265015819/1291754566957928469) - **Email**: [support@lium.io](mailto:support@lium.io) - **GitHub**: [Datura-ai/lium-io](https://github.com/Datura-ai/lium-io) --- # Official Support and Scam Prevention Scammers pretend to be Lium support. This page shows the only official support path and what never to share. :::warning Keep support conversations in the official ticket The safest support path is the official Lium Discord server → [`#tickets`](https://discord.com/channels/1350984082733142026/1547193098969284650) → one of the three buttons → your private ticket, or your private provider thread if you are a provider who already has one. ::: ## Contact Lium support {#the-safest-way-to-contact-lium-support} **Join the official server** Open the official `lium.io` Discord server: [discord.gg/lium](https://discord.gg/lium). **Open a ticket** Go to [`#tickets`](https://discord.com/channels/1350984082733142026/1547193098969284650). Under **Need help from the Lium team?**, press the button that matches your problem: **Rental / pod problem**, **Provider / node problem** or **Billing / payments**. **Describe the problem** The form has one field, **What do you need help with?**. Write your pod id or executor id, what you did and what you saw. Submit it. **Talk inside the ticket** A private ticket opens. Only you and the Lium team can see it. Keep the whole conversation there. **Providers: continue in your provider thread** If you are a provider and the Lium team already has a private thread with you (its name starts with `notice-provider-`), the button does not open a new ticket. The bot posts your message in that thread, tags the Lium team and links you to it. Keep the conversation there. It is as official and private as a ticket. The buttons belong to the **Lium Tickets** bot. Lium team members who answer inside your ticket or provider thread are the trusted support path. ## Never share - Passwords - Seed phrases or recovery phrases - Private keys, coldkeys, hotkeys or wallet files - API keys, access tokens or other credentials Lium support never needs these. Anyone who asks for them is a scammer. ## How scams look - After you ask in a public channel, someone DMs you or tells you to move somewhere else. - You are invited or added to a "support" channel or another Discord server. - Someone uses the same name or avatar as a real Lium team member. Names and avatars prove nothing. - You get a link for "RPC setup", "wallet connect", "refund", "compensation", "penalty appeal" or "support verification". - Someone pressures you to act fast outside your ticket. A team member may ask to continue in DMs only inside your official ticket. Then open their profile from the ticket and start the DM yourself. ## If you are not sure **Stop** Do not click links and do not share secrets. **Verify in a ticket** Press a button in [`#tickets`](https://discord.com/channels/1350984082733142026/1547193098969284650) and ask the Lium team to confirm the request. You get a fresh ticket, or your provider thread if you have one. **Report the scammer** Report the user to Discord, and tell the Lium team in your ticket or provider thread. --- # Export Control and Sanctions Policy Lium compute may not be used from US embargoed countries or by sanctioned parties. This covers every Lium service: the [lium.io](https://lium.io) platform, the API, the CLI, the SDK and every GPU node connected to Lium. :::warning Access from restricted destinations is prohibited Lium GPU compute, and any hardware or technical data supplied to Lium, must never be provided, exported or re-exported to a restricted destination or a restricted party. Accounts that break this policy are terminated. ::: ## Who may not use Lium You may not create an account, rent compute, connect a node or otherwise access Lium if you are: - In, resident in or a national of Cuba, Iran, North Korea, Syria, or the Crimea, Donetsk (DNR) or Luhansk (LNR) regions of Ukraine, or any other region that becomes comprehensively embargoed. - Named on a US, UK or EU restricted party list, such as the SDN List, the Denied Persons List, the Entity List or the Military End User lists. - An entity owned 50 percent or more, directly or indirectly, by parties on those lists. Using Lium on behalf of such a person, or reselling Lium compute to them, is also prohibited. ## Hardware and technical data Hardware acquired for the Lium network stays in data centers outside restricted destinations. We do not transfer it, or technical data received with it, to a restricted destination or party. ## How we enforce it **Terms** This policy governs every Lium account. Access from a restricted destination ends the right to use Lium immediately. **Card screening** Card payments go through Stripe, which refuses service to embargoed jurisdictions. **Access review** We record the network origin of every registration and review accounts that show access from a restricted destination. **Node location** Node locations come from the network address a node connects from or, when the validator reports it, the machine's own outbound address. Nodes in a restricted destination are removed. ## If you break the policy We terminate running pods and close the account. --- # Providers Rent out your GPUs on Lium and get paid in two ways: - **Rental fees** while a renter uses your GPU. - **Idle pay** while it waits for a rental, for GPU types in the [unrented pool](/providers/architecture#supported-gpus). The [Rewards Calculator](/providers/rewards/calculator) shows what each GPU type can earn a month, up to what the top 5% of its providers can earn. The [Quickstart checklist](/providers/quickstart#checklist-what-costs-you-money-if-it-is-missing) lists what a node needs to keep its idle pay. Lium runs the coordinator that connects your nodes to the network for you, so you only run the GPU machines. You can [run your own coordinator](/providers/provider-configuration) instead. ## Start here - [Get started in 5 min](/providers/quickstart): register, sign in and add your first node - [Nodes](/providers/nodes): bring a GPU machine online - [Provider Portal](/providers/portal/overview): manage nodes and prices - [Rewards](/providers/rewards): what you earn and when you are paid ## More - [Architecture](/providers/architecture): how nodes, validators and the portal fit together - [Provider Configuration](/providers/provider-configuration): Lium's coordinator or your own - [Self-hosted provider setup](/providers/self-hosted-provider): run the coordinator yourself - [Rental Workload Privacy](/providers/rental-privacy): never touch a renter's workload - [Troubleshooting](/providers/troubleshooting): a node that is not listed or not earning --- # Provider Quickstart Start with Path A: an e-mail or Google account, no fee and nothing to register. Path B is for providers who already have, or want, their own hotkey registered on subnet 51; it costs the subnet registration fee. To see what you can earn first, open [Rewards](rewards/index.mdx). :::warning Penalties: read before you list a node A **Secure** node that drops a rental costs you **24 hours of that rental's price**, however short the rental was, and **all** of your rental-fee payouts go to the debt until it is paid. On an 8× H100 at $2.00 per GPU-hour that is about $365 for one dropped rental. See [Penalties](rewards/penalties.mdx#read-this-first) before you list a node; put a node you cannot keep stable on [Spot](portal/node-tier.md). ::: ## Path A: e-mail or Google account {#path-a--create-an-account-nothing-to-buy-first} No fee and nothing to buy. 1. Sign up at [provider.lium.io/signup](https://provider.lium.io/signup) with Google, or with an e-mail and a password. 2. Check the [node requirements](./nodes/quickstart.md#requirements) before running the command. In the portal, open **Add Node**, copy the one command it prints and run it on the host. It installs [Sysbox](./nodes/sysbox.md) if needed (Lium 0.28.2 or newer: if `lium` is already installed, [upgrade it](../developers/cli/installation.md) first), installs the node, adds it to your account and shows its status until it is listed. The node is usually listed for rent about 5 minutes after the command finishes. Earnings are paid in USDT once you add a payout address in **Settings → Payout**. [Connect Discord](./portal/discord.md) for idle pay; the portal offers it from your next sign-in. Idle pay of a day that has not settled yet shows on your **Overview** as **Pending**, an estimate. It moves into your totals once the day settles, usually within a day and a half. Rentals not in your totals yet show there as **Pending** too. ## What you need for Path B - A Bittensor wallet: one coldkey and one hotkey. - Enough TAO on the coldkey for the subnet 51 registration fee. - A GPU host with a supported NVIDIA GPU. See [Supported GPUs](./architecture.md#supported-gpus). :::warning Keep your coldkey off the server Run `btcli` on your own secure machine. Only the hotkey belongs on provider infrastructure. ::: ## Path B: your own registered hotkey {#path-b--bring-your-own-registered-hotkey} ### Step 1: Register on subnet 51 {#step-1--register-your-provider-on-subnet-51} **Get a wallet and TAO** 1. Install `btcli` with `pip install bittensor`. 2. Create a coldkey and a hotkey. See the [Bittensor wallet docs](https://docs.bittensor.com/getting-started/wallets). 3. Send TAO to your coldkey. Check the current fee on the [TaoMarketCap subnet 51 page](https://taomarketcap.com/subnets/51/registration). **Register the hotkey** ```bash btcli subnet register --netuid 51 --wallet.name --wallet.hotkey ``` When the transaction confirms, your hotkey has a UID on subnet 51. ### Step 2: Sign in to the Provider Portal {#step-2--sign-in-to-the-provider-portal} 1. Add your hotkey to a wallet browser extension, such as [Polkadot.js](https://chromewebstore.google.com/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd) or [Bittensor Wallet](https://chromewebstore.google.com/detail/bittensor-wallet/bdgmdoedahdcjmpmifafdhnffjinddgc). 2. Sign in at [provider.lium.io/signature-login](https://provider.lium.io/signature-login). 3. In [Profile Settings](https://provider.lium.io/settings), leave **Central Miner Server** ON. Lium then runs the provider server for you. 4. In the same page, [connect Discord](./portal/discord.md). Your nodes earn subnet incentive only while Discord is connected. ### Step 3: Add your first node {#step-3--add-your-first-node} Follow the [Node Quickstart](./nodes/quickstart.md): run one install command, and add the node in the portal. A new node shows **VALIDATION PENDING**, then **AVAILABLE** once it passes its checks. That usually takes about 5 minutes. From then on it can be rented. ## Checklist: what costs you money if it is missing {#checklist-what-costs-you-money-if-it-is-missing} The portal **Overview** checks these for you. | Missing | What it costs | Fix | |---|---|---| | Discord connected | No subnet incentive | **Profile Settings → Discord** ([Connect Discord](./portal/discord.md)) | | Central Miner Server ON | No node is checked or listed | **Profile Settings → Central Miner Server → ON** | | Sysbox on the host | The node is never listed | [Sysbox](./nodes/sysbox.md) | | Download of at least 100 Mbit/s | The node is not listed | A faster uplink | | Disk of at least 1.5 × the GPU memory | No idle pay | [Docker storage](./nodes/docker-storage.md) on the large disk | | RAM of at least half the GPU memory | No idle pay | More RAM in the host | | Price at or under the soft limit | No idle pay | Check the [Rewards Calculator](./rewards/calculator.mdx), then [lower the price](./portal/managing-nodes.md#updating-prices) | | 8-GPU H200, B200, B300 or GB300: splitting, profiling or a confidential VM | No idle pay | [GPU splitting](./nodes/gpu-splitting.md), [GPU profiling](./nodes/gpu-profiling.md) or a [confidential VM](./nodes/cvm.md) | | Node software up to date | No subnet incentive | `docker compose pull`, then `docker compose up -d` | Rental fees are paid daily to your coldkey. Incentive is paid to your hotkey every tempo. An e-mail or Google account gets it in USDT with its rental fees. See [Payouts](./rewards/payouts.mdx#schedule--delay). ## Next steps - [Node Quickstart](./nodes/quickstart.md): bring your first GPU online - [Managing Nodes](./portal/managing-nodes.md): prices and notice periods - [Self-hosted provider](./self-hosted-provider.md): run your own provider server instead - [Architecture](./architecture.md): how the system fits together --- # Architecture How the parts of a Lium provider setup fit together. ## The two-component model 1. **Provider**: a small CPU coordinator (no GPU). It signs with your subnet 51 hotkey and talks to validators and the Provider Portal. 2. **Nodes**: your GPU machines. Validators check them and renters use them. ```mermaid graph TD A[Provider
CPU coordinator] --> B[Node 1
GPU] A --> C[Node 2
GPU] A --> D[Node N
GPU] V[Validators] -.scoring.-> B V -.scoring.-> C V -.scoring.-> D P[Provider Portal
provider.lium.io] --> A R[Renters] -.rentals.-> B R -.rentals.-> C R -.rentals.-> D style A fill:#1A75FF,stroke:#0066FF,stroke-width:2px,color:#fff style B fill:#161B22,stroke:#30363D,stroke-width:2px,color:#E6EDF3 style C fill:#161B22,stroke:#30363D,stroke-width:2px,color:#E6EDF3 style D fill:#161B22,stroke:#30363D,stroke-width:2px,color:#E6EDF3 ``` A provider with no nodes earns nothing. ## Where the provider runs | Option | Who runs it | Setup | |---|---|---| | **Central Provider Server** (default) | Lium | ON for every new account | | **Self-hosted provider** | You | [Self-hosted provider setup](./self-hosted-provider.md) | Switch in [Profile Settings](https://provider.lium.io/settings). See [Provider Configuration](./provider-configuration.md). You always run the nodes. ## How validators check your nodes - **Every node is checked** for Sysbox, its hardware and its GPU performance. A node without [Sysbox](./nodes/sysbox.md) is never listed. - **The results set your score**, and the score sets your incentive. Rental fees are separate: renters pay for the GPU-hours they use. See [Earnings](./portal/earnings.md). ## Supported GPUs {#supported-gpus} The validator accepts any NVIDIA GPU it can match to a supported model by memory (see below). All of them earn rental fees. A Secure node also earns idle pay from the **unrented pool** when its GPU model gets idle pay. The [rewards calculator](./rewards/calculator.mdx#gpu-market-overview-and-open-capacity) shows which models do. The live list, with prices and limits (`p_min`, `p_max`; see [Price limits](./portal/managing-nodes.md#price-limits)): ```bash curl https://lium.io/api/machines ``` The list below is a snapshot; the API is authoritative. An unlisted NVIDIA GPU is priced and paid like its reference model: the cheapest model with memory within 10% of the card's, else the cheapest with the next smaller memory. A card smaller than every model is not accepted. There is no price cap, but below the reference's `p_min` a Secure node is not listed until you raise the price. The minimum applies to Secure nodes only; Spot nodes have none. #### Datacenter: Hopper / Blackwell {#datacenter--hopper--blackwell} `B300 SXM6 AC`, `B300 SXM6 PC` (an alias of the AC card: one class, one price), `GB300`, `B200`, `GB200`, `H200`, `H200 NVL`, `H100 80GB HBM3`, `H100 NVL`, `H100 PCIe`, `H800 80GB HBM3`, `H800 NVL`, `H800 PCIe`. `GB200` and `GB300` run on Grace (ARM) hosts, and an NVL72 compute tray is a 4-GPU node: turn on [GPU splitting](./nodes/gpu-splitting.md) for idle pay. #### Datacenter: Ampere & inference {#datacenter--ampere--inference} `A100 80GB PCIe`, `A100-SXM4-80GB`, `A100-PCIE-40GB`, `A100-SXM4-40GB`, `A800 80GB PCIe`, `A10 Tensor Core`, `CMP 170HX`, `T4 Tensor Core`, `Tesla V100 Tensor Core`, `Tesla P100`, `Tesla P40`, `Tesla M40`. #### Workstation: Ada, Ampere, Blackwell {#workstation--ada-ampere-blackwell} `RTX 6000 Ada`, `RTX 5880 Ada`, `RTX 5000 Ada`, `RTX 4500 Ada`, `RTX PRO 6000 Blackwell` (Server / Workstation / Max-Q Workstation Editions), `RTX PRO 6000D Blackwell` (China SKU), `RTX PRO 5000 Blackwell`, `RTX PRO 4500 Blackwell`, `RTX PRO 4000 Blackwell`, `RTX PRO 2000 Blackwell`, `RTX A6000`, `RTX A5000`, `RTX A4500`, `RTX A4000`, `RTX A2000`, `L40S`, `L40`, `L4`. #### Workstation: older Quadro / TITAN {#workstation--older-quadro--titan} `Quadro RTX 8000`, `Quadro RTX 6000`, `Quadro RTX 5000`, `Quadro P4000`, `TITAN RTX`, `TITAN V`, `TITAN Xp`. #### Consumer: RTX 50-series {#consumer--rtx-50-series} `RTX 5090`, `RTX 5090 D` (its own class), `RTX 5080`, `RTX 5070 Ti`, `RTX 5070`, `RTX 5060 Ti`, `RTX 5060`. #### Consumer: RTX 40-series {#consumer--rtx-40-series} `RTX 4090`, `RTX 4090 D`, `RTX 4090 D 48GB` (its own class), `RTX 4090 48GB` (its own class), `RTX 4080 SUPER`, `RTX 4080 SUPER 32GB` (its own class), `RTX 4080`, `RTX 4080 32GB` (its own class), `RTX 4070 Ti SUPER`, `RTX 4070 Ti`, `RTX 4070 SUPER`, `RTX 4070`, `RTX 4060 Ti`, `RTX 4060`. #### Consumer: RTX 30-series {#consumer--rtx-30-series} `RTX 3090 Ti`, `RTX 3090`, `RTX 3080 Ti`, `RTX 3080`, `RTX 3080 20GB` (its own class), `RTX 3070 Ti`, `RTX 3070`, `RTX 3060 Ti`, `RTX 3060`, `RTX 3060 Laptop`, `RTX 3050`. #### Consumer: RTX 20-series & GTX 10/16-series {#consumer--rtx-20-series--gtx-1016-series} `RTX 2080 Ti`, `RTX 2080 Ti 22GB` (its own class), `RTX 2080 SUPER`, `RTX 2070 SUPER`, `RTX 2060 SUPER`, `RTX 2060`, `GTX 1660 Ti`, `GTX 1660 SUPER`, `GTX 1660`, `GTX 1080 Ti`, `GTX 1080`, `GTX 1070 Ti`, `GTX 1070`, `GTX 1060`. :::info Every model earns idle pay The **GPU Market Overview** table on the [rewards calculator](./rewards/calculator.mdx#gpu-market-overview-and-open-capacity) shows, per model, its price limits and whether it earns **Idle Incentive**. ::: :::tip CVM-eligible GPUs [Confidential VM](./nodes/cvm.md) nodes need Hopper (H100, H200) or Blackwell (B200, GB200). ::: ## Where to go next - [Quickstart](./quickstart.md): register and add your first node - [Node Quickstart](./nodes/quickstart.md): bring a GPU machine online - [Provider Portal](./portal/overview.md): day-to-day operations --- # Rental Workload Privacy Lium has a zero-tolerance privacy rule: **a provider who accesses, inspects, copies or interferes with a renter's workload is permanently banned from the Lium network.** The rule has been in force since 2026-08-19 and has been enforced. :::danger Do not touch a rental workload Do not access, inspect, modify, copy data from, or interfere with rental containers or the volumes attached to them. ::: ## Why this rule matters to providers Renters bring their models, data and code to Lium because this rule is enforced. That trust is what keeps demand coming to every honest provider's nodes. A permanent ban removes the rare provider who would put that at risk, so the network as a whole stays one that renters choose with confidence. ## How a ban works - A ban is permanent and follows the provider: it is matched by **hotkey, coldkey or GPU UUID**, so it covers every node the provider runs. - Banned nodes earn no subnet incentive and take no new rentals. - The details, including how running rentals and their payouts are handled, are in [Penalties → Provider ban](./rewards/penalties.mdx#provider-ban). ## Outbound traffic from rentals - You may block outbound port 25 (email) on a rented node. - You may also block rentals from reaching devices on your own local network, as long as the pod's DNS and internet access keep working. - Do not add any other outbound filter on a rented node, such as an allowlist of sites. Renters need open internet access. - If your ISP or the police report abuse from your node, open a ticket through the [official Discord support flow](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) with the time, the destination and the Node ID. Lium identifies the renter and handles the report. ## When an operation needs to touch a rental If an operation of yours needs to touch a rental workload, contact the Lium team **first**, through the [official Discord support flow](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support). For routine maintenance on a rented node, schedule a [Notice Period](./portal/managing-nodes.md#notice-period-management) so the renter is told in advance. --- # Provider Configuration The **provider** is the CPU coordinator that connects your GPU nodes to validators and the Provider Portal. It needs no GPU. See [Architecture](./architecture.md). | Option | Who runs it | Pick it when | |---|---|---| | **Central Provider Server** (default, recommended) | Lium | You want no server of your own | | **Self-hosted provider** | You | You want full control of the process and logs. See [Self-hosted provider setup](./self-hosted-provider.md). | Both are scored the same way, and the Central Provider Server costs nothing extra.
## The Central Miner Server switch The switch is in [Profile Settings](https://provider.lium.io/settings) under **Central Miner Configuration**. Changes apply at once. - **ON** (default): validators reach your nodes through Lium's central miner. Add your nodes in the Provider Portal; nothing else to run. - **OFF**: validators use the miner your hotkey serves on-chain, which you must keep running. ## Before you start - A coldkey and hotkey registered on subnet 51. - A sign-in to the [Provider Portal](https://provider.lium.io). ## Move from self-hosted to the Central Provider Server Your nodes keep their IDs, rentals and reliability history. 1. With the switch still OFF and your own provider running, click **Sync From Provider Server** on the [Nodes page](https://provider.lium.io/nodes). 2. Turn **Central Miner Server** ON in [Profile Settings](https://provider.lium.io/settings). If any active or rented node is not on the Nodes page yet, the switch stays OFF and lists the missing nodes (up to 10 at a time) with the reason for each; fix them and sync again. 3. Shut down your own provider when convenient. ## Next Steps 1. [Add your nodes](./portal/managing-nodes.md#adding-new-nodes). 2. [Monitor them](./portal/monitoring.md). --- # Self-Hosted Provider Setup The **self-hosted provider** is a small CPU coordinator that connects your GPU nodes to Lium. Skip this page if you use the [Central Provider Server](./provider-configuration.md), the default. How the parts fit: [Architecture](./architecture.md). :::info Turn the Central Miner Server switch OFF New accounts start with **Central Miner Server** ON. To run your own provider, turn it OFF in [Profile Settings](https://provider.lium.io/settings). ::: :::warning Coldkey safety Never put your coldkey on a provider server. Only the registered hotkey belongs there. ::: ## Before you start - A Bittensor wallet with its hotkey registered on subnet 51. See [Quickstart → Step 1](./quickstart.md#step-1--register-your-provider-on-subnet-51). - A host with no GPU needed: at least 4 cores, 8 GB RAM, 50 GB disk, 100 Mbps, Ubuntu 22.04 recommended. - Basic Linux and Docker skills. ## Install **1. Clone the repo** ```bash git clone https://github.com/Datura-ai/lium-io.git cd lium-io ``` **2. Run the installer** ```bash chmod +x scripts/install_miner_on_ubuntu.sh ./scripts/install_miner_on_ubuntu.sh ``` Check that `btcli --version` and `docker --version` work. **3. Configure `.env`** ```bash cp neurons/miners/.env.template neurons/miners/.env ``` ```bash BITTENSOR_WALLET_NAME=your_wallet_name BITTENSOR_WALLET_HOTKEY_NAME=your_hotkey_name EXTERNAL_IP_ADDRESS=your.server.ip.address HOST_WALLET_DIR=/home/your_user/.bittensor/wallets INTERNAL_PORT=8000 EXTERNAL_PORT=8000 ``` `EXTERNAL_PORT` must be open in your firewall and forwarded through any NAT. **4. Start it** ```bash cd neurons/miners docker compose up -d docker compose ps ``` ## Adding GPU nodes Add nodes in the [Provider Portal](./portal/managing-nodes.md#adding-new-nodes) (recommended); the portal pushes them to your provider. Or use the CLI below. ### Add a node from the CLI {#add-a-node-from-the-cli} ```bash docker exec pdm run src/cli.py add-executor \ --address \ --port ``` `--validator ` is optional; without it the main Lium validator is used. ### Remove a node {#remove-a-node} ```bash docker exec pdm run src/cli.py remove-executor \ --address \ --port ``` ### List attached nodes ```bash docker exec pdm run src/cli.py list-executors ``` ## Logs ```bash docker compose logs -f ``` Node status and validator results: [Monitoring](./portal/monitoring.md). ## Troubleshooting | Symptom | Likely cause | |---------|--------------| | Node not connecting | Firewall or NAT blocks `EXTERNAL_PORT`, wrong node IP, or node down | | Provider container crashes on start | `HOST_WALLET_DIR` missing or unreadable | | No rewards | Not scored yet (wait about 15 minutes) or node failing checks. See [Monitoring](./portal/monitoring.md). | ## Next - [Bring a GPU node online](./nodes/quickstart.md) - [Provider Portal overview](./portal/overview.md) --- import {sn51, links} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # How providers earn You earn in two streams: **rental fees** while renters use your GPUs, and **subnet emission** (idle pay and rented extra) from the validators. Both are paid in alpha by default. To see what your GPUs would earn, use the rewards calculator. ## The 30-second answer - **Rental fees:** of what renters pay for your GPUs. Paid once a day to your **coldkey**, with a delay. - **Subnet emission:** idle pay while your GPUs are not rented, and rented extra while they are. Added as stake on your **hotkey** every tempo (~72 minutes), about 24 hours after it is scored. An e-mail or Google account gets it in USDT with its rental fees ([Stablecoin payout](./payouts.mdx#stablecoin-payout-usdt-on-ethereum)). - **Where to look:** rental fees arrive as a daily transfer to your coldkey. Emission shows as growing **Stake** on your hotkey, not as a transfer. ## Next steps - **[Rental fees](./rental-fees.mdx)**: your share and how to set your price - **[Idle pay](./idle-pay.mdx)**: who qualifies for idle pay and how it is shared - **[Rewards calculator](./calculator.mdx)**: what GPUs of each type can earn on Lium a month, up to the top earners (the 95th percentile of providers) - **[Payouts](./payouts.mdx)**: where and when you are paid, and how to get TAO - **[Penalties](./penalties.mdx)**: what a failed rental costs you - **[FAQ](./faq.mdx)**: the most-asked questions --- import {sn51} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Rental fees When a renter uses your GPUs, they pay your hourly USD price. You get of it. Lium keeps the rest as the platform fee. ## Your share - ** of every rental payment**, the same for every provider. - **Paid daily** to your coldkey in alpha, or in USDT if you choose a [stablecoin payout](./payouts.mdx#stablecoin-payout-usdt-on-ethereum). - **A pod stopped for the renter's low balance** gives its GPUs back to your node at once, so they can be rented again. The renter's kept disk does not hold them, but it stays in use until it is deleted, so a new rent on those GPUs is offered only the disk that is free now. - **Example:** a renter pays $100 for your GPUs in a day. You receive × $100. ## Set your price **In the portal** Open **Provider Portal → Node Management** and set the hourly price for your GPUs. See [Updating Prices](../portal/managing-nodes.md#updating-prices). **With the CLI** Run it inside your [self-hosted provider](../self-hosted-provider.md) container: ```bash docker exec pdm run src/cli.py update-executor-price \ --address --port --price ``` ## Price limits - **Floor and hard cap:** each GPU model has an allowed range (`p_min` and `p_max` in `curl https://lium.io/api/machines`). The portal rejects prices outside it. The floor applies to Secure nodes only; Spot nodes have no minimum. A node priced above the hard cap drops off the marketplace. - **Soft limit:** above it, the node still rents but earns no idle pay. See [Price and the unrented incentive](./idle-pay.mdx#price-and-the-unrented-incentive). - **While rented:** one raise per calendar month (UTC) on a Secure node, or per 7 days on a Spot node, of at most 1.25 × the price the rental pays. Decreases are never limited. A price applied after the current rental ends has no limit. See [Price limits](../portal/managing-nodes.md#price-limits) for details. ## Where to see your history Open **Earnings** in the Provider Portal ([provider.lium.io/provider-earnings](https://provider.lium.io/provider-earnings)) for your daily rental income per node. ## When fees are withheld If a rental fails because of your node, the renter is refunded and you pay: - **A rental that ends while your node is inactive** costs you up to 24 hours of that rental's price ([conditions](./penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours)), taken from your later payouts. A [notice period](../portal/managing-nodes.md#notice-period-management) set at least 24 hours ahead waives it. - **A pod that could not be cleaned up** costs you 24 hours of that rental's price, the same way. See [Penalties](./penalties.mdx). --- import {sn51, protocol, links} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; import SoftLimitPrices from "@site/src/components/SoftLimitPrices"; # Idle pay and rented extra Idle pay and rented extra are your second income stream, next to [rental fees](./rental-fees.mdx). Validators pay them every tempo (~72 minutes) as alpha stake on your **hotkey**: **idle pay** while your GPUs are not rented, and **rented extra** while they are. An e-mail or Google account earns the same, paid in USDT ([Stablecoin payout](./payouts.mdx#stablecoin-payout-usdt-on-ethereum)).
**Bittensor protocol layer** (general context) Every {protocol.tempo_minutes_approx} minutes (~{protocol.tempo_blocks} blocks), Bittensor emits new TAO: {protocol.provider_emission_share_pct}% to providers, {protocol.validator_staker_emission_share_pct}% to validators and stakers, and {protocol.subnet_owner_emission_share_pct}% to subnet owners. Subnet 51 shares out its slice via **Yuma Consensus**. See Bittensor Emissions and Yuma Consensus.
## The three pools {#the-three-pools} Each cycle the validator splits Subnet 51's provider emission into three pools. | Pool | Share | Who earns | |---|---|---| | **Rented** | | Nodes whose GPUs are rented (rented extra) | | **Unrented** | 0 to | Idle nodes that qualify (idle pay) | | **Burn** | the rest of | UID 47, held by the Lium team, not providers | - The unrented and burn pools share the ceiling. More idle pay means less burn. - Lium can change the ceiling. The live value is `total_burn_emission` at lium.io/api/v1/shared-config. - The rented pool is split by GPU model. The live split is on Grafana: GPU model rate. ## Who qualifies for idle pay {#unrented-pool} A Secure node of every GPU model earns idle pay; a [Spot](../portal/node-tier.md#idle-pay-on-spot) node earns it only from what Default Jobs earn on its model. The rewards calculator shows each model's rate. An idle node earns from the unrented pool only when all of these are true: - **Not rented**, and not running your own [Default Job](../portal/default-jobs.md). Leave it on **Lium Default Job**. - **A validator score above `0`.** - **Enough disk:** total disk at least 1.5× the node's total VRAM. - **Enough RAM:** system RAM at least half the node's total VRAM (code `insufficient_ram_for_vram`). This is RAM, not disk: the 1.5× rule is for disk only. - **Price at or below the soft limit** (see [below](#price-and-the-unrented-incentive)). - **The node container can set a GPU power limit** (`nvidia-smi -pl`). See [GPU power cap](../nodes/gpu-power-cap.md). - **8× H200, B200, B300 or GB300 nodes** also need [GPU splitting](../nodes/gpu-splitting.md), [GPU Profiling (ncu)](../nodes/gpu-profiling.md) or an attested [confidential VM](../nodes/cvm.md). - **On a partly rented Secure split node, one free open port per free split.** The free GPUs are paid for one minimum-size split per free open port (at least 3 free ports in all): 8 free 1-GPU splits need 8 free ports. On Spot, the free GPUs of a partly rented node get Spot idle pay while a Lium Default Job runs on them, for their own GPU count, under the same port rule ([Idle pay on Spot](../portal/node-tier.md#idle-pay-on-spot)). A node that misses one stays rentable and keeps its rental fees. It loses only idle pay. An unrented node with fewer than 3 open ports (3 per split on a split node) fails validation, is not listed and earns no idle pay. On a partly rented split node, the free GPUs follow the idle-pay rule above, on Secure and on Spot. See [GPU splitting](../nodes/gpu-splitting.md). ## Sysbox is required {#sysbox-is-required} Without `sysbox-runc` running on your node, you earn nothing from any pool. See [Sysbox setup](../nodes/sysbox.md). ## Discord is required Idle pay and rented extra are paid only while your Discord account is connected in the Provider Portal and is a member of the Lium Discord server. Rental fees are not affected. See [Connect Discord](../portal/discord.md#discord-and-extra-incentives). ## A confirmed e-mail is required Confirm an e-mail address within 3 days. After that, idle pay and rented extra stop until it is confirmed. Rental fees are not affected. See [Connect an e-mail address](../portal/authentication.md#connect-an-e-mail-address). ## Price and the unrented incentive {#price-and-the-unrented-incentive} Each GPU model has a **soft limit**, a price per GPU-hour. Price an idle node at or below it to keep idle pay. Above it, the node still rents and earns rental fees, but earns no idle pay. A model marked `no limit yet` has no soft limit. - The soft limit is a fixed multiple of a stored market price per model. Lium updates that price by hand, so the limit does not move with the market day to day. Check it each time you change your price. - It is not the hard cap. A price above the hard cap drops the node off the marketplace. See [Price limits](../portal/managing-nodes.md#price-limits). - Lium sets a target idle rate per GPU model, in USD per GPU-hour. The rewards calculator shows today's target. Idle pay is paid in alpha from the unrented pool, so the USD an idle hour actually pays can be above or below the target: it moves with the alpha price, it can drop below the target when more GPUs of the model sit idle than its cap allows (see [when your GPU-count tier is full](#when-your-gpu-count-tier-is-full)), and the Secure floor below can lift it above the target. Your **Earnings** page shows what was paid. - Any other NVIDIA GPU earns the rates of its [reference model](../architecture.md#supported-gpus). ## GPU-count tiers and capacity caps {#gpu-count-tiers-and-capacity-caps} Idle pay is split into tiers: one GPU model at one GPU count, for example 8× H200. Each tier has its own rate and a cap on how many idle GPUs it pays in full. Today the priced counts are **1** and **8** GPUs. - **No priced tier, no idle pay.** A 4-GPU node earns no idle pay unless it uses GPU splitting (below). - **A full tier is shared.** With a cap of 64 and 128 idle GPUs, each node is paid `64 / 128 = 0.5` of the rate. - **Secure nodes have a floor.** An idle Secure node is paid at least what Lium's Default Job earns per GPU-hour on its configuration. The top-up comes out of burn. The node page in the portal shows your tier under **Idle Pay Tier**, with **Idle pay in the latest paid hour**: what the node was actually paid from the idle pool over its latest hour of paid cycles. A cycle is counted once it is paid, usually about a day after the cycle and sometimes a few hours more, so the card shows the UTC date and time that hour ends. The tier, cap and idle count beside it are live, so they can differ from that hour. When the paid cycles in that hour were recorded as rented and show no idle pay, the card says so. Above it, **Estimated idle pay, latest scored hour (not paid yet)** estimates the idle pay of the node's latest hour of scored cycles before they are paid: the idle share of each cycle still waiting for payment, at the recent pay rate per unit of score and the recent alpha price, refreshed about every 5 minutes. It is an estimate, not a payout: the paid amount can differ once the cycles settle. ## When your GPU-count tier is full {#when-your-gpu-count-tier-is-full} Turn on [GPU splitting](../nodes/gpu-splitting.md). Its minimum GPU count per rental gives the validator a second tier to rate your idle node against: - A node whose GPU count has no priced tier is rated in its minimum-split tier. - A node whose own tier is over its cap can move to its minimum-split tier for that cycle, if the whole node fits in that tier's free capacity. It is then paid that tier's rate, with no dilution. This is checked every cycle and the free capacity is shared, so a node can move one cycle and not the next. ## Free GPUs on a partially rented split node {#free-gpus-on-a-partially-rented-split-node} On a Secure split node with some GPUs rented, the rented GPUs earn rented extra and the free GPUs earn idle pay only for the splits the free ports support: one minimum-size split per free open port, and none with fewer than 3 free ports. Free GPUs left over below one whole split are paid with the last paid split. A failed port check costs idle pay only if another check fails within the hour. For example, 7 free GPUs with a minimum of 1 and 3 free ports earn idle pay for 3 GPUs. On a partly rented Spot split node, the free GPUs get Spot idle pay while a Lium Default Job runs on them, for their own GPU count and under the same port rule. See [Idle pay on Spot](../portal/node-tier.md#idle-pay-on-spot). Disk: the free GPUs are listed and earn idle pay only while the node has at least 50 GB free. Under that, none are; the rented GPUs keep earning. ## How emissions arrive {#how-emissions-arrive} - Emission is added as **alpha stake on your hotkey** every tempo (~72 minutes), about 24 hours after it is scored. An e-mail or Google account gets it in USDT with its rental fees ([Stablecoin payout](./payouts.mdx#stablecoin-payout-usdt-on-ethereum)). - It is not a transfer. Check your hotkey's **Stake** on the Subnet 51 page, not your wallet's transfers. - If a node is not active when its idle pay settles, that pay is held for about a day: paid if the node is active then, lost if not. A Spot node's idle pay is never held, including its first hours. - A deleted node's unsettled and held Secure idle pay is lost, unless the same machine is added again before that pay settles: under the same hotkey, with all the GPUs it had, on the same tier. Then it is paid as usual. A re-add that changes the tier (Secure to Spot) loses it, and so does a node that comes back with only some of its GPUs. Spot pay is not affected. - A penalized node's rented extra for the hours its [penalty](./penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours) charges is not paid. See [Payouts](./payouts.mdx). ## Where to monitor - **Incentive history** on a node's day in [Earnings](../portal/earnings.md): the reasons when a cycle paid nothing. - Grafana: GPU model rate: the rented pool per GPU model. - Lium rewards calculator: idle rates per GPU model. - TAO Market Cap: Subnet 51 --- import {sn51} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Rewards calculator The [rewards calculator](https://provider.lium.io/rewards-calculator) shows what this many GPUs of one type would earn on Lium in a month. It uses what GPUs of that type earned over the last 30 days, plus idle pay at the validator's target rate for every hour not rented. Every supported GPU type is listed. A type with no 30-day history on Lium yet shows idle pay at the validator's target rate; enter your price and percent rented under **Advanced** to add the rental share. ## Use it **Pick a GPU** from the list. **Enter how many** GPUs you would add. The result updates as you type. **Optional: open Advanced** to enter your own price and the percent of time you expect to be rented. A price above the type's soft limit sets idle pay to $0. ## Read the result The headline is the month's total for your GPUs, with the per-day figure under it. It is the sum of three cards: | Card | What it is | |---|---| | **From rentals** | of the type's average rental price, for the share of hours it was rented | | **Idle pay** | the validator's target idle rate for the type, for every hour not rented; paid in alpha from the unrented pool, so what an idle hour pays in USD moves with the alpha price and with how many GPUs of the model are idle, and can be above or below the target: it can be below when more are idle than its cap allows, above when the Secure floor lifts it | | **Rented extra** | the average bonus paid on rented hours of that type | Below the cards: how many GPUs of the type are listed and rented right now. ## What a GPU can earn on Lium The box plot shows what a GPU can earn per month, for each type with ten or more providers: - **Top earners:** the right end of the whisker, the 95th percentile. - **Typical provider:** the line in the box. - **Most providers:** the box, the middle half. It uses the same basis as the calculator: each provider's last 30 days of rentals, plus full idle pay for every hour not rented and the rented extra. These are potential earnings, not actual payouts. A provider paid more than that keeps their higher figure. ## What it does not tell you - **It is the last 30 days, not a promise.** Prices, demand and idle rates change. - **It assumes your node qualifies for idle pay.** A node that does not (see [who qualifies](./idle-pay.mdx#unrented-pool)), or a Spot node, earns less. ## GPU market overview and idle pay {#gpu-market-overview-and-open-capacity} Further down the page are two live tables. Read them before you buy hardware or set a price. - **Open Earning Capacity:** for each GPU type (a model paid its own rate, such as H100 PCIe, has its own row), the full idle rate per GPU, Spot idle pay per GPU at most at 1× and 8× (it follows what Default Jobs earned per GPU at that node size in the last 24 hours, so the two sizes differ; paid only while a Default Job runs, shared when many Spot nodes of a GPU type are idle; see [Idle pay on Spot](../portal/node-tier.md#idle-pay-on-spot)), the paid idle slots still open at 1× and 8×, and what one more idle GPU would earn now at each size. Past a size's slots, its pay is shared among all its idle GPUs. An NVIDIA GPU model not listed is paid as the cheapest listed model with similar memory, or otherwise with the nearest smaller memory. A 2× or 4× node earns idle pay only with [GPU splitting](../nodes/gpu-splitting.md) on. Rates are subject to change. - **GPU Market Overview:** every GPU type the marketplace supports, with GPUs listed and rented now, the share of time rented over 30 days, median price, price limits and soft limit. For each node's asking and rented price, see the [Marketplace prices](https://grafana.lium.io/d/marketplace-prices-v1?orgId=2) dashboard. --- import {sn51, protocol} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Payouts You earn in two streams, paid at different times to different places. By default both are paid as **SN51 alpha stake**, which you can unstake to TAO. You can take rental fees in **USDT** instead. ## Schedule {#schedule--delay} | Stream | What it is | Paid as | Lands on | When | |---|---|---|---|---| | **Rental fees** | of what renters pay for your GPUs | SN51 alpha (default) or USDT | your **coldkey** (or your USDT address) | daily at 17:00 UTC, for the day earlier | | **Subnet emission** (idle pay and rented extra) | your share of SN51 emission | SN51 alpha (USDT for an e-mail or Google account) | your **hotkey** (or your USDT address) | every tempo (~{protocol.tempo_minutes_approx} minutes), about 24 hours after it is scored | - **Emission is paid only while your Discord account is connected** in the Provider Portal. See [Connect Discord](../portal/discord.md#discord-and-extra-incentives). - **Idle pay needs the node active when it is paid**, about 24 hours after it is earned. If the node is offline or removed by then, that idle pay is lost. Before removing a node, pause new rentals and keep it online for about a day. See [How emissions arrive](./idle-pay.mdx#how-emissions-arrive). - **Your next rental payout** is on the Provider Portal **Overview**. - See [Rental fees](./rental-fees.mdx) and [Idle pay](./idle-pay.mdx) for how each is calculated. ## Stablecoin payout (USDT on Ethereum) {#stablecoin-payout-usdt-on-ethereum} You can be paid your rental fees **daily in USDT on Ethereum** instead of alpha. Emission stays alpha. An account signed up with e-mail or Google has no hotkey of its own, so it cannot be paid in alpha and uses this payout. An e-mail or Google account earns the same idle pay and rented extra as a node on your own hotkey. Each epoch's share is valued at that epoch's alpha price and paid in USDT with your rental fees, less the conversion fee. - **Minimum payout:** $5 (you can set it higher). - **Conversion fee:** {sn51.usdt_conversion_fee_pct}% of each payout. Lium pays the network fee. - **Daily cap:** at most $25,000 per account per day. The rest is paid on the next days. **Set your payout address** In the portal, open **Settings → Payout**: 1. Choose *Stablecoin payout (USDT on Ethereum)*. 2. Enter your USDT address (Ethereum). 3. Set your minimum payout. 4. If the address is new, confirm it, and save: with the code we e-mail you, or, if your account has no confirmed e-mail, by signing with your hotkey. With two-factor on, also enter a code from your authenticator app. To withdraw referral rewards in USDT only, keep *Daily payout* and enter and confirm the address. Your rental fees stay as they are. **Also pay your incentive in USDT** With your own hotkey, emission (idle pay and the rented extra) stays alpha on your hotkey. To get it in USDT too, tick *Also pay my incentive in USDT* in **Settings → Payout** and save. The save asks for the code we e-mail you, plus your authenticator code when two-factor is on. It is one way: - Your nodes are listed under the Lium hotkey and served by Central Miner Server. Your hotkey stops getting alpha for them. - All your earnings are paid in USDT: rentals, idle pay and the rented extra. - Rented nodes keep running; the move waits until their rentals end (checked every hour). - You need Central Miner Server turned on, a confirmed e-mail no other provider account uses, and no open earnings adjustment. - Only support can undo it: write to support@lium.io. **After you save** Each day's rental fees go to your **USD balance**. Once it reaches your minimum, it is sent to your address in the next daily payout. The Payout card shows your balance, next payout and last payout. **No payout address yet?** Your earnings stay on your balance. If your e-mail is confirmed and e-mail notices are enabled, we e-mail you a reminder when your balance reaches your minimum and no payout address is saved, then at most once a week while your balance remains at or above your minimum and no address is saved. ## How to receive as TAO {#how-to-receive-as-tao} Rental alpha and emission are SN51 stake. Find them in your wallet's **Stake** view. 1. **Unstake** on Subnet 51 with the coldkey that controls the stake. You get TAO at the current pool price. See the [Bittensor remove-stake guide](https://www.bittensor.com/docs/tx/remove-stake). 2. **Optional:** swap TAO for another asset on an exchange. There is no unbonding period: the TAO is spendable once the transaction settles. ## If a rental fails on your node {#misbehavior-decline} - **A rental that ends while your node is inactive** costs you up to 24 hours of that rental's price ([conditions](./penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours)), taken from your later payouts and, while you owe it, your rented extra. A [notice period](../portal/managing-nodes.md#notice-period-management) set at least 24 hours ahead waives it. - **A pod that could not be cleaned up** costs you 24 hours of that rental's price, the same way. See [Penalties](./penalties.mdx) for details. --- import {sn51} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Penalties When a rental fails because of a problem on your node, the renter is refunded and you pay for it. Penalties take **rental fees** and, while you owe a debt, your **rented extra**. Idle pay, the rest of [subnet emission](./idle-pay.mdx), is never touched. ## Read this before you list a Secure node {#read-this-first} :::danger The 24-hour rule If a rental ends while your **Secure** node is inactive, you pay for **up to 24 hours of that rental's price** ([conditions](#a-rental-that-ends-on-an-inactive-node-24-hours)), however short the rental was. The charge is **not capped** by what the rental earned you. Until it is paid, **all of your rental-fee payouts** go to it. A [notice period](../portal/managing-nodes.md#notice-period-management) set at least 24 hours ahead waives it. ::: **What it costs: examples** You keep of the rental price, so a penalty costs 24 hours × the price × . | Rental | Ran before your node went inactive | You lose | |---|---|---| | 1× H100 at $2.00 per GPU-hour | 2 hours | 24 × $2.00 × = **$45.60** | | 8× H100 at $2.00 per GPU-hour | 2 hours | 24 × $16.00 × = **$364.80** | | 8× B200 at $5.00 per GPU-hour | 30 minutes | 24 × $40.00 × = **$912.00** | The rental's own fees are withheld, and the rest becomes a **debt**. In the first example, you earned $3.80 on the 2 hours. That $3.80 is withheld and $41.80 becomes debt. Several dropped rentals on 8-GPU nodes in a few days add up to thousands of dollars. **How the debt is paid** - Each daily rental-fee payout goes **entirely to the debt** until the debt reaches $0. - Your payout is **$0** on those days. - The debt is per coldkey, so it is paid from the rental fees of all your nodes. Example: a $364.80 debt with $150 a day in rental fees means about 3 days of $0 payouts. - While the debt is over $1, the **rented extra** of your rented nodes also goes to it, up to what you still owe, about 6 hours after its window settles. It shows on your debt history as `rented_extra_recovery`. **How to avoid it** - **Keep the node verified.** It is inactive once the validator has not verified it for more than 45 minutes. - **Put a node you cannot keep stable on [Spot](../portal/node-tier.md).** A dropped Spot rental costs you nothing. - **Set a notice period** at least 24 hours before planned maintenance on a rented node. ## What a penalty costs ### A rental that ends on an inactive node: 24 hours {#a-rental-that-ends-on-an-inactive-node-24-hours} - Your node is **inactive** when the validator has not verified it for more than 45 minutes. - If a rental **ends** while the node is inactive, you lose **24 hours of that rental's price**, even if the rental was shorter. - If the node is still reachable and only some of its GPUs dropped out, you lose 24 hours of the price of **the lost GPUs only**. A 1-GPU rental, or one where every GPU dropped, still costs the whole rental's price. - The renter is refunded 24 hours of the price, or everything the rental billed if that is less. - Your share is booked as a **debt**. **All** of your later rental-fee payouts go to it until it is paid off, so a daily payout can be $0 meanwhile. See [the examples](#read-this-first). - You also lose that node's **rented extra** for the hours the penalty charges, counted back from the outage to the rental's start, unless it was already paid out. It is not paid back. - A node that comes back before its rental ends is not penalised. - A node the validator reached but left unverified only because it is registered twice is not counted as down for this penalty, unless it went silent after that. - Time the validator cannot check your node counts against you, unless your node's latest check, at most 45 minutes before the rental ended, could not reach the node and the renter's pod answered SSH in it. If a later check finds the pod silent or skips the node, earlier answers no longer count. An outage on the validator's side does not count. - A renter deleting the pod does not make you safe. If your node went down before the delete and the pod still cannot be removed, the rental ends on an outage and costs the same 24 hours, even if the node looked active when the renter clicked delete. ### Every other penalty: 24 hours - Every penalty costs **24 hours of the rental's price**, whatever its reason, booked as a debt the same way. This includes a pod the validator cannot remove from your node **while it can still reach the node**. - The renter is refunded 24 hours of the price, or everything the rental billed if that is less. ## What triggers a penalty {#what-triggers-a-penalty} | Reason code | What happened | |---|---| | `EXECUTOR_INACTIVE_MID_RENTAL` | A rental ended while your node was inactive. | | `POD_UNDEPLOY_FAILED` | The validator could not remove the pod from your node, although the node was reachable. Costs 24 hours of the rental's price. | | `SSH_CONNECTION_FAILED` | Monitoring could not reach the renter's pod over SSH. Costs 24 hours of the rental's price. | | `BROKEN_BY_PROVIDER` | You force-closed a rented pod in the Provider Portal. Costs 24 hours of the rental's price. | `MANUAL` marks a penalty the Lium team applied by hand. It costs 24 hours of the rental's price too. :::note Force-closing a stuck pod is still the right action: it frees your node and ends a rental the renter cannot use. See [Force-closing a pod](../portal/managing-nodes.md#force-closing-a-pod-mark-broken). ::: ## When nothing is charged {#when-a-penalty-is-recorded-but-not-charged} These are recorded as a dry run (`dry_run = true`) and withhold nothing: - **Spot rentals.** A rental that started while the node was [Spot](../portal/node-tier.md) is never charged. - **Notice periods.** You set a notice period at least 24 hours ahead (48 hours for one over 60 minutes), or a [Late Notice](../portal/managing-nodes.md#notice-period-management), then reclaimed the node, and the rental ended (or its removal was requested) during the notice period or within 3 hours after it. The 3 hours stop early once a check after the window has put the node back: an outage after that is a new one and is charged as usual. A renter who ends a rental during a Late Notice gets the Late Notice credit instead, and you owe your share of it. This waives only the inactivity and undeploy-failure penalties, and a waived penalty does not count toward your reliability rating: force-closing a rented pod in the Provider Portal (`BROKEN_BY_PROVIDER`) is charged as usual. If the node is still down when a rental ends later than that, the full 24-hour penalty applies. The exception is a rental Lium itself closes because you reclaimed the noticed node: that close stays waived however long after the notice period it lands. ## Where to see your penalties {#what-a-penalty-event-records} - **Provider Portal → Overview:** the **Penalties, last 14 days** card shows what was withheld and what was a dry run. - **Provider Portal → Penalties:** each penalty shows the amount withheld, what the renter was refunded, what was booked as debt and the hours charged. - **[Penalty Events dashboard](https://grafana.lium.io/d/b7b972f3-a083-415f-886d-ae5b12e2371b/penalty-events?orgId=2):** every penalty. Filter by `miner_hotkey` and `executor_id`. `amount_withheld` is the amount, `dry_run = true` means nothing was charged, and `action = revert` means it was undone. See [Grafana Dashboards](../grafana.md#penalty-events). ## Effect on your node tier {#effect-on-your-node-tier} Penalties do not move your nodes to Spot for now. Your **penalty coverage**, the amount withheld over the last as a share of your rental revenue, still feeds your reliability score and shows on the portal Overview. The debt from a [Late Notice](../portal/managing-nodes.md#notice-period-management) does not count toward it. Penalties and rentals count toward the hotkey the node is registered under. A node removed and added again under another hotkey starts with a clean record there; its history stays with the old key. Keys we link to one owner are scored together. ## Provider ban {#provider-ban} A ban is not a penalty. The Lium team applies it by hand for network abuse, by hotkey, coldkey or GPU UUID, so it covers all of your nodes. - Banned nodes earn no subnet incentive and take no new rentals. - A running rental is not stopped and its fees are paid, except its final two billing days, which are withheld (shown as `provider_banned` on Earnings). - You can still sign in and see the ban notice and how to appeal. - **Add Node** and **Edit Address** answer `400 PROVIDER_BANNED` with the ban message. - A sync adds or changes no nodes, whether your own miner runs it (own key) or the pool's miner does (pool account). The Nodes page shows the ban as the reason for each node the sync skipped. A pool node the ban removed, or one with no renter's pod, leaves the pool's sync, so it shows no reason. - Nodes that no validator has checked yet are removed when the ban is applied. An unban does not bring them back: add them again. ## If you think a penalty is wrong {#if-you-think-a-penalty-is-wrong} **Open a support ticket** Use the [official Discord support flow](../../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) and include: - the node id (or hotkey) and the pod id, - the time of the penalty, from the dashboard, - why you think it is wrong. If the portal's **Penalties** page offers **Dispute** on the penalty, you can use it instead, within 30 days of the penalty. **If it is reverted** The withheld amount is paid to you, and the penalty stops counting toward your coverage. For a 24-hour penalty, the whole debt is canceled. **Other outcomes are not a revert** Only a revert pays back everything that was withheld. The answer to your ticket or dispute says which outcome applies. - **Record-only reset:** the penalty stops counting toward your coverage. No money moves: what was withheld or booked as debt stays. - **Lower amount:** for a 24-hour penalty, the debt drops to a smaller amount, and the penalty counts toward your coverage at the lowered amount (in the same proportion as the debt), still as one penalty. Only what payouts already took above the new amount is paid back. - **Debt write-off:** what you still owe is canceled. Earnings already applied to the debt are not paid back. **When the cause was on our side** If a platform incident caused the penalty, open a support ticket, not a portal dispute. The Lium team reverts the penalties on the affected nodes, and renters keep their refunds. ## Reducing penalties {#reducing-penalties} - **Keep the node reachable and verified.** See [Troubleshooting](../troubleshooting.md). - **Bring an inactive node back before its rental ends.** - **Set a notice period** before planned maintenance on a rented node. - **Move nodes you cannot keep stable to [Spot](../portal/node-tier.md).** A failed rental there costs you nothing. --- # Reserved rentals (30 days) Clients rent in two modes: On-demand and Reserved. You can offer a Secure node for Reserved 30-day terms at a Reserved price. A client then rents the whole node for 30 days, billed per second at that price. You and the client each hold a deposit of 7 days of that price. Spot nodes do not take reserved rentals. A node that offers Reserved stays listed for On-demand rentals too: the first client to rent it takes it. While an On-demand rental holds any GPU of the node, clients do not see its Reserved offer; they see it again when the whole node is free. While a Reserved rental runs, the node takes no On-demand rental. ## Turn it on On the provider portal, open **Nodes** and click **Change price** on a Secure node. Tick **Offer Reserved rentals** and set the Reserved price in one of two ways: - **Fixed price**: the price per hour for the whole node. - **% off on-demand**: a percent off the node's On-demand price (GPU price × GPU count). The Reserved price of new rentals then follows every change of your On-demand price. The dialog shows the result live: the whole-node price per hour, the 30-day total and the deposit. There is no approval step per rental. On **Nodes**, the **Reserved** column shows each node's Reserved price and its state: the deposit still filling (yellow), ready for clients (green), or rented for 30 days (blue). Hover it for what the state means. The node's own page has a **Reserved rentals** section with the price, the deposit, the running rental and the deposits moved to clients. The node needs a deposit of 7 days of its Reserved price (price × 168). It is taken from your payouts: **all your payouts are held until the deposit is full**, and the node takes reserved rentals only then. The node page shows the amount needed and the amount collected. Reserved rentals need a USD payout rail (USDT or bank): the deposit is taken from USD earnings, which the alpha rail never holds. The portal refuses to turn a node on while your payouts are on alpha, and refuses a switch to alpha while a node is on. You can change the Reserved price at any time. A running reserved rental keeps the price it started with. The deposit follows the current price: when the price goes down, the excess returns to your payout balance once no reserved rental runs on the node; when the price goes up, the shortfall is taken from your payouts. ## Renewals A client can renew a running rental for 30 more days at the price it started with, from 7 days before its end. You have two ways to stop that, and both work while the rental runs: - Turn the Reserved offer off (see below). The rental then ends on its end date. - Change the Reserved price. A rental cannot be renewed at its old price after that. Do one of them before the rental ends if you want a higher price or want to stop offering Reserved. When an unrenewed rental ends, the client's pod continues as an On-demand rental at your listed price. ## Turn it off or remove the node Turn the offer off with the **Offer Reserved rentals** switch on the node page, or untick it in **Change price**. You can turn it off at any time, also while a reserved rental runs: new reserved rentals and renewals stop at once, and the running rental goes on to its end date. Turning the offer off, deleting the node, or deleting the account returns the held deposit to your payout balance within a minute, or after the running reserved rental ends. A node deleted while a reserved rental runs on it keeps its deposit locked until that rental ends. ## What a client's term means for you | What happens | Your deposit | Client's deposit | |---|---|---| | The 30-day term ends | Stays with you | Returned to the client; an unrenewed pod runs on as an ordinary rental at your listed price | | The client leaves early, no outage | Stays with you | Paid to you, less the Lium fee, as earnings after a 7-day review hold; the client can dispute it with support in that time | | The node is down 1 to 4 hours and the client leaves | Stays with you | Returned; you pay 24 hours of the price, as for any rental | | The node is down 4 hours or more and the client leaves | Paid to the client, in place of the 24 hours | Returned | | A second outage in the same 30-day term | Paid to the client; the term ends | Returned | | You remove the node, give a permanent removal notice for it, end the client's rental (**Remove pod**), or it is down 24 hours | Paid to the client; the term ends. No 24-hour fee | Returned | | The pod never starts, or Lium ends it (not you, not the client) | Stays with you; the term ends | Returned | | Planned maintenance under the notice periods, or a Lium incident | No change | No change | An outage is the node down for an hour or more. A shorter drop is not an outage: no fee, it does not count toward the second outage and opens no 48-hour window, and the client is not billed for that time. If one node's short drops add up to an hour within a week, they count as one outage. ## Disputes Every deposit that moves from one side to the other is held for review for 7 days before it is paid out, and the side that loses it can dispute it in that time. Your deposit paid to a client (after an outage, a second outage, 24 hours down, or a removal of the node, a permanent removal notice and a **Remove pod** included) is held for 7 days. The node page lists it under **Deposits moved to clients**. To dispute it, for example when the client's own job took the node down, write to support in [Discord](https://discord.gg/lium) while it is held. The Lium team decides it; if the outage does not count, you keep the deposit. A disputed transfer has no deadline: it stays held until the team decides it. If the outage does not count and the node no longer takes reserved rentals (opted out, deleted, or its account closed), the deposit is released to that account's payout balance like its other earnings. --- import {sn51} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Provider referrals Bring another provider to Lium. For each GPU they list that is **new to Lium**, you earn of its rental billing for . The provider you refer earns a bonus on the same GPUs for the same time, on top of their full rental share. Both come out of Lium's fee. ## How to refer a provider 1. Open [Refer a Provider](https://provider.lium.io/referrals/providers) and sign in with any e-mail or Google account (no node needed). Copy your code (`PROV-…`) or your link. 2. Send it to the provider. They sign up through your link, or enter your code on the signup form or under **Were you referred?** on their Overview or on [Refer a Provider](https://provider.lium.io/referrals/providers), within of their first sign-in. 3. They list their GPUs. Each GPU that is new to Lium starts earning for you from its first billed day. ## What counts as a new GPU A GPU earns only if Lium has never seen its UUID before, on any account, and it first appears on the referred provider's own node. These do not earn: - GPUs that were on Lium before, including the referred provider's own earlier cards or cards moved from another account. - MIG slices and other UUIDs that are not a physical GPU. - Sets of UUIDs that look generated (they differ only in their last bytes). Each GPU is judged once and the decision is final, except that a GPU that earned alone stops earning once the rest of such a generated-looking set shows up. A node with some new GPUs pays in proportion: 6 new out of 8 pays 6/8. ## How you are paid 1. Rewards collect in your **referral balance** on the Refer a Provider page. The referred provider's bonus collects in their own referral balance and is withdrawn the same way. 2. A reward can be withdrawn as soon as it is earned. If the rental behind it is refunded or declined later, the reward is taken back from your balance. 3. Click **Withdraw** once at least $ is available. Choose: - **USDT on Ethereum**, to the payout address saved under **Settings**, or - **Lium credits**, added to the lium.io account with the same verified e-mail as your provider account. An account made with e-mail or Google is paid in USDT only. ## Limits - Rentals by you or by the referred provider do not count. - You may refer a provider you also run or work with: their new GPUs count the same. A link Lium revokes stops earning; what you already earned stays in your balance. - A provider can be referred only once, and not with their own code. - If a code came from a second, empty account opened for the e-mail of your hotkey account, it earns for your hotkey account. - The rate and duration are Lium settings and may change, or the program may end ([Terms of Service](https://lium.io/terms), section 9). Referring renters instead? See [Refer & Earn](/pod-users/refer-and-earn) (a separate program with `LIUM-` codes). --- import {sn51, links} from "@site/src/data/rewards-numbers"; import Pct from "@site/src/components/Pct"; # Rewards FAQ ## How much will I earn? Use the rewards calculator. Pick your GPU and count to see what those GPUs earned on Lium per month over the last 30 days. See [Rewards calculator](./calculator.mdx). ## Why did I earn less than the calculator showed? The calculator shows the average for your GPU type, not your node. The usual reasons: - **Rented less** than the average, often because of a higher price. - **No idle pay** for some hours. See [who qualifies](./idle-pay.mdx#unrented-pool). - **Sysbox not running.** Your score is `0` for that time. - **A full tier.** Idle pay is shared when your tier is over its cap. - **Penalties** on failed rentals. See [Penalties](./penalties.mdx). ## When do I get paid? - **Rental fees:** daily to your coldkey, after the day earned. - **Subnet emission:** stake on your hotkey every tempo (~72 minutes), about 24 hours after it is scored. An e-mail or Google account gets it in USDT with its rental fees ([Stablecoin payout](./payouts.mdx#stablecoin-payout-usdt-on-ethereum)). There is no faster rental payout. See [Payouts](./payouts.mdx). ## How do I cash out to TAO? Unstake your Subnet 51 alpha with the coldkey that controls it. You get TAO at the current pool price, with no unbonding period. See [How to receive as TAO](./payouts.mdx#how-to-receive-as-tao). ## How do I earn more? - Keep `sysbox-runc` running on every node. - Price at or below the soft limit, and low enough to get rented. - Leave idle nodes on **Lium Default Job**. - Turn on [GPU splitting](../nodes/gpu-splitting.md) on multi-GPU nodes. - Keep nodes online and verified. ## My idle node's rate changed and I didn't change anything. Why? {#8-my-idle-nodes-rate-changed-and-i-didnt-change-anything-why} Idle pay is shared within a tier: one GPU model at one GPU count. When a tier holds more idle GPUs than its cap, every idle GPU in it earns a smaller share. With GPU splitting, your node can also move between tiers from cycle to cycle. Neither is a penalty. A Secure node is never paid less than what Lium's Default Job earns on its configuration. The portal node page shows your tier, its cap, the share it pays and what it was paid in its latest paid hour under **Idle Pay Tier**. To stop depending on shared idle pay, price the node so it rents. --- # Nodes A **node** is a GPU machine you connect to your provider so Lium customers can rent it. Your idle pay and rental income both come from your nodes. ## Set up a node | Path | Best for | Time | |------|----------|------| | [**Node Quickstart**](./quickstart.md) | Most providers: one command sets up the node | ~5 min | | [Confidential VM (CVM)](./cvm.md) | TDX-isolated nodes | Advanced | ## After the node runs - [**Docker storage setup**](./docker-storage.md): needed for GPU splitting. - [**GPU splitting**](./gpu-splitting.md): rent parts of one node to several renters. - [**GPU Profiling (ncu)**](./gpu-profiling.md): let renters run Nsight Compute. The node is then rented whole only. - [**GPU power cap**](./gpu-power-cap.md): check it when a node stops earning idle pay. :::info 8× H200 / B200 / B300 / GB300 nodes Renters mostly rent these whole. A full 8× node of these models earns the [unrented incentive](../rewards/idle-pay.mdx#unrented-pool) only with [GPU Profiling](./gpu-profiling.md#8x-nodes), [GPU splitting](./gpu-splitting.md#8x-nodes) or an attested [confidential VM](./cvm.md). Without one, it stays rentable but earns no idle pay. ::: ## One node, one fixed set of GPUs {#one-node-one-fixed-set-of-gpus} The validator records the node's GPUs on its first successful check. If a card goes missing, the check fails as `GPU_MISSING` and the node scores 0 until every card is visible again. If a card is swapped for another, it fails as `GPU_UUID_CHANGED` and the node scores 0. **If you replaced the GPUs** If every card was replaced with the same GPU model and number of GPUs (for example after a VM host reboot; B300 SXM6 AC and PC count as the same model), keep the node; do not remove it. It is checked again with the new GPUs and keeps its node ID. A pod rented on it is restarted on the new GPUs: the renter keeps the rental and the pod's disk (usually `/root`) and volumes. This also works when several of your VMs restart together and the GPUs move between them: a node gets cards that another of your nodes listed once that node's latest check has failed and that check found its pod, which answered SSH before, no longer answering. While the other node's pod still answers, its SSH was not checked, or that failed check is more than 30 minutes old, it keeps the cards. **To list any other set of GPUs** If the node's GPUs change to a different model, the node stays unverified. Restore this node's original GPUs or point it back to its original machine. To register another machine at the same IP and port, first free that address by updating the existing node's address or deleting the existing node. A rented node cannot be deleted. Renamed cards of the same model are unaffected. Delete the node in the portal and register it again. It starts as a new node: uptime starts at 0, and penalties on the old node stay. ## Add or change ports {#add-or-change-ports} An idle node needs at least 3 free ports to be listed, and an idle [split node](./gpu-splitting.md) 3 per split. Each rental then takes 1 free port for SSH, plus 1 for Jupyter if the renter uses it. Running pods hold their ports, so a busy node can run out and its free GPUs are hidden (`INSUFFICIENT_PORTS`). **Add ports** 1. On the host, open `~/compute-subnet/neurons/executor/.env`. 2. Set a wider range, for example `RENTING_PORT_RANGE="40000-41000"`. 3. Open that range in your firewall, cloud security group or router. 4. Restart the node. Pods keep running. ```bash cd ~/compute-subnet/neurons/executor && docker compose up -d --force-recreate ``` The next check counts the new ports. ### Router forwards to different host ports {#port-mappings} `RENTING_PORT_RANGE` assumes each port is the same number outside and on the host. If your router or proxy forwards an outside port to a different port on the host (for example outside `50001` to host `40001`), list the pairs in `RENTING_PORT_MAPPINGS` instead: 1. In `~/compute-subnet/neurons/executor/.env`, remove or comment out `RENTING_PORT_RANGE` (when both are set, only `RENTING_PORT_MAPPINGS` is used). 2. Add one `[host_port, outside_port]` pair per forwarded port, host port first. At least 3 pairs, not including the SSH port: ```bash RENTING_PORT_MAPPINGS="[[40001, 50001], [40002, 50002], [40003, 50003]]" ``` 3. On the router, forward each outside port to its paired host port on the node (outside `50001` to host `40001`, and so on). 4. If the router also moves the node's SSH port, set `SSH_PUBLIC_PORT` to the outside SSH port (`SSH_PORT` stays the host port). 5. Restart the node with the command above. Check that the container has the setting: ```bash docker exec executor-executor-1 printenv RENTING_PORT_MAPPINGS ``` To test one pair, listen on the host port and connect to the outside port from a machine outside your network (with your public IP in place of `203.0.113.10`): ```bash # on the node python3 -m http.server 40001 --directory "$(mktemp -d)" # from outside curl -sI http://203.0.113.10:50001/ ``` A `200 OK` answer means the forward works; stop the test server afterwards. The validator does the same on its next check: it listens on each host port and connects to your public IP on the paired outside port, and a rental's pod ports are published on the host ports while renters connect to the outside ports. ## Automatic updates The `executor-watchtower-1` container keeps the node software current. Check it on the host (`EXTERNAL_PORT` is in your `.env`): ```bash curl -s http://127.0.0.1:/update-status ``` `runner.update_pending` must be `false`. **Stack installed before 18 September 2026?** It moves onto the current updater by itself. Only if `update-status` does not answer or the node still reports `EXECUTOR_IMAGE_OUTDATED`, run this once. The node container restarts once; pods keep running. If the host has no runner container, run it, then follow the no-runner step in [Move the node onto the updater](./gpu-power-cap.md#move-the-node-onto-the-updater-once). ```bash cd ~/compute-subnet/neurons/executor && git pull && docker compose pull watchtower && docker compose up -d watchtower ``` Details: [GPU power cap → The standard stack, which stopped updating](./gpu-power-cap.md#the-standard-stack-which-stopped-updating). ## Templates downloaded ahead While a node is idle, it downloads the most-rented templates for its GPU type, so rentals start faster. It downloads only while at least 200 GB of disk stays free, and stops as soon as a rental starts. To turn it off, set `PRE_PULL_TEMPLATES_ENABLED=false` in the node's `.env` and restart the executor. ## Operate your nodes Prices, notice periods and deletion: [Managing Nodes](../portal/managing-nodes.md). --- # Node Quickstart Bring a GPU machine online as a Lium node in two steps: run one install command, and add the node in the Provider Portal. You need a provider account first. See [Provider Quickstart](../quickstart.md). ## Requirements {#requirements} - **OS:** Ubuntu 24.04 or 26.04, or Ubuntu 22.04 with the HWE kernel. - **GPU:** NVIDIA driver installed (`nvidia-smi` works). All GPUs in a node are the same model. - **Docker:** installed and running. - **Sysbox already installed?** The NVIDIA Container Toolkit must be installed too; otherwise run the [Sysbox setup](./sysbox.md#install) first. - **Network:** at least 100 Mbit/s, a public IP, and ports `8080` and `2200` open. - **Hardware:** at least 8 GB of RAM and 150 GB of disk. - **Idle pay:** total disk of at least 1.5 × the total GPU memory, and system RAM of at least half the total GPU memory. See [Unrented pool](../rewards/idle-pay.mdx#unrented-pool). - **HGX H100 or H200:** NVIDIA Fabric Manager running before you add the node. - **GPU use:** only Lium and its renters may use the node's GPUs. Anything else on the GPU fails the check, and a failing node is not paid. See [Troubleshooting](../troubleshooting.md). - **Sharing a machine with another platform:** give Lium its own VM with its GPUs passed through, and keep the same GPUs on every VM restart. On one operating system the node uses every GPU it shows, so the other platform's GPUs cannot stay on the same OS. See [One node, one fixed set of GPUs](./index.md#one-node-one-fixed-set-of-gpus). **Strongly recommended:** set up [Docker storage](./docker-storage.md) on XFS, so each pod is limited to the disk it rents. Without it a renter can write past the slice they paid for. It is required for [GPU splitting](./gpu-splitting.md). ## Step 1: Run the install command {#step-1--run-the-install-command} 1. Open [provider.lium.io](https://provider.lium.io) and click **Add Node**. 2. Choose **Run one command on the host** and copy the command. 3. Run it on the host: ```bash curl -fsSL https://lium.io/mine.sh | bash -s -- --register ``` It installs [Sysbox](./sysbox.md) if the host does not have it (Lium 0.28.2 or newer: if `lium` is already installed, [upgrade it](../../developers/cli/installation.md) first), installs the node, adds it to your portal and shows its status until it is listed. Nothing is typed by hand. Two optional flags do more host setup in the same run: `--storage file` sets up [Docker storage](./docker-storage.md) in an image file on the host's disk (`--storage /dev/` formats that disk instead), and `--host-tuning` turns on time sync and [holds driver updates](../troubleshooting.md#hold-driver-updates). **Starting before you sign in?** Use your hotkey instead, then add the node in Step 2: ```bash curl -fsSL https://lium.io/mine.sh | bash -s -- -k ``` When it finishes, note the **GPU type, IP address, port and GPU count** it prints. **If the node stays pending, test the ports from outside** From a machine outside your network, check that the validator can reach the node: ```bash nc -vz -w 5 2200 nc -vz -w 5 8080 ``` Both must succeed. With `--register`, the command already shows the portal's own outside check of the service port right after the node is added. If one times out, open that port in your firewall, cloud security group or router. Also open at least three ports of your renting port range (20000 and up if you left it empty), or the node fails with `INSUFFICIENT_PORTS`. :::warning Penalties: read before you list a node A **Secure** node that drops a rental costs you **24 hours of that rental's price**, however short the rental was, and **all** of your rental-fee payouts go to the debt until it is paid. On an 8× H100 at $2.00 per GPU-hour that is about $365 for one dropped rental. See [Penalties](../rewards/penalties.mdx#read-this-first) before you list a node; put a node you cannot keep stable on [Spot](../portal/node-tier.md). ::: ## Step 2: Add the node in the portal {#step-2--add-the-node-in-the-portal} Skip this step if you used the `--register` command. 1. Sign in at [provider.lium.io](https://provider.lium.io). 2. Click **Add Node**. 3. Enter the **GPU type**, **GPU count**, **IP address**, **port** (`8080`) and your **price per GPU (USD/hr)**. 4. Click **Add Node**. The node shows **VALIDATION PENDING**, then **AVAILABLE** once a validator has checked it. That usually takes about 5 minutes. If it stays pending, see [Monitoring → What each status means](../portal/monitoring.md#what-each-status-means). The GPU type is the NVIDIA model name the node reports, for example `NVIDIA H100 80GB HBM3`; a name in any other form is refused. ## Second node behind one public IP {#second-node-behind-one-public-ip} Each node behind the same public IP needs its own service port, SSH port and renting port range. For example, with the first node on `8080`, `2200` and its own range: **1. Forward the second node's ports** On the router, forward `8081`, `2201` and `41000-41100` to the second machine. **2. Run the install command with those ports** [Upgrade `lium`](../../developers/cli/installation.md) first if it is already installed, then: ```bash curl -fsSL https://lium.io/mine.sh | bash -s -- --register --external-port 8081 --ssh-port 2201 --renting-port-range 41000-41100 ``` Without `--register`, enter port `8081` in Step 2. The command creates the `compute-subnet` folder in the folder it runs from, so run the second node's command from a different folder. Nothing else needs installing first. **3. Keep the first node's range apart** A node with an empty renting range uses every port from 20000 up, including the second node's. Give the first node its own range (for example `40000-40100`, forwarded to it). While the first node has no rental, [upgrade `lium`](../../developers/cli/installation.md) on it, then run this from the folder you installed it from: ```bash lium mine --auto --renting-port-range 40000-40100 ``` It writes the range to the node's `.env`, restarts the node so the range applies, then validates the node again: the same GPU, matrix and VerifyX checks as the first install, which use all of the node's GPUs for 2 to 4 minutes. Run it only while the node has no rental. ## What's next 1. [Docker storage](./docker-storage.md): limit each pod to the disk it rents 2. [GPU splitting](./gpu-splitting.md): rent out part of a node 3. [Confidential VM](./cvm.md): isolated nodes for sensitive workloads 4. [Managing Nodes](../portal/managing-nodes.md): prices and notice periods 5. [Troubleshooting](../troubleshooting.md): what each check failure means 6. [Reinstalling the host](../portal/managing-nodes.md#reinstalling-the-host-and-keeping-the-node): a fresh OS install that keeps the Node ID and its history --- # Sysbox [Sysbox](https://github.com/nestybox/sysbox) is a container runtime that lets renters run Docker inside their pods without `--privileged`. :::danger Sysbox is required Every validator checks every node for the `sysbox-runc` runtime. A node without it is never listed and earns nothing. Setup takes about 5 minutes. ::: ## Requirements {#requirements} | Component | Requirement | |---|---| | Kernel | **5.19 or newer** (6.x recommended) | | Docker | 27.x or 28.x as is. 29.x needs two settings: see [Docker 29](#docker-29-two-required-settings). | | Docker storage driver | `overlay2` (`docker info --format '{{.Driver}}'`) | | Architecture | x86_64 | ### Kernel 5.19+ is mandatory for GPUs {#kernel-519-is-mandatory-for-gpus} On an older kernel (Ubuntu 22.04 ships 5.15), GPUs fail inside a Sysbox container with: ``` nvidia-container-cli: mount error: /var/lib/docker/overlay2//merged/proc/driver/nvidia: no such file or directory ``` **Upgrade the kernel** Check with `uname -r`. Below `5.19`, stop any rentals, then: ```bash sudo apt-get update sudo apt-get install -y linux-generic-hwe-22.04 sudo reboot ``` The NVIDIA driver must be DKMS-managed (`dkms status` lists `nvidia`), or it will not load on the new kernel. After the reboot, check `uname -r` and `nvidia-smi`. ## Check the host first {#check-the-host-first} The installer's `--check` mode changes nothing and prints one line per requirement: ```bash curl -fsSL https://raw.githubusercontent.com/Datura-ai/lium-io/main/neurons/executor/nvidia_docker_sysbox_setup.sh | sudo bash -s -- --check ``` Each `FIX` line is followed by the command that clears it. It checks the kernel, Docker, the NVIDIA driver, the iptables modules, disk of at least 1.5× GPU memory, the node ports `8080` and `2200`, and whether a container starts under `sysbox-runc`. ## Install ```bash curl -fsSL https://raw.githubusercontent.com/Datura-ai/lium-io/main/neurons/executor/nvidia_docker_sysbox_setup.sh | sudo bash ``` It installs the NVIDIA Container Toolkit, `fuse3` and Sysbox, and sets up the `vloopback` volume plugin. It is safe to run again. The installer installs Sysbox 0.7.1. On an older Sysbox, renter images with many layers cannot start. The node page in the provider portal then shows a notice. Idle pay and listing are not affected. To upgrade, re-run the installer while the node has no rental: it restarts Docker, which stops every pod on the host. On Ubuntu 26.04 it also adds an AppArmor rule that Sysbox needs to mount its file systems. Without it every Sysbox container fails with `failed to pre-register with sysbox-fs`. If Sysbox got onto a 26.04 host another way, run the installer once. **Confirm the runtime** `/etc/docker/daemon.json` must include: ```json { "runtimes": { "sysbox-runc": { "path": "/usr/bin/sysbox-runc" } } } ``` Then restart Docker: `sudo systemctl restart docker`. ## Verify {#verify} Run the validator's command, under `sudo`: ```bash sudo docker run --rm --runtime=sysbox-runc --gpus all daturaai/compute-subnet-executor:latest nvidia-smi ``` `nvidia-smi` output means Sysbox runs your GPUs. Use `sudo`: a plain `docker` client can point at a different daemon. ## Docker 29: two required settings {#docker-29-two-required-settings} | Docker | Needs | |---|---| | 27.x, 28.x | Nothing | | 29.0–29.1 | Nothing | | 29.2.x–29.4.x | `"cdi": false` | | 29.5.0 and later | `"cdi": false` and `"time-namespaces": false` | **Set them** Stop any rentals first: restarting Docker kills every container. Add to `/etc/docker/daemon.json`: ```json { "features": { "cdi": false, "time-namespaces": false } } ``` On 29.2–29.4, set only `"cdi": false`. Then `sudo systemctl restart docker` and run [Verify](#verify) again. ## Troubleshooting {#troubleshooting} | Error | Fix | |---|---| | `mount error: .../merged/proc/driver/nvidia: no such file or directory` | Kernel older than 5.19. See [Kernel 5.19+](#kernel-519-is-mandatory-for-gpus). | | `namespace {"time" ""} does not exist` | Docker 29.5+. See [Docker 29](#docker-29-two-required-settings). | | `failed to open OCI spec file: ... permission denied` | Docker 29.2+. Set `"cdi": false`. | | `setting up ID-mapped mount on path 212/fs` | Sysbox 0.6.6 or older. Re-run the installer while the node has no rentals. | | `fusermount3: executable file not found` | Re-run the installer, or `sudo apt-get install -y fuse3`. | | `sysbox-runc not found` or `unknown or invalid runtime name: sysbox-runc` | Re-run the installer and read its output. Verify with `sudo`. | | GPU not visible in the container | Check `nvidia-container-cli --version`, then restart Docker. | | `overlayfs: upperdir is in-use as upperdir/workdir of another mount` in the kernel log after pods start | Expected with Sysbox on kernel 5.19+ (it remounts each pod's root filesystem with ID-mapping over Docker's upper directory). Ignore it. Do not add `--disable-ovfs-on-idmapped-mount` or `--disable-rootfs-cloning` to sysbox-mgr: Sysbox then re-owns every image file at each pod start and stop, so large templates start slower and can use more disk. If you added them, remove them (`systemctl cat sysbox-mgr` shows where), then run `sudo systemctl daemon-reload && sudo systemctl restart sysbox` while no pod is running. | | Verify works, but the validator still reports Sysbox missing | Load the iptables modules (below), then wait one check (about 15 minutes). | **Load the iptables modules** ```bash sudo modprobe -a ip_tables iptable_nat iptable_filter printf 'ip_tables\niptable_nat\niptable_filter\n' | sudo tee /etc/modules-load.d/lium-iptables.conf ``` --- # Docker Storage Setup Docker should enforce a per-container storage limit; without it a renter can write past the slice they paid for. [GPU splitting](./gpu-splitting.md) stays locked until the host passes the check below. The recommended setup is the **`overlay2`** driver on an **`xfs`** filesystem mounted with **`pquota`** and `ftype=1`. The [`lium`](https://github.com/Datura-ai/lium) CLI builds it for you. ## Check the host first {#check-the-host-first} Run the platform's check: ```bash sudo docker run --rm --storage-opt size=1g --gpus all daturaai/compute-subnet-executor:latest nvidia-smi ``` Then check the driver: ```bash sudo docker info --format '{{.Driver}}' ``` - **`nvidia-smi` output and `overlay2`**: the host is ready. Skip to [Next step](#next-step-gpu-splitting-only). - **`overlayfs`**: Docker uses the containerd image store. Turn it off first: [Turn off the containerd image store](#turn-off-the-containerd-image-store). - **`--storage-opt is supported only for overlay over xfs with 'pquota' mount option`**: go to [Pick a device](#pick-a-device). - **Installer reports `FIX` for a loop device**: Docker's data is on an image file without direct I/O. See [Docker data on a loop image](#docker-data-on-a-loop-image). ## Turn off the containerd image store {#turn-off-the-containerd-image-store} With this store, image layers live under `/var/lib/containerd` on the root disk, whatever Docker's data directory is. Docker 29 and later turn it on for fresh installs unless `/etc/docker/daemon.json` sets `"storage-driver"`. **Keep `ctr` on the host while the store is on** The checks ask Docker's containerd where it keeps containers with containerd's `ctr` CLI (Docker's `containerd.io` package ships it). Check that it answers on Docker's own containerd address: ```bash sudo ctr --address "$(sudo docker info --format '{{with .Containerd}}{{.Address}}{{end}}')" plugins ls -d ``` **Drain the node** Before changing Docker's configuration, click **Pause New Rentals** and wait until every rental on the node has ended. Switching image stores hides the existing images and containers. **Disable it** Add this to `/etc/docker/daemon.json`, then restart Docker: ```json "features": { "containerd-snapshotter": false } ``` ```bash sudo systemctl restart docker ``` **Re-check** ```bash sudo docker info --format '{{.Driver}}' df -h "$(sudo docker info --format '{{.DockerRootDir}}')" ``` Expect `overlay2`. If Docker's root is still on the small disk or [the check](#check-the-host-first) still fails, complete [Pick a device](#pick-a-device) and the storage setup below before recreating the node software. **Recreate the node software** Once the check passes, recreate it; its images pull again: ```bash cd ~/compute-subnet/neurons/executor && docker compose up -d --force-recreate ``` **Resume rentals** Once the node software is running, click **Resume New Rentals**. The pause stays on until you do, and a paused node gets no new rentals or idle pay. ## Docker data on a loop image {#docker-data-on-a-loop-image} Check whether Docker's data is on a loop device, and whether direct I/O is on: ```bash df "$(sudo docker info --format '{{.DockerRootDir}}')" losetup -l -O NAME,BACK-FILE,DIO ``` A `/dev/loopN` with `DIO` `1` is fine. With `DIO` `0`, one pod writing heavily can stall Docker, and the node is delisted. The installer reports this as a `FIX`. **Turn on direct I/O** With no rental running: ```bash sudo losetup --direct-io=on /dev/loopN ``` It resets on reboot. To keep it, follow [the executor guide](https://github.com/Datura-ai/lium-io/tree/main/neurons/executor#docker-data-root-on-a-loop-image). **Or move to a real disk** If Docker's data is at `/var/lib/docker`, use [Pick a device](#pick-a-device), then [Run the storage setup](#run-the-storage-setup). ## Pick a device {#pick-a-device} Use a fresh extra SSD or NVMe disk, unused and unmounted. Do not pre-format it; the CLI does that. The CLI refuses the root disk, the disk behind `/var/lib/docker`, a mounted device, a disk with other data and a loop or device-mapper target. A single-disk host needs no extra disk: see [Single-disk hosts](#single-disk-hosts). **Find it** ```bash lsblk -o NAME,PATH,TYPE,FSTYPE,SIZE,MOUNTPOINTS findmnt / findmnt /var/lib/docker ``` ## Run the storage setup :::warning Destructive `setup` stops Docker, formats the device as XFS and remounts `/var/lib/docker`. It backs up Docker data first, but keep your own backup on a host with live containers. ::: ```bash lium gpu-splitting check --device /dev/ sudo lium gpu-splitting setup --device /dev/ lium gpu-splitting verify ``` - `check` prints the plan and changes nothing. - `setup` migrates Docker storage. - `verify` confirms the result. `lium mine` runs the same check on every install. An interactive install as root offers this setup when the host fails it; `--auto`, `--register` and non-interactive installs print the command to run separately. ## Single-disk hosts {#single-disk-hosts} With no spare disk, the CLI keeps Docker storage in an XFS image file on the filesystem with the most free space, mounted at `/var/lib/docker` through a loop device with `pquota`. The limit works the same way. Install Ubuntu with one root partition (ext4 or XFS) over the whole disk: no separate Docker partition and no unallocated space. The CLI never repartitions or formats the system disk: it does not format another partition on it, mounted or blank, and does not use unallocated space. With a separate `/var/lib/docker` partition and without `--file` or `--size`, it stops with an error; otherwise it puts the image file at the `--file` path or on the filesystem with the most free space, which must be large enough for it. The filesystem that stores the file must be ext2, ext3, ext4, XFS or f2fs. The CLI refuses this setup on btrfs or ZFS. A udev rule turns on direct I/O for the loop device where the kernel allows it (it refuses on disks with 4K logical sectors; the file still works, a bit slower), which keeps the loop's overhead small: in our tests pod creation and disk speed matched a plain partition. ```bash sudo lium gpu-splitting check sudo lium gpu-splitting setup sudo lium gpu-splitting verify ``` - The file takes the free space minus a reserve for the system: 10% of the filesystem, at least 20 GiB. Allow extra for XFS metadata. The CLI verifies the two rules below and refuses with the numbers when either fails; `--size` must pass both checks too. - Free space: the node reports the filesystem inside the file as its disk, so the setup requires at least 100 GiB free in it after the existing Docker data moves in, plus about 40 GiB for the node images while they are not on the host yet (the CLI reads them from the `lium mine` checkout, `compute-subnet` in the current directory or `--mine-dir`). The marketplace lists a node only with 100 GiB free. The CLI verifies this after restoring the data. - VRAM: the usable capacity must reach 1.5x the total VRAM of the host's GPUs; under that, the validator pays no idle incentive. The CLI checks this when it can read GPU memory. - `--file ` and `--size ` pick the file's location and size. Every directory on the path must be owned by root, writable by root only and not a symlink (for example `/var/lib`), or the setup refuses. The file is preallocated and the loop device refuses discard, so neither other files on the host nor a scheduled `fstrim` can take the pool's space back. The file cannot shrink later. - When `/var/lib/docker` is already its own mount, the CLI does not offer the file by itself, because that would leave Docker's disk unused: format a spare disk with `--device`, or pass `--file` with a path on another filesystem to use an image file anyway. - `check` prints the file, its size and the reserve; `setup` asks you to type the file path before it changes anything. - Docker must run with no running containers; setup stops it for the move. Run it on a node with no rentals. - Setup masks `docker.service` from the moment it stops Docker until the data is restored and verified, so a reboot in the middle does not start Docker on an empty data root. If that happens, put the host back by hand before unmasking: 1. Unmount `/var/lib/docker` if the image or the new partition is mounted there. 2. In `/etc/fstab`, remove the `/var/lib/docker` line the setup wrote. If `/var/lib/docker` was its own mount, the setup replaced that disk's line: put it back (`blkid` shows the disk's UUID), or the old disk stays unmounted after the next reboot. 3. Remove the docker.service drop-in and the udev rule the setup named in its output. 4. If `/var/lib/docker` was its own mount, remount the original Docker filesystem there. Otherwise, if the data is still in `/var/lib/docker`, the backup directory the setup printed is a copy you can delete; if `/var/lib/docker` is empty, remove it with `rmdir` (stop if that fails); then, or if it does not exist, move the backup directory back to `/var/lib/docker`. A `mv` onto an existing directory puts the backup inside it. 5. For an image file: once `losetup -j ` prints nothing, delete the file. It still holds its space, and the setup refuses to create a file where one exists. 6. Run `systemctl unmask docker && systemctl start docker`, and start the setup again when the node is idle. - Docker 29 hosts on the containerd image store are switched to `overlay2`. Images and containers in the old store become unavailable, and the setup refuses to run while any container exists there. - Before removing those containers, copy out what you need: `docker save` keeps images only, not a container's own files. Save images you cannot pull again. - Afterwards load or pull the images and recreate the containers, or run `lium mine` again to bring the node's own containers back. ## Verify the host ```bash docker info findmnt /var/lib/docker ``` Look for `Storage Driver: overlay2`, `Backing Filesystem: xfs`, `Supports d_type: true`, and `pquota` or `prjquota` on the mount. ## Manual setup Without the CLI: stop Docker, format the partition as XFS with `ftype=1`, mount it at `/var/lib/docker` with `pquota`, restore the data and start Docker. To use several disks as one RAID0 (`mdadm`) or LVM volume (joining the disks wipes them): 1. **Pause New Rentals** and wait until no rental runs: stopping Docker stops every pod. Then stop Docker and run the block's first `rsync`. `/tmp/docker-backup/` must be on a disk outside the volume with room for all of `/var/lib/docker` (`sudo du -sh /var/lib/docker`). Go on only if the `rsync` ends without an error. 2. If `/var/lib/docker` is its own mount, unmount it and remove its line from `/etc/fstab`. 3. Create the volume, set `new_partition` to it (for example `/dev/md0`), and run the block from `mkfs.xfs` on. It stops at the first failed command and starts Docker only after the restore succeeds; if it stops, fix the cause and do not start Docker. 4. Run [Verify the host](#verify-the-host), then resume rentals. ```bash sudo systemctl stop docker docker.socket # /etc/docker/daemon.json must set "storage-driver": "overlay2" new_partition= sudo rsync -aHAXS /var/lib/docker/ /tmp/docker-backup/ sudo mkfs.xfs -n ftype=1 "$new_partition" -f \ && sudo mount -t xfs -o defaults,inode64,pquota "$new_partition" /var/lib/docker \ && mountpoint -q /var/lib/docker \ && sudo rsync -aHAXS /tmp/docker-backup/ /var/lib/docker/ \ && UUID=$(sudo blkid -s UUID -o value "$new_partition") \ && echo "UUID=${UUID} /var/lib/docker xfs defaults,inode64,pquota 0 2" | sudo tee -a /etc/fstab \ && sudo systemctl start docker ``` ## Next step (GPU splitting only) {#next-step-gpu-splitting-only} Set the minimum GPU count in the portal: [Managing Nodes → Setting Minimum GPU Count for Rental](../portal/managing-nodes.md#setting-minimum-gpu-count-for-rental). --- # GPU Splitting GPU splitting lets one node serve several renters at once, each renting a whole number of its GPUs. ## Before you start: Docker storage The host must enforce a per-container storage limit. Check and set it up with [Docker Storage Setup](./docker-storage.md). The portal's **Edit** button stays disabled until the check passes. ## Turn on GPU splitting 1. Open the node's page in the [Provider Portal](https://provider.lium.io). 2. In **GPU Splitting**, click **Edit**. 3. Set the minimum GPU count per rental: at least `1` and below the node's total. Renters can then rent any count from your minimum up to the total. To turn it off, clear the minimum while no partial rental runs. **Open enough ports** An unrented split node is listed only with 3 open ports for each split (total GPUs divided by your minimum, rounded down): 8 GPUs with a minimum of 1 needs 24, with a minimum of 3 (2 splits) 6. A new rental takes ports only while 3 stay free for each unrented GPU on the node (a 1-GPU rental on a 2-GPU node with 12 ports gets up to 9). It always gets 1 port for SSH, plus 1 more with Jupyter on, and a pod that already holds more keeps them on reboot. Set `RENTING_PORT_RANGE` wide enough for every split you expect to rent and restart the executor ([Add or change ports](./index.md#add-or-change-ports)). ## Pods on a split node cannot reach each other The validator runs each pod on a Docker network that no other pod can reach: the network named `lium-rentals`, or a network of the pod's own created from it and named `lium-rentals-`. Leave these networks alone: the validator creates them, and removes a pod's own network once the pod is gone. `lium-rentals` itself stays. To check the one a pod is on, read its name from the pod's container, then inspect it: ```bash docker inspect --format '{{range $k, $v := .NetworkSettings.Networks}}{{$k}} {{end}}' docker network inspect --format '{{.Driver}} {{.Options}}' # bridge map[com.docker.network.bridge.enable_icc:false] ``` ## 8× H200 / B200 / B300 / GB300 nodes {#8x-nodes} Renters mostly rent these whole. List them whole and open the [GPU profiling counters](./gpu-profiling.md) to keep idle pay. An idle 8× H200, B200 or B300 node earns the [unrented incentive](../rewards/idle-pay.mdx#unrented-pool) only with open profiling counters, a minimum GPU count below the node's total, or an attested [confidential VM](./cvm.md). ## When splitting actually helps {#when-splitting-actually-helps} For these nodes, [8× H200 / B200 / B300 / GB300 / GB300 nodes](#8x-nodes) comes first. **More renters can match your node** Many renters want one GPU. An 8-GPU node without splitting is invisible to them. **Your minimum gives the idle node a second tier** Idle pay is set per GPU model and GPU count. Today only counts 1 and 8 are priced. - **No priced tier for your count**: splitting makes the node eligible. A 4-GPU node with a minimum of 1 is rated in the 1-GPU tier. - **Your tier is full**: the node can be rated in your minimum's tier instead, if all its GPUs fit there. On a partly rented Secure node, the free GPUs are rated at your minimum's tier. Details: [When your GPU-count tier is full](../rewards/idle-pay.mdx#when-your-gpu-count-tier-is-full). **Open ports for every GPU you split into** A split node is rented in bundles of your minimum, and every split needs its own open ports. - An unrented split node needs 3 open ports for each split to be listed: 8 GPUs with a minimum of 1 is 8 splits, so 24 ports. A new rental takes ports only while 3 stay free for each unrented GPU on the node (a 1-GPU rental on a 2-GPU node with 12 ports gets up to 9). It always gets 1 port for SSH, plus 1 more with Jupyter on, and a pod that already holds more keeps them on reboot. - Set `RENTING_PORT_RANGE` wide enough for every split you expect to rent, then restart the executor ([Add or change ports](./index.md#add-or-change-ports)). An unrented split node with fewer than 3 open ports per split fails validation with `INSUFFICIENT_PORTS` and is not listed. Open the missing ports and it is listed again at the next check. A partly rented node passes validation with fewer than 3 free ports and keeps its rentals. Its free GPUs stay listed and rentable while at least 1 port is free. Idle pay follows the ports: while a Secure node is partly rented, its free GPUs earn idle pay only for the splits that have a free port, and none with fewer than 3 free ports. On Spot, the free GPUs of a partly rented node get Spot idle pay while a Lium Default Job runs on them, for their own GPU count, under the same port rule ([Idle pay on Spot](../portal/node-tier.md#idle-pay-on-spot)). Details: [Free GPUs on a partially rented split node](../rewards/idle-pay.mdx#free-gpus-on-a-partially-rented-split-node). --- # Confidential Virtual Machine (CVM)
## Before you start 1. **A provider account**: your own hotkey registered on subnet 51. See [Authentication](./authentication.md). 2. **A wallet extension** with that hotkey, to sign in. Any SS58-compatible extension works, for example [Polkadot.js](https://chromewebstore.google.com/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd) or [Bittensor Wallet](https://chromewebstore.google.com/detail/bittensor-wallet/bdgmdoedahdcjmpmifafdhnffjinddgc). 3. **A provider server**: Lium's [Central Provider Server](../provider-configuration.md) (on by default) or a [self-hosted provider](../self-hosted-provider.md). 4. **A GPU node**. See [Node Quickstart](../nodes/quickstart.md). ## What's in the portal - **Overview**: your earnings, payouts and nodes, each subnet 51 validator's weight on your UID, and what is costing you money. - **Nodes**: your nodes (status, price, notice periods), and every node on the platform. - **Add Node**: register a new GPU node. - **Earnings**: rental fees and incentive by day and by node. - **Provider Payouts**: rental fees by day, validator and node. - **Machine Requests**: renters asking for specific hardware. - **Rewards Calculator**: what each GPU type earned over the last 30 days. See [Rewards calculator](../rewards/calculator.mdx). ## Next steps 1. [Sign in](./authentication.md) with your hotkey. 2. [Add your first node](./managing-nodes.md). 3. [Connect Discord](./discord.md). 4. [Monitor your nodes](./monitoring.md). 5. [Track earnings and payouts](./earnings.md). --- # Authentication Sign up for the [Provider Portal](https://provider.lium.io) with an e-mail or Google account. No hotkey is needed. Providers who already have a hotkey registered on subnet 51 can sign in with it instead. ## Sign up with e-mail or Google 1. **Sign up**: at [provider.lium.io/signup](https://provider.lium.io/signup), with Google or with an e-mail and a password. 2. **Sign in later**: at [provider.lium.io/login](https://provider.lium.io/login). To use the CLI with this account, see [Use the CLI with an API token](#use-the-cli-with-an-api-token). ## Sign in with a hotkey For providers with their own hotkey. You need: - A provider hotkey registered on subnet 51. See [Provider Quickstart, Path B](../quickstart.md#step-1--register-your-provider-on-subnet-51). - A way to sign with it: a browser wallet extension, or the Lium CLI on a machine with the Bittensor wallet. The account is created on the first sign-in with the hotkey. ### Sign in with a wallet extension 1. **Add the hotkey to an extension**: any SS58-compatible one, for example [Polkadot.js](https://chromewebstore.google.com/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd) or [Bittensor Wallet](https://chromewebstore.google.com/detail/bittensor-wallet/bdgmdoedahdcjmpmifafdhnffjinddgc). 2. **Sign in**: go to [provider.lium.io/signature-login](https://provider.lium.io/signature-login) and sign with the hotkey. 3. **Connect Discord**: follow the prompt, or later from **Profile Settings**. See [Connect Discord](./discord.md). ### Sign in with the CLI No browser needed: ```bash lium config set provider.coldkey lium config set provider.hotkey lium provider portal login ``` Then connect Discord: ```bash lium provider config connect-discord ``` ## Use the CLI with an API token For an e-mail or Google account (no hotkey to sign with): in [Profile Settings](https://provider.lium.io/settings), under **API tokens**, create a token, then `export LIUM_PROVIDER_TOKEN=` (needs `lium` 0.29.0 or later). ## Sign in with a password 1. **Set a password**: after a hotkey sign-in, open [Profile Settings](https://provider.lium.io/settings) and click **Set Password** (it needs a sign-in within the last 10 minutes). Or run `lium provider config set-password`. 2. **Sign in**: at [provider.lium.io/password-login](https://provider.lium.io/password-login) with hotkey and password. With a [confirmed e-mail](#connect-an-e-mail-address), the e-mail and the same password also work at [provider.lium.io/login](https://provider.lium.io/login). After several failed password sign-ins to one account, the next sign-in asks you to pass a short captcha. This applies to e-mail sign-in too, but not to signing with the hotkey or to API tokens. ## Password rules A new password (signup, set, change or reset) has 12 to 72 characters, is not a common password and does not contain your e-mail address. A password set before these rules keeps working. ## Reset a forgotten password For an e-mail account: 1. On [provider.lium.io/login](https://provider.lium.io/login), click **Forgot password?**. 2. Enter your account's e-mail and click **Send reset link**. 3. Open the link in the mail (it works once, for one hour) and set a new password ([password rules](#password-rules)). 4. Sign in with the new password. Every other session and API token of the account is signed out. ## Connect an e-mail address {#connect-an-e-mail-address} A hotkey account needs a confirmed e-mail address to add nodes. 1. Enter the address under **Set Email** in [Profile Settings](https://provider.lium.io/settings), or in the dialog the portal shows. A hotkey account without a password and without a confirmed address needs no fresh sign-in for this. 2. Open the link we send, while signed in to the same account. It is valid for 24 hours. If the portal asks you to sign in again, do it, and the link confirms the address. Profile Settings shows whether the address is confirmed. The code that confirms a payout-address change goes to it. Confirm it within **3 days**. Until it is confirmed, new nodes (added in the portal, with `lium mine --register`, or reported by your own [self-hosted provider](../self-hosted-provider.md)) are held: at once for an account with no nodes, after 3 days for an account with nodes. A held add answers `PROVIDER_EMAIL_REQUIRED`. After the 3 days your nodes also earn no idle pay or rented extra until the address is confirmed. They stay listed, and their rentals go on. ### Sign in to a hotkey account with e-mail or Google {#sign-in-to-a-hotkey-account-with-e-mail-or-google} To sign in from any computer without the hotkey: 1. **Confirm an e-mail**: as above. 2. **Set a password**: see [Sign in with a password](#sign-in-with-a-password). 3. **Sign in**: at [provider.lium.io/login](https://provider.lium.io/login) with that e-mail and password, or with **Continue with Google** for the same address. It is the same account: nodes, earnings and payout address stay. If several hotkey accounts confirmed the same address, sign in with the hotkey instead. ## What is public The **Nodes** list and every node page read without a login. Earnings pages are public too. Renters and each node's address are shown only to the node's own provider, signed in. ## Signing out **Log out everywhere** (the menu under your account name) ends every session of the account: every browser, the CLI session, every API token and every Add Node register token. In the CLI, sign in again with `lium provider portal login --force`. ## Change the e-mail of an e-mail account For an account that signs in with its e-mail or Google: 1. **Ask for the change**: in [Profile Settings](https://provider.lium.io/settings), under **Change Sign-in Email**, enter the new address. If you signed in more than 10 minutes ago, enter your current password too. Click **Send link**. 2. **Open the link**: we mail it to the new address. Open it while signed in to the same account. It is valid for 24 hours. 3. **Sign in with the new address**: the old address gets a notice first, then every other session and API token ends. If that notice cannot be sent, nothing changes: open the link again a few minutes later. A hotkey account changes its address under **Set Email** (see [Connect an e-mail address](#connect-an-e-mail-address)). ## Delete your account Any account can delete itself: 1. **Remove your nodes**: delete every node of the account first. 2. **Wait for the last payout**: the account must have no money on its balance, no pay still to be paid out and no payout still on its way. 3. **Delete**: in [Profile Settings](https://provider.lium.io/settings), under **Delete Account**, click **Delete account**. If you signed in more than 10 minutes ago, enter your current password too, and the two-factor code if it is on. Click **Delete forever**. Your e-mail, Discord link, password, two-factor, payout address and notification settings (webhook included) are removed, and every session and API token ends. An e-mail account can never be signed into again, and its address is free for a new signup. Earnings and payout records stay, for the books. A hotkey stays a public chain address: signing in with it again opens an empty profile. ## Two-factor authentication Two-factor authentication adds a second step after your password, Google or hotkey sign-in, and to changes of your payout address, e-mail and account. Use an authenticator app (a 6-digit code), [passkeys](#passkeys), or both. 1. **Turn it on**: in [Profile Settings](https://provider.lium.io/settings), under **Two-factor authentication**, click **Configure 2FA**, then **Set up** next to the method. For the app, scan the QR code and enter the 6-digit code it shows. For passkeys, follow your browser. If the portal asks, enter your current password first, or sign in again if the account has none. If the other method is already on, confirm with it instead. Every other session and API token of the account ends. 2. **Save the recovery codes** (the app only, passkeys have none): they are shown once, and each works once in place of a code. 3. **Sign in**: after your usual sign-in, your browser asks for a passkey if you have one. To type a code from the app instead, click **Use an authenticator code**. No phone? Click **Use a recovery code**. 4. **Confirm a change**: a new payout address, a new e-mail, linking accounts and account deletion ask for a code or a passkey. A payout address still needs the e-mailed code or wallet signature too. 5. **Turn it off**: under **Configure 2FA**, click **Turn off** next to the method and confirm with a code or a passkey. The other method stays on. We e-mail you when a method is turned on or off, when a passkey is added or removed, and when support resets two-factor. If it was not you, contact [support](../../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) straight away. A password reset, or a new password set with your hotkey, does not turn two-factor off. The CLI asks for the code too, from version 0.37.0: `lium provider portal login` asks in a terminal, and a script passes `--totp-code ` (a recovery code works there as well). An older CLI cannot sign in while two-factor is on, so update it first, or use an API token instead: see [Use the CLI with an API token](#use-the-cli-with-an-api-token). From version 0.48.0, press Enter at the code prompt to finish in your browser instead, with a passkey or a code. Confirm only if you just ran `lium provider portal login`. On a machine with no browser (over SSH, say), add `--no-browser`: open the printed link on any device and confirm only if the page shows the same code as the terminal. ## Passkeys A passkey is Touch ID, Face ID, Windows Hello or a security key. It is a second factor only: you still sign in first as usual. Under **Configure 2FA** you can add, rename or remove a passkey. The last one goes only by turning passkeys off, which removes every passkey. A support reset of two-factor removes them too. ## Troubleshooting **Lost the phone with the authenticator app and the recovery codes** - Contact [support](../../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support). Support checks that the account is yours, then turns two-factor off and signs out every session. **"Provider Hotkey not registered in Bittensor subnet 51"** - Check the hotkey is registered on subnet 51. - Check your provider server runs: the **Central Miner Server** switch is ON in your profile ([Provider Configuration](../provider-configuration.md)), or your [self-hosted provider](../self-hosted-provider.md) is up. --- # Connect Discord Connect Discord in the Provider Portal to earn idle pay and the rented extra, and to join renters' pod support channels. ## Discord and extra incentives {#discord-and-extra-incentives} Idle pay and the rented extra go only to providers whose connected Discord account is a member of the Lium Discord server. This covers every node on the account. Rental fees are paid either way ([Getting Paid](../rewards/payouts.mdx)). While the connected account is outside the server, your nodes earn no incentive, and their job logs show `provider_discord_not_connected`. **To earn again** Rejoin the Lium Discord server with the connected account, or click **Disconnect Discord** then **Connect Discord** in **Profile Settings**. Allow about a day before pay shows again. ## Connect your provider account 1. Sign in to [provider.lium.io](https://provider.lium.io). 2. Open **Profile Settings** → **Discord**. 3. Click **Connect Discord** and approve the Discord prompt. 4. Check the section shows **Connected**. Connecting adds your account to the Lium Discord server. ## Connect from the CLI ```bash lium provider portal login lium provider config connect-discord ``` On a headless machine, run `lium provider config connect-discord --json --no-wait` and open the returned `authorization_url` as the Discord account owner. **Check it** ```bash lium provider status --json ``` Look for `discord_connected: true` and `extra_incentive_eligible: true`. ## Pod support channels When a renter clicks **Request Discord Support** on a pod, Lium creates a private channel for the renter, you and Lium support, with the pod's details. Both sides need Discord connected. **Open the channel yourself** On your node's page, click the Discord icon next to a rented pod in **Pod Statuses**. Use it, for example, to warn the renter before maintenance. When the pod is removed, Lium saves the channel's messages first. A pod that ended in a failure keeps its channel as a support case; otherwise the channel is deleted. ## Troubleshooting | Issue | What to check | | --- | --- | | **Connect Discord** fails, or shows **Discord Connection Failed** | Retry. If it repeats, contact Lium support with the error shown. | | Renters cannot request support | The pod must run on a node of the hotkey that has Discord connected. | | You cannot see a support channel | Sign in to Discord with the connected account. | --- import SoftLimitPrices from "@site/src/components/SoftLimitPrices"; # Managing Nodes Add nodes, set prices, pause rentals, plan downtime and remove nodes. :::tip From the command line Everything on this page also works with the [`lium provider`](../../developers/cli/reference/provider.md) CLI, for example `lium provider node add --gpu-type "NVIDIA H200 NVL" --gpu-count 8 --ip --port 8080 --price 1.85 --yes`, except the [tier](./node-tier.md): `lium provider node add` has no tier option, so a new node starts on Spot (a node re-added at the same IP and port within 7 days keeps its old tier). Pick Secure in the **Tier** field of Add Node or change it on the node page. ::: ## Adding New Nodes {#adding-new-nodes} ### Before you add a node - The GPU machine meets the [Node Quickstart requirements](../nodes/quickstart.md#requirements), including [Sysbox](../nodes/sysbox.md). - It is reachable from the internet. - Your provider server is connected: Lium's [Central Provider Server](../provider-configuration.md) (the default) or your own. - **8× H200, B200, B300 or GB300**: for idle pay, the node needs [GPU splitting](../nodes/gpu-splitting.md) with a minimum below 8, [GPU profiling](../nodes/gpu-profiling.md), or a [confidential VM](../nodes/cvm.md). The form shows this checklist. - **Hotkey accounts**: a [confirmed e-mail address](./authentication.md#connect-an-e-mail-address). Without it, **Add Node** answers `PROVIDER_EMAIL_REQUIRED`. - The node program is set up for your account's hotkey (`MINER_HOTKEY_SS58_ADDRESS` in its `.env`; **Run one command** sets it). Otherwise **Add Node** answers `NODE_CONTROL_UNPROVEN` or `NODE_HOTKEY_MISMATCH`. - The executor port is forwarded to the GPU machine. If `NODE_CONTROL_UNPROVEN` says the port answered but not as the Lium executor, another device (often the router's web admin) holds that port: forward it to the machine or use a free port. ### Option 1: Run one command on the host 1. On the Nodes page, click **Add Node**. It opens on **Run one command on the host**. 2. Pick the **Tier** (see [Node Tier](node-tier.md)) and click **Generate command**. The node is added on that tier. 3. Paste the line into a shell on the GPU machine, as a user who can run Docker: ```bash curl -fsSL https://lium.io/mine.sh | bash -s -- --register ``` The command installs the node software, checks the machine, starts the node and adds it to your account at the model's base price. It then prints the node's status until it is listed. The token works for one hour. To set your own price, add `--price `, or change it later with **Update Price**. ### Option 2: Enter the details For a node whose software is already running: 1. Click **Add Node** → **Enter the details**. 2. Fill in: - **GPU Type** and **GPU Count**. For a model not in the list, type its full name as `nvidia-smi -L` shows it, such as `NVIDIA H20`. - **IP address or hostname**: the node's public IP, or a DNS name that points to it. Use a hostname if your IP changes. A node installed with **Run one command** takes a hostname only once its executor runs a release that signs the portal's check with its SSH host keys (it updates itself); until then, use the public IP `lium mine --register` printed. - **Port**: where the node program listens (default `8080`) - **Price per GPU (USD/hr)** - **Tier**: **Spot** (default) or **Secure**. See [Node Tier](node-tier.md). 3. Click **Add Node**. Price a Secure node at or above the reference model's `p_min`, or the node is not listed. Spot nodes have no minimum price. **After you add it** The node shows **VALIDATION PENDING**, then **AVAILABLE**, usually after about 5 minutes. See [Monitoring → What each status means](./monitoring.md#what-each-status-means). ### Adding a GPU to an existing node {#adding-a-gpu-to-an-existing-node} Lium records a node's GPUs on its first successful check. Once a node has passed a check, it is not listed with more GPUs than that, so a new GPU needs a new node (a node that has never passed a check can keep its Node ID: install the card, restart the executor, and once its checks see the new GPUs, set the count with `lium provider node update-gpu NODE_ID --gpu-type TYPE --gpu-count N`; see [`lium provider`](../../developers/cli/reference/provider.md)): 1. If the node is rented, wait for the rental to end. See [Taking a rented node out of service](#taking-a-rented-node-out-of-service). 2. Note the node's tier and price per GPU-hour, then delete the node in the portal. 3. Install the card and start the host and the executor. Every GPU on a node must be the same [supported](../architecture.md#supported-gpus) model: mixed supported models fail as `GPU_MODEL_MIXED`, and an unsupported card fails as `GPU_MODEL_UNSUPPORTED`. 4. Add the node again with every GPU. Select the old node's tier (Secure or Spot) and enter your price: the form fills in the GPU model's default price, not the old one. Within 7 days of the delete, a node added at the same IP and port takes over the old node's tier and its 24-hour tier-change limit: selecting the other tier counts as a tier change, and the portal refuses it if the old node changed tier in the last 24 hours. See [Adding New Nodes](#adding-new-nodes) and [Node Tier](./node-tier.md#changing-the-tier). 5. If the old node used GPU splitting, set the minimum GPU count per rental again on the new node: it starts without one. See [Turn on GPU splitting](../nodes/gpu-splitting.md#turn-on-gpu-splitting). 6. If the old node ran your own Default Job (Custom Docker or Pearl Mining) or a Miner Empty Job, assign it to the new node again: assignments stay with the old Node ID. See [Assign a job to nodes](./default-jobs.md#assign-a-job-to-nodes). It starts as a new node with a new Node ID, and penalties on the old node stay. Deleting the node can also lose its unsettled and held Secure idle pay; Spot idle pay is not affected. See [One node, one fixed set of GPUs](../nodes/index.md#one-node-one-fixed-set-of-gpus) and [How emissions arrive](../rewards/idle-pay.mdx#how-emissions-arrive). Register each machine once, as one node: each GPU earns on one node only. To rent a machine's GPUs separately, use [GPU splitting](../nodes/gpu-splitting.md). ## Sorting the node list {#sorting-the-node-list} Click a column header to sort, and click again to reverse. The portal remembers your sort. **Status** puts rented nodes first, then available, then waiting, then offline or failing. **Listed as** shows every way renters can take the node: **SECURE** or **SPOT**, plus **SPOT** on a Secure node also [offered as Spot](./node-tier.md#spot-rate-on-secure), and **RESERVED 30D** when its Reserved offer is on. A gray **RESERVED 30D** with a **Hidden:** line means the offer is on but clients do not see it now (the deposit is not full, no price, or the node is rented on-demand); hover for the detail. Sorting by it puts Spot nodes first. ## Naming a node {#naming-a-node} Give a node your own name, such as a rack or box number, to tell your machines apart. On the node page, under **General**, click the pencil next to **Label**, type up to 64 characters and click **Save**. Save an empty label to remove it. The label shows under the Node ID on the Nodes list, and Lium's node notices to you (Discord, e-mail, webhook) name the node by it instead of the Node ID. Bare-metal rental messages still name the host by its IP address. Renters never see the label, but Lium support does: Discord notices arrive in your notice thread, which support also reads. It changes nothing about validation, scoring, listing or price. ## Notes renters see {#node-notes} Tell renters about a node before they rent it, so they can plan for it (for example, start their workload automatically after a reboot). On the node page, under **Notes renters see**, tick any of these notes. You can set them as soon as the node is added: - May reboot occasionally - Maintenance is announced in advance - Home or office network - Data in the pod volume (usually /root) and attached Volumes survives a reboot Each tick saves straight away. Renters see the ticked notes on the node's card on Browse Pods. Notes come from this list only; you can't write your own. ## Synchronization {#synchronization} Only for a **self-hosted provider**. On the Central Provider Server, Lium syncs for you. - **Sync From Provider Server**: copies the nodes on your server into the portal. A node it cannot add is listed above the table with what to fix. - **Sync Into Provider Server**: pushes portal changes to your server, if it was offline when you made them. Sync runs on its own while your provider is connected, so you rarely need these buttons. ## Price Management {#price-management} ### Updating Prices {#updating-prices} 1. Open the node's page and click **Update Price**. 2. Enter the hourly price per GPU (USD) in **GPU Price**. 3. On a rented node, tick **Apply after the current rental ends** to keep the current rental at its price. New rentals then pay the new price at once, with no monthly or percentage raise limit. 4. Optional, on a Secure node: turn on **Offer this Secure node as Spot while it is idle** and enter a lower price in **Spot price per GPU** to list the node on the Spot tab too ([Offer a Secure node as Spot too](./node-tier.md#spot-rate-on-secure)). Turn the switch off to stop the Spot offer. 5. Save. Under the price, the dialog shows what rentals of that GPU model paid over the last 30 days (the median). It turns yellow when your price is 1.25x that or more: renters are likely to pick cheaper nodes. It is a hint only; you can still save any price. To compare prices, open the public [Marketplace prices](https://grafana.lium.io/d/marketplace-prices-v1?orgId=2) dashboard (no login). **When a new price applies** - **New rentals**: at once on an idle node, and on a rented node whose rentals all keep their price; on any other rented node after the next sync, about 15 minutes. - **A lower price** also applies at once to rentals already running, unless you ticked **Apply after the current rental ends** during that rental: that rental then keeps its price until it ends, also for every later change. - **A higher price** reaches a running rental that does not keep its price only after notice: on a Secure node 7 days after the renter is told, and never before the rental is 21 days old; on a Spot node 24 hours after, and the notice never starts before the rental's day 3. ### Intro price {#intro-price} On a Secure node you can offer new renters a lower price for their first hours: 1. Open the node's page and click **Update Price**. 2. Under **Intro price**, enter the intro price per GPU (USD) and how long it lasts, from 24 to 720 hours (30 days). 3. Save. Clear both fields to remove it. - The intro price must be below the node's price and within the model's limits (`p_min`, `p_max`). While a Secure node has an intro price, its price cannot go down to it or below: lower or remove the intro price first. On a Spot node an intro price has no effect. - Renters see both prices and the intro length on the node before renting. - A renter's first rental of the node pays the intro price, then moves to the node's price at the time of renting once the intro hours are over. The renter gets an e-mail when the price changes. A renter who has rented the node before pays the node's price, so deleting a pod and renting the node again never restarts the intro. - During its intro hours a rental keeps its intro price: price changes you make then, up or down, do not reach it, and it does not count toward the raise limits below. Once it moves to its normal price it is an ordinary rental: later changes follow the rules above (a lower price at once, a higher one after notice), unless you ticked **Apply after the current rental ends**, also during the intro, which keeps it at its normal price until it ends. - Changing or removing the intro price changes only new rentals. - Spot nodes cannot have an intro price. From the portal API: `PUT /executors/{node}/intro-price` with `{"intro_price_per_gpu": 1.5, "intro_hours": 72}`, or both `null` to remove it. ### Price limits {#price-limits} | Limit | Effect | |---|---| | Below the model's minimum price (`p_min`, Secure nodes only) or above its maximum (`p_max`) | Refused | | While rented: more than one raise per calendar month (UTC) on a Secure node, or per 7 days on a Spot node | Refused, unless applied after the current rental ends | | While rented: a raise of more than 25% over what the rental pays | Refused, unless applied after the current rental ends | | Above the model's **soft limit** | Allowed, but the node earns no idle pay. The node page shows a blue notice, not a problem to fix. See [Price and the unrented incentive](../rewards/idle-pay.mdx#price-and-the-unrented-incentive) | While rented, you can raise the price once per calendar month (UTC), or once per 7 days on a Spot node. A stopped pod (for example one stopped for an empty balance) does not count, on Secure and Spot nodes alike: its renter still gets the raise notice, and the new price reaches the marketplace with the next validator sync, or as soon as someone starts a new rental on the node if that comes first, so a rental started in between cannot hold the raise back. Lowering is always allowed. After that raise, **Update Price** shows the date the next one is allowed. Read the current limits per model from the API (`p_min`, `p_max`, `soft_price_limit`): ```bash curl https://lium.io/api/machines ``` ### Follow the market automatically {#follow-the-market-automatically} Prices move: Spot prices often drop at the weekend and rise on Monday. This script sets each **idle** node to the median price of rentable nodes of the same GPU model and tier. It skips every node that is rented when it reads your node list. **1. Configure the machine that runs it** Python 3.10–3.13: ```bash pip install "lium.io[provider]" lium config set provider.coldkey my-wallet lium config set provider.hotkey my-hotkey ``` The script logs in on each run, so the weekly session never runs out. **2. Save the script as `lium-reprice.py`** Set `FLOOR` and `CEILING` per GPU model. Without them it stays between the model's minimum price and its soft limit, so the node keeps idle pay. ```python #!/usr/bin/env python3 """Move each idle node's price to the market median. Run from cron.""" import json, statistics, subprocess, sys, urllib.request FLOOR = {} # your lowest price per GPU model, e.g. {"NVIDIA H200": 2.10}; default: the model's minimum CEILING = {} # your highest; default: the model's soft limit, so the node keeps idle pay DRY_RUN = "--dry-run" in sys.argv def get(url): with urllib.request.urlopen(url, timeout=30) as r: return json.load(r) def lium(*args): out = subprocess.run(["lium", "provider", *args, "--json", "--yes"], capture_output=True, text=True, check=True) return json.loads(out.stdout)["data"] def feed_name(model): # the nodes feed's gpu_model: the machine name without the vendor prefix return model.strip().removeprefix("NVIDIA ").removeprefix("GeForce ") def my_nodes(): page = 1 while True: body = lium("node", "list", "--limit", "100", "--page", str(page)) yield from body["data"] if isinstance(body, dict) else body if not (isinstance(body, dict) and (body.get("pagination") or {}).get("has_next")): return page += 1 lium("portal", "login") # renews the weekly session; reuses it while valid limits = {m["name"]: m for m in get("https://lium.io/api/machines")} feed = get("https://lium.io/api/public/v1/nodes")["nodes"] for node in list(my_nodes()): model, price = node.get("gpu_type"), node.get("price_per_gpu") if node.get("rented") or node.get("rented_gpu_count") or model not in limits or price is None: continue # skip nodes rented when the list was read tier = node.get("effective_tier") or node.get("tier") # the tier renters see peers = [n["price_per_gpu_hour"] for n in feed if n.get("available_now") and n.get("price_per_gpu_hour") and n.get("gpu_model") == feed_name(model) and n.get("tier") == tier] if not peers: continue lim = limits[model] low = FLOOR.get(model, lim["p_min"]) if node.get("tier") == "secure": # the price floor binds Secure only; a Spot FLOOR may go below it low = max(low, lim["p_min"]) high = CEILING.get(model, lim["soft_price_limit"] or lim["p_max"] or float("inf")) if lim["p_max"]: # 0 means the model has no maximum high = min(high, lim["p_max"]) if low > high: # e.g. your FLOOR above the soft limit: pick one in FLOOR/CEILING print(f"{node['id']} {model}: skipped, floor {low} is above ceiling {high}", file=sys.stderr) continue target = min(max(round(statistics.median(peers), 2), low), high) # round first: the limits themselves may have 3 decimals if abs(target - price) < 0.01: continue print(f"{node['id']} {model}: {price} -> {target} (median of {len(peers)})") if not DRY_RUN: try: lium("node", "update-price", node["id"], "--price", str(target)) except subprocess.CalledProcessError as e: print(f"{node['id']}: update failed: {e.stdout or e.stderr}", file=sys.stderr) # go on with the next node ``` **3. Try it, then run it every 15 minutes** ```bash python3 lium-reprice.py --dry-run # prints the changes, sends nothing crontab -e # add: */15 * * * * python3 /path/to/lium-reprice.py ``` ## Pausing New Rentals {#pausing-new-rentals} Use **Pause New Rentals** to stop new renters without touching the current one. The node earns no idle pay while the pause is active, nor at the validator's first check after you resume it. It can be rented again as soon as you resume. **Pause a node** 1. Open the node's page. 2. Click **Pause New Rentals** and confirm. **What happens** - **Idle node**: the pause applies at once. The node leaves the marketplace and shows **NEW RENTALS PAUSED**. - **Rented node**: the node leaves the marketplace at once. The current rental keeps running; the pause applies when it ends. - Lium's own Default Job stops on a paused node within about five minutes. - The pause has no time limit. It stays on until you resume. - A paused idle node sends no **Node offline** alerts, so you can switch it off for repairs. Keep the node instead of removing it: a removed node comes back with a new Node ID and loses its history. **Undo it** - **Cancel New Rentals Pause** while the pause is still pending. - **Resume New Rentals** once it is active. ### From the portal API {#from-the-portal-api} The buttons call `POST` and `DELETE /executors/{id}/new-rentals/pause` on `provider-api.lium.io`, signed in. ## Reading your nodes from the API {#reading-your-nodes-from-the-api} `GET /executors` on `provider-api.lium.io` lists every provider's nodes, 10 per page. To read your whole fleet in one call, sign in and add `all=true`: ```bash curl -s "https://provider-api.lium.io/executors?all=true" -H "Authorization: Bearer $LIUM_API_KEY" ``` - **`all=true` returns every node of your account**: `page`, `limit` and `miner_hotkey` are ignored; `gone`, `sort_by` and `sort_dir` still apply. It takes 6 calls per account per minute. - **Paging still works**: `?miner_hotkey=&limit=100&page=1`, raising `page` until `pagination.has_next` is `false`. `limit` is at most `100`. - **A node missing from one page is not proof it is idle**: read all pages first. - **`rented`**: `true` while a renter's pod holds any of the node's GPUs. - **Match nodes by `id`**, the **Node ID** in the portal, not by IP. - **IP and port are only on your own nodes**: sign in, and only rows under your account's hotkey carry `executor_ip_address` and `executor_ip_port`. All other rows leave both fields out, so read them with `row.get(...)`, and carry no address anywhere else either. On those rows `executor_info.specs` keeps only the hardware fields (OS, CPU, GPU, RAM, disk, network speed, interconnect), `location` only country, region, city and time zone, and the validator's error only its title and reason code. - **Never remove a renter's container yourself.** To free a node, see [Taking a rented node out of service](#taking-a-rented-node-out-of-service). ## Renter ratings {#renter-ratings} When a renter rates your node, the node's page shows it under **Renter Ratings**, newest first: the date, the score out of 5, the reason they picked and their comment. Use it to find what to fix on the node. - **Only you see it**: renters, other providers and visitors do not. - **The comment's contact details are hidden**: links, e-mail addresses, `user@host` logins, local user names and pasted keys, tokens or passwords show as `[hidden]`. IP addresses, pod and container IDs and image digests stay, so you can match them against your host's logs. - **From the API**: `GET /executors/{id}/ratings` on `provider-api.lium.io`, signed in, returns the last 200. **All your nodes at once**: the **Nodes** page shows your average renter rating over the last 90 days and how many renters it is from (each paying renter counts once, by their latest rating). Renters do not see ratings. Click **Show ratings** to list each rating with its node. From the API: `GET /miners/ratings`, signed in or with a `read` key. ## GPU Splitting {#gpu-splitting} GPU splitting rents parts of one node to several renters at once. **Before you start** The host must pass the storage check in [Docker Storage Setup](../nodes/docker-storage.md). Until then the section shows **Not supported** and has no **Edit** button. ### Setting Minimum GPU Count for Rental {#setting-minimum-gpu-count-for-rental} 1. Open the node's page and find the **GPU Splitting** section. 2. Click **Edit**. 3. Set the minimum GPU count: at least `1`, and below the node's total. 4. Save. Renters can then rent any count from your minimum up to the total. To turn splitting off, clear the minimum; this works only while no partial rental runs. ## Bare-metal rentals (not released yet) {#bare-metal-rentals} Turn on **Bare-metal rentals** on the node's page to let a renter of the whole node have root on the host. **When a renter takes it** 1. Lium sends the renter's SSH key to your notice thread on Discord. 2. Add the key to `/root/.ssh/authorized_keys` on the host. 3. Send the renter the SSH command in the pod's support channel. The node is not validated while the rental runs, and you are paid as usual. **When the rental ends** Lium tells you in your notice thread, and the node is paused for new rentals. 1. Remove the renter's key from `/root/.ssh/authorized_keys`. 2. Reinstall the host and run the node again. 3. Resume new rentals on the node's page. ## Cluster Fabrics (InfiniBand and RoCE) {#cluster-fabrics-infiniband-and-roce} Nodes with an RDMA card can be rented together as one multi-node cluster from the renters' **Clusters** tab. See [Multi-node clusters](../../pod-users/clusters.md). **Cluster badges** Turn on **Cluster status** above the Nodes list to see one of: - **CLUSTER READY +N** (or **ROCE CLUSTER READY +N**): the node shares a fabric with N of your other nodes. - **IB UNPAIRED** / **ROCE UNPAIRED**: the link works, but there is no node to pair with. The tooltip says why. - **IB LINK DOWN** / **ROCE LINK DOWN**: no active port. Check the cable. - **EFA CLUSTER READY +N** / **EFA UNPAIRED** / **EFA LINK DOWN**: the same, for an AWS EFA node. EFA nodes pair only after Lium's transfer test passes between them, run automatically on free nodes of yours with the same GPU model and count. ### Making nodes cluster-ready 1. **Bring the port up**: `ibstat` must show an `ACTIVE` port. 2. **Put the nodes on one fabric**: the same switch and subnet manager. Ports with a subnet manager on the node itself, such as NVLink switch management cards, are ignored; keep them up. For RoCE, one address per card in the same `/24`, and the switch in lossless mode (PFC/ECN). For AWS EFA, launch the nodes in one cluster placement group so they reach each other over EFA; Lium tests every pair while the nodes are free. 3. **Keep them in one partition** (InfiniBand): at least one node of a pair must be a full member (`0xffff`). 4. **Match the hardware**: same GPU model and GPU count on every node. 5. **Keep the node whole**: clear the minimum GPU count for rental. 6. **Open UDP port 51820** between your nodes. On AWS EFA, allow it between the nodes' private VPC addresses in their security group: cluster members reach each other there, not at the public address. 7. **Wait for the next check**: the badge updates within about 15 minutes. ## Pod traffic {#pod-traffic} On your node's page, each rented pod shows **Traffic in / out**: the data its container received and sent since it started. Lium's validator reads it each time it checks the node, so it can lag by one check. A dash means no reading yet. Only you see it. ## Taking a rented node out of service - **Pause New Rentals**: the current rental runs to its end; no new renter. See [Pausing New Rentals](#pausing-new-rentals). - **Permanent removal notice**: the platform ends the rental at a time you set, at least 48 hours ahead. See [Notice Period Management](#notice-period-management). - **Remove pod**: ends the rental; only when the pod's container is already gone. See [Removing a pod](#force-closing-a-pod-mark-broken). ## Reinstalling the host and keeping the node {#reinstalling-the-host-and-keeping-the-node} The Node ID and its history live in the portal, not on your server, so a fresh OS install keeps them. When the reinstalled server reports again, the portal matches it to the same node by your account, its public address and port. 1. On the node's page, click **Pause New Rentals**, so no new renter is placed on it and no offline alerts are sent while it is down. 2. Wait for the current rental to end. A reinstall ends a running pod, and a notice does not fit: maintenance expects the renter's container to survive, and permanent removal deletes the node. 3. Do not click **Remove**. A removed node comes back as a new node with a new Node ID and no history. 4. Note the ports you use now: the executor port (default `8080`), the SSH port (default `2200`) and your rental port range, plus any router forwarding. Nothing secret needs a backup: the command in the next step writes the node's settings again. 5. Reinstall the OS, then open **Add Node** again for a fresh [one-line command](#option-1-run-one-command-on-the-host) (it works for one hour) and run it on the server with the same account, the same public address and port, and the same GPUs. Pass your non-default ports to it too. When it reaches the register step, it prints `Node already in the portal at
:` instead of adding a second node. 6. Wait until the node's page shows **NEW RENTALS PAUSED** with no validation errors (a paused node never shows **AVAILABLE**), then click **Resume New Rentals**. **Registered by hostname**: the portal matches a node by IP address and port, and the command sends the address the hostname resolves to, so a node you added by hostname comes back as a new node with a new Node ID and no history. Its host SSH key also changes with the reinstall, and **Edit Address** to the same address is refused. Contact support before reinstalling such a node. **Behind a relay, a port-forwarding VPS or CGNAT**: the command detects the server's own public address, which is not the one renters reach. Add `--ip ` to the command so the node keeps its address. You can run it before the tunnel is back; an unreachable port only prints a warning. Once the relay forwards to it, the node is checked again; resume rentals as in step 6. **A new address**: if the server comes back at a different public address, use [**Edit Address**](#troubleshooting) on the node's page instead of removing and re-adding it. The node keeps its Node ID and history. ## Moving a rented node to a standby machine {#moving-a-rented-node-to-a-standby-machine} If a rented node's hardware fails, you can move its disk to a standby machine with the same GPU model and count. The renter keeps the pod: it restarts once on the new GPUs, and files in its volume are kept. 1. **Free the standby machine**: no renter on it. If it is one of your nodes, keep it: step 3 swaps the two addresses. 2. **Boot the standby machine from the failed node's disk.** Its executor `.env` must declare every port the pods are reached on (`RENTING_PORT_RANGE` or `RENTING_PORT_MAPPINGS`, opened in its firewall), and none of them may be its own SSH port, which validators never rent out: a pod keeps its ports when the node moves. Booting from the failed node's disk keeps them. 3. **Edit Address**: on the failed node's page, enter the standby machine's IP and port as soon as the node answers. If your standby node holds that address, choose **Swap addresses with that node**: the standby node takes the failed node's old address and leaves the marketplace until it is checked again. The portal requests an immediate validator check when the address-move recheck limits allow it; otherwise, the node waits for its next scheduled check. The portal refuses the edit, and names the ports, when the standby machine does not declare a port a pod is reached on, or when its executor is too old to report its ports; fix the `.env` or update the executor, then try again. 4. **Wait for verification**: the pod restarts on the new GPUs, and its renter is emailed the new SSH address. Do it outside a maintenance window. Ask your renters not to reboot the pod during the move. ### Copying only the pod's volume to a standby machine {#copying-only-the-pods-volume} If copying the whole disk is too slow, you can copy just the pod's volume to a standby machine that already runs as a Lium node. Only the volume (`volume_`) is kept. Copy it from its host path, never from inside the pod. With the vloopback driver, the `Mountpoint` in `docker volume inspect` is a plugin path; the host path is `$(docker info -f '{{.DockerRootDir}}')/plugins/$(docker plugin inspect -f '{{.Id}}' )/propagated-mount/volume_`, and it exists only while a container uses the volume. On an encrypted pod the volume is mounted at `/lium-cipher`, and `/root` is only its decrypted view. Other files in the pod are lost, as on any pod restart. 1. **Tell Lium support before you start.** 2. **Create the volume on the standby machine**: same name, driver and size as on the failed machine (`docker volume inspect volume_`). 3. **Mount the volume on both machines**: a new or idle volume stays unmounted until a container uses it, so on each machine run `docker run -d --name hold- -v volume_:/mnt alpine sleep infinity`. Remove it with `docker rm -f hold-` after the last sync. 4. **Copy the volume data as it is**: `rsync -aHAX --numeric-ids`, with no `chown`. Encrypted volumes are copied as the encrypted files. Run a final sync while the pod is idle, then compare checksums. 5. **Edit Address**: it moves every pod on the node, so on a split node copy every `volume_` on the node first. Move the rented node to the standby machine's address and choose **Swap addresses with that node**. The standby node takes the old address and should stay paused. 6. **Check the pods**: each restarts on the new machine with its volume, keeps its name and port, and the renter is emailed the new SSH address. Keep the old disk untouched until the renter confirms. Do it outside a maintenance window: Edit Address is refused while a notice is open. A rental that ends during the move counts as an outage and can take the 24-hour penalty. The pod is down for about 8 minutes from the swap. The standby GPUs must report exactly the same model name: a different name resets verification, and the node stays inactive and scores 0 until it passes the next check. ## Notice Period Management {#notice-period-management} A notice tells renters the node will be down. During a maintenance window the renter is not billed, the node earns no incentive, takes no penalty and cannot be rented. - **Maintenance**: up to 60 minutes needs 24 hours of notice, or 30 minutes on a Spot node. Up to 24 hours needs 48 hours of notice. A window over 6 hours is allowed once in any 30 days for all your nodes; give every node the same start time to cover them in that one window. A node can be in maintenance at most 24 hours in any 7 days. - **Permanent removal**: at least 48 hours ahead. The node stays rentable; renters see the removal time before renting and a new renter gets it by e-mail. At the start time the rental ends and the node is removed. - **Keep it online one more day**: idle pay settles about 24 hours after it is earned. Keep the node online and passing checks for about 24 hours after the start time, or its last day of idle pay is lost. See [How emissions arrive](../rewards/idle-pay.mdx#how-emissions-arrive). - **Late Notice**: learned of maintenance too late for the notice above? Add it anyway, down to **Start now**. The portal makes it a Late Notice: at most 3 hours, it cannot be extended, and a node can have one every 30 days (removing one before it starts frees it again only if its e-mail had not reached any renter yet; finishing early does not). The window works like any maintenance window, and renters are e-mailed at once. If a renter on a Secure rental, whose pod was on the node when you added the notice, asks to end the rental during the window, Lium credits them up to 24 hours of the highest hourly price the rental paid in the 24 hours before you added the notice (a price cut just before does not lower it), the amount the form shows (never more than they paid and were not refunded) and you owe your share of that credit, taken from later payouts. A renter who stays, or a Spot rental, costs you nothing. Downtime after the window follows the usual outage rules. - **Notify renters**: when Late Notice is not available (a window over 3 hours, a Late Notice on this node in the last 30 days, a node that is already down or waiting for its first check after maintenance, or a permanent removal), the form offers **Notify renters**. It e-mails the renters and creates no maintenance window: billing, incentive and the usual outage rules carry on. - Renters on the node get an e-mail about a minute after you add a notice, and another if you remove it before it starts. Remove it within that minute and they get no e-mail. A Late Notice and Notify renters are e-mailed at once. Notify renters counts toward the node's [3 renter messages a day](#message-your-renters). All times are UTC. - The reason is e-mailed to the renters: plain text, no links or contact addresses, up to 1000 characters. **Add a notice** 1. Open the node's page and click **Add Notice Period**. 2. Pick the start time (UTC), or click **Start now**. 3. Enter the length in minutes (1440 at most), or tick **Permanent remove?**. 4. Read the terms the form shows: a Late Notice lists what each rental on the node could cost you. 5. Click **Add** (**Add Late Notice**), or **Notify renters** when that is all the form offers. **Finish maintenance early** 1. When your work is done, click **I have finished** on the node's page. 2. Keep the renters' containers running. The node is back on the market after its next passed check that sees every renter's container running. **After the window** - After the window ends Lium requests a recheck of the node. If the fast recheck is not available, the node is checked in the regular cycle. It is back on the market once a check that started after the window's end passes and sees every renter's container running. - Lium no longer reboots every pod when the window ends. A pod whose container is not running is rebooted once, about 20 minutes after the window. ## Recheck a node {#recheck-a-node} After you fix a node, click **Recheck now** on the node's page. The validator checks it within a few minutes instead of waiting for the next cycle. Once per node every 15 minutes. A node that has not passed a check yet is checked on its own: Recheck now works once it passes. ## Notify Machine Request from Customer 1. Open the node's page and click **Notify**. 2. Pick a matching request. 3. Click **Notify**. The renter gets an e-mail about your node. This needs a node verified by a validator. See [Machine Requests](./machine-requests). ## Message your renters {#message-your-renters} 1. On a rented node, click the envelope icon in the node list. 2. Write a short message, for example a planned restart. 3. Click **Send**. Everyone renting the node now sees it on their pod page. Lium also e-mails it to renters with an e-mail address and sends it to their webhook if they set one. Plain text only, no links, up to 1000 characters and 3 messages a day per node. You do not see who the renters are, and they do not see your account. For planned downtime, also set a [notice period](#notice-period-management). ## Removing a pod {#force-closing-a-pod-mark-broken} Use this when a rented pod's container is gone or dead on your host but still shows as rented. Ending the rental clears the pod so the node can be rented again. **Ending a live rental early (emergency)** If you must end a rental that still works, for example to take the machine back urgently, **Remove pod** works on a running pod too. It costs the same as below, even seconds after the rental started: 24 hours of the rental's price on a Secure node, nothing on Spot, and the Reserved deposit instead for a Reserved rental. The node stays: it is not deleted or delisted, and it can be rented again once the pod is cleared. To take the node off the market too, [pause new rentals](#pausing-new-rentals) or delete it. **How to do it** 1. Open the node's page. 2. In the **Pod Statuses** table, click **Remove pod** on the pod's row. 3. The dialog shows what ending this rental costs you. Click **Remove pod**. **What happens** - **Secure node**: you lose 24 hours of the rental's price, taken from later payouts. See [Penalties](../rewards/penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours). - **Spot node**: no money is withheld. - **Reserved rental**: you do not pay the 24 hours. Your Reserved deposit (7 days of the price) goes to the client and the 30-day term ends. See [Reserved rentals](../rewards/reserved-rentals.mdx#what-a-clients-term-means-for-you). - The renter is credited and the pod shows **BROKEN**. - The platform does not stop the container at once: the validator removes it, with its volume, at a later check of the node. Do not stop or remove it yourself (see [Leftover rental pods](../troubleshooting.md#leftover-rental-pods)). - Limit: 2 pods per node, and 3 per account, in 24 hours. **From the API** The same close is `POST /executors/{executor_id}/pods/{pod_id}/mark-broken` on `provider-api.lium.io`. It takes only a signed-in portal session token: an `lpk_` API key is refused with 401. 1. Find the pod id: `GET /executors/{executor_id}/pods`, signed in as the node's owner, lists the node's rented pods with their `id` (the id is null on anyone else's read). `{executor_id}` is the node ID from the node page's address, `provider.lium.io/nodes/`. 2. End the rental: ```bash curl -s -X POST https://provider-api.lium.io/executors//pods//mark-broken \ -H "Authorization: Bearer $PORTAL_SESSION_TOKEN" ``` The answer is 403 for a node you do not own and 429 once the limit above is spent. The charge is the same as with the button. ## Node Deletion **Delete a node** 1. Open the node's page and click **Remove**. 2. The node leaves the rental listing within a few minutes. A node with an active rental cannot be deleted. Wait for the rental to end first. A pod stopped for an empty balance, or one already being removed, does not block the delete: Lium removes it with the node. Collateral is no longer used. If you made a collateral deposit for a node, we pay it back on request: contact [support](../../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) with the node ID. ### Archived nodes A node silent for 30 days moves to the **Archived nodes** tab and is hidden from renters. If the machine comes back, the node returns on its own. **Remove all N** deletes your archived nodes in one go. ### Moving a node to another account {#moving-a-node-to-another-account} **Move a node to another hotkey** 1. Wait for any rental on the node to end, or [set a notice period](#notice-period-management). Removing a node loses its unsettled and held Secure idle pay, even if you add it again right away. Spot idle pay is not affected (see [How emissions arrive](../rewards/idle-pay.mdx#how-emissions-arrive)). 2. On the current account, open the node's page and click **Remove**. 3. Sign in with the other account and add the node with the [one-line command](#option-1-run-one-command-on-the-host). **With the CLI only** (lium.io 0.46.16 or later: [upgrade `lium`](../../developers/cli/installation.md#install) the way you installed it, then check that `lium --version` shows 0.46.16 or later) 1. Wait for any rental on the node to end, as above. 2. Remove the node from the current account with `lium provider node rm `. 3. On the host, run `lium mine --auto -k `. The executor restarts so it reports the new hotkey. While a rental is still running it does not restart, and the portal refuses the add in the next step until it does. 4. With the CLI signed in to the new account, run `lium provider node add` at the same IP and port. Added within 7 days of the removal, the node keeps its tier. Remove it first: while another account still lists the node, the new add is skipped, and a node registered under two hotkeys is paid to only one of them. Under the new key the node starts with a clean record: its past rentals and penalties stay with the old account. Keys we link to one owner are scored together (see [Penalties](../rewards/penalties.mdx#effect-on-your-node-tier)). ## Troubleshooting **Node not appearing** - Check the form values and that the machine is reachable from the internet. - Check that your provider server is connected. - If another account already has that IP and port, your node is skipped. - A new node usually stays **VALIDATION PENDING** for about 5 minutes, sometimes up to about 40. See [Monitoring → What each status means](./monitoring.md#what-each-status-means). **Node's public IP changed** Open the node, click **Edit Address** and enter the new address and port. The node keeps its node id and is listed again once a validator checks it. A rented node can move too: when its IP changes, its renters are emailed about the move. - **[Lium.io Central Provider Server](../provider-configuration.md):** enter the public IP or a hostname. A hostname needs the node's executor on the latest release (it updates itself); the portal refuses the edit otherwise. A node installed with **Run one command** takes a hostname only once its executor signs the portal's check with its SSH host keys; until then, use its public IP. - **[Self-hosted provider](../self-hosted-provider.md):** enter the public IP or a hostname. Update your provider server to the latest release and keep it connected: the portal refuses the edit otherwise. Your provider server gets the new address as soon as it is connected, so keep it running. The next change waits until it has. --- # Node Tier: Secure vs Spot Every node is **Secure** or **Spot**. A new node starts on the tier picked in the **Tier** field of the Add Node dialog (**Spot** by default); the generated command adds the node on that tier too. A node your miner program lists without Add Node starts on **Spot**. A node re-added at the same IP and port within 7 days of its removal keeps the removed node's tier and its 24-hour tier limit: if the tier changed in the last 24 hours, Add Node refuses another tier and says when the tier can change. Picking another tier later than that counts as a tier change. The same holds for the same machine re-added from another IP or port, matched by its GPUs at its first check: a tier picked against the 24-hour limit goes back to the removed node's tier. When re-adding a removed node, pick the tier it had, since **Spot** is the default. | | Secure | Spot (default) | |--------------------------------|------------------|------| | Rental income | yes | yes | | [Rented extra](../rewards/idle-pay.mdx#the-three-pools) while rented | yes | no | | [Idle pay](../rewards/idle-pay.mdx) | yes | only while a Lium Default Job runs, at most 80% of the Secure rate | | Penalty on rental interruption | yes | no | | "Spot" badge shown to renters | no | yes | | Uptime | stay online for the whole rental | suits a node you cannot keep online | Renters see the **Spot** badge and know the pod may be interrupted without compensation. :::warning What "Penalty on rental interruption" means on Secure If a rental ends while your Secure node is inactive, you lose **up to 24 hours of that rental's price** ([conditions](../rewards/penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours)), not capped by what it earned, and all of your rental-fee payouts go to the debt until it is paid. A [notice period](./managing-nodes.md#notice-period-management) set at least 24 hours ahead waives it. Worked dollar examples: [Penalties](../rewards/penalties.mdx#read-this-first). Choose Spot for a node you cannot keep stable. ::: ## Secure listing needs idle pay (not released yet) A Secure node is listed on the Secure tab only while it meets every node requirement for idle pay: the minimum NVIDIA driver, sysbox, enough disk for its GPU VRAM, a GPU power cap the executor can set, the current executor image, a connected provider Discord, a price at or below the soft limit, and the rest the node page names. When the last check of the node finds one unmet, the node is hidden from the Secure listing until a check passes again. It keeps its tier, and no penalty applies. The rule applies only while renters see the node as Secure: a node listed as Spot stays listed. The node page lists each unmet requirement in red, with what the check measured, what is required and the exact fix. A new node stays listed until its first check. A GPU model outside the idle-pay program, or a GPU count the program has no room for this cycle, does not hide the node. A fix that needs a reboot or a Docker restart stops every pod on the host, a renter's included. While a rental runs on the node, the fix starts with **Pause New Rentals** and ends with **Resume New Rentals**. When new rentals are already paused and a rental still runs, the button reads **Cancel New Rentals Pause**: the fix tells you to leave it alone, wait until the rental ends, and click **Resume New Rentals** after. When new rentals are already paused and no rental runs, the fix ends with **Resume New Rentals**. A node with no rental and no pause gets neither step. ## Changing the tier A node can change tier once every 24 hours, in either direction. A new node can change tier at once. A node added within 7 days of deleting a node at the same IP and port keeps that node's last tier change: only if that change was in the last 24 hours does it wait, and selecting a different tier when adding it counts as a change. After a change, the dialog shows when the next change is possible (UTC). 1. Open the node's page in the Provider Portal. 2. Click **Change Tier**. 3. Select **Secure** or **Spot** and confirm. While the node is rented: - **Spot to Secure** works, unless the tier changed in the last 24 hours: the node is listed and paid as Secure from that moment. The rental already running keeps its Spot terms (no penalty if it is interrupted) until it ends. - **Secure to Spot** waits until the rental ends. - A node in a multi-node cluster job cannot change tier until the job ends. When you move a Secure node to Spot, the dialog shows the idle pay the node earned in the last 30 days. On Spot it can earn less than that. The current tier shows as the `TIER` badge in the **General** section. ## Offer a Secure node as Spot too {#spot-rate-on-secure} A Secure node can also be listed on the Spot tab at a lower price while it is idle. Turn on **Offer this Secure node as Spot while it is idle** and enter the **Spot price per GPU**: in **Add Node** (tier Secure, on either tab) or later in **Update Price**. The Spot price is required while the switch is on. When Lium knows the GPU model, the portal fills in the suggested Spot price. With **Run one command on the host**, the portal does not know the node's GPU price yet: if the price you typed is not below it, the node gets the suggested Spot price for its model, if Lium has one. You can change it in **Update Price**. Leave the switch off to list the node as Secure only, as before. - The Spot price must be below the node's Secure price. Lowering the Secure price is never refused: a Secure price at or below the Spot price ends the Spot offer, and you can set a new, lower Spot price. With the Spot price cap on, it can be at most the median Secure price of the GPU model, as for a Spot node. - A Spot node cannot set one: renters already see it as Spot. When a node with a Spot price moves to Spot, the next price change ends the Spot price; that change is never refused because of it. - The node stays Secure and keeps its Secure listing, idle pay and penalties while no Spot rental is open on it. Each renter chooses Secure or Spot when renting. - While a Spot rental is open, the whole node is scored as Spot, including its free GPUs on a split node: the node gets no Secure idle pay, no rented extra and no Spot idle pay, and its free GPUs take a Secure rental only as described below. Secure rents of the node are taken again as soon as that rental ends, and Secure idle pay resumes from the first scoring cycle after it ends. - The node holds rentals of one kind at a time. While a Secure rental is open on it, a Spot rent is refused until that rental ends. While a Spot rental is open, a paid Secure rent always ends the Spot rentals at once: their renters get an e-mail, and the Secure pod starts from that same rent, with no wait. So a Spot renter never changes what a Secure rental on the same node earns. - A rental taken as Spot pays the Spot price and has Spot terms for its whole length: no penalty if it is interrupted and no rented extra. Its uptime still counts toward the node's reliability score. If the pod does not start and Lium moves it to another node, it moves only to a Spot node and never pays more there: on a cheaper Spot node it pays that node's rate. - That rental keeps the Spot price it started at until it ends: a later change of the Secure price, or of the Spot price, reaches only new rentals. ## Idle pay on Spot {#idle-pay-on-spot} A Spot node gets idle pay while it is not rented and a Lium [Default Job](./default-jobs.md) runs on it. On a partly rented Spot node with [GPU splitting](../nodes/gpu-splitting.md), the free GPUs get it the same way, for their own GPU count. Lium sets the Spot rate per GPU model and GPU count daily, never above 80% of the Secure idle rate for the same GPUs. All idle Spot nodes of one GPU model share at most 90% of what Lium's Default Jobs earn on that model per hour, so the more Spot nodes there are, the smaller each node's share. The 90% is a ceiling, not a payout: each node's rate is also capped, so with few idle Spot nodes the total paid can be well below it. A Spot node earns no idle pay while: - it is fully rented (on a partly rented node, the rented GPUs); - no Lium Default Job runs on it; - Lium has no Spot rate for its GPU model and count yet; - it fails validation, new rentals are paused, Discord is not connected or the account's e-mail is not confirmed after the 3-day grace (the same as on Secure). The node's incentive history names the reason for each cycle that paid nothing. See [Monitoring](./monitoring.md#to-do-cards). ## Automatic move to Spot The automatic move to Spot for high [penalty coverage](../rewards/penalties.mdx#effect-on-your-node-tier) is switched off. Every node is on the tier you set. --- # Monitoring Nodes Watch each node's status, fix what the validator reports, and get alerts when something changes. ## Node Status Monitoring ![Node Status Monitoring](../assets/executor-status-monitoring.png) The **Status** badge sits on the Nodes list and at the top of each node's page. Hover it for the reason. **Checked … ago** under the badge is the validator's last check of the node. The portal API returns the same as `computed_status` from `GET /executors/{id}`. The node list, `GET /executors`, takes 60 calls per account per minute, enough to page the whole list at `limit=100` twice. `GET /executors?all=true`, signed in, returns all your nodes in one call and takes 6 calls per account per minute. Past that it answers 429 `rate_limited` with `Retry-After`, the seconds until the next minute. It also answers 429 when signed-in list calls across all providers pass their shared budget for the minute. Signed out, it answers a shared copy up to 30 seconds old, or 503 with `Retry-After` while the list is being refreshed. ### What each status means {#what-each-status-means} | Badge | What it means | What to do | |---|---|---| | **AVAILABLE** | Validated, listed, rentable. | Nothing. | | **RENTED** | Every GPU is rented. Beside it, how long the current rental has run (hover for the start time). | Nothing. | | **RENTED AS SPOT** | A Secure node is rented through its [Spot offer](./node-tier.md#spot-rate-on-secure), not as Secure: the rental pays the Spot price, and a Secure rental can still take the node. | Nothing. | | **VALIDATION PENDING** | Waiting for a validator check. A new node usually takes about 5 minutes. | Wait. If it lasts, see [Troubleshooting](../troubleshooting.md#a-newly-added-node-stuck-in-validation_pending). | | **VALIDATION PENDING** with a message such as `Miner not answering` or `Validator could not reach this node` | A problem reaching your provider server or the node. | Check the **Central Miner Server** switch is ON in [Profile Settings](https://provider.lium.io/settings), the executor container runs (`docker ps`), and the node's ports answer from the internet. | | **VALIDATION FAILED** | The validator rejected the node. It scores 0 and takes no new rentals. | Read the [last error panel](#the-last-error-panel) and look up the [reason code](../troubleshooting.md#6-validator-reason-codes). | | **NOT DETECTED** | No validator check in the last 2 hours. | Check the node is in `lium provider node list`, the executor container runs, and its ports answer from outside. If the message says your hotkey is not registered, [register it](../quickstart.md#step-1--register-your-provider-on-subnet-51). | | **OFFLINE** | The node's service port did not answer two pings in a row. Hidden from renters. It clears when the port answers a ping again: Lium pings every 5 minutes, and at once when a validator check reaches the node. | From outside your network: `curl -m 10 -X POST http://IP:PORT/ping -H 'content-type: application/json' -d '{}'`. A timeout means a firewall, NAT or port problem. | | **RECLAIMED** | Its notice period ended and the node is being removed. | Nothing if you set the [notice period](./managing-nodes.md#notice-period-management). If you did not, open a ticket through the [support flow](../../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support). | | **PAUSING NEW RENTALS** | The pause applies when the current rental ends. | Nothing. See [Pausing new rentals](./managing-nodes.md#pausing-new-rentals). | | **NEW RENTALS PAUSED** | Hidden from renters, no idle pay. | **Resume New Rentals** on the node page. Idle pay starts again from the second validator check after the resume. | A partly rented node shows **AVAILABLE**, with **2 of 8 GPUs rented** under its GPU count on the Nodes list. ### The last error panel {#the-last-error-panel} When a check fails, the node's page shows a red panel with: - **Happened at**: when the check ran. - **Impact**: what it does to the node. - **How to fix**: the fix for that reason code. - **Technical details**: what the validator measured. - **Copy for Discord**: copies everything support needs. ### To-do cards {#to-do-cards} Some problems also get a card above the red panel, with the fix and a copy button. | Card | What to do | |---|---| | No idle pay: this node is on Spot (`spot_tier`) | **Change Tier** to Secure. See [Idle pay on Spot](./node-tier.md#idle-pay-on-spot). Not shown on a partly rented node whose free GPUs got idle pay. | | No idle pay: not enough disk (`insufficient_disk_for_vram`) | The disk that holds Docker's data must be at least 1.5× the GPU memory, counting its total size, not free space. On the host, `df -h "$(docker info -f '{{.DockerRootDir}}')"` shows it in the Size column. Add disk or move Docker to a bigger drive. | | The rented container is not running (`POD_NOT_RUNNING`) | `docker start `. | | GPU check: out of memory | Stop non-Lium GPU processes. See [Out of memory](../troubleshooting.md#gpu-verify-failed-vram). | | GPU check: CUDA cannot start | Start `nvidia-fabricmanager`. See [CUDA cannot start](../troubleshooting.md#gpu-verify-failed-cuda-not-ready). | | GPU check: no CUDA device in the container | See [No CUDA device](../troubleshooting.md#gpu-verify-failed-container-gpu-access). | | GPU check: other error | See [Which case is yours](../troubleshooting.md#gpu-verify-failed-sub-cases). | The node's Incentive history under [Earnings](./earnings.md) names the reason for each cycle that paid nothing. ### Public listing The **Public listing** line under the Status says whether renters can see the node now: **Listed**, **Rented since**, **Hidden from renters** (with each failing condition), **Offline** or **Validating**. A node is listed while it is active and verified, not offline, not paused, has free GPUs, at least 3 free ports (3 for each split on an unrented split node, 1 once part of the node is rented), and its disk is at most 90% used with enough space free. `GET /executors/listing` on the portal API returns this for every node of your account. If a GPU fails on a node that is partly rented, for example the validator's check no longer finds a GPU assigned to a rental, the node takes no new rentals. The running rental keeps going and earning. The red panel says so. When the rental ends, reboot the host or reset the GPU; the next clean check lists the node again. ## Node alerts Alerts land in the portal inbox (the bell in the sidebar). You can also get them by e-mail, Discord or webhook. Every Lium message to you on Discord (these alerts, rented-node notices, machine requests and bare-metal rentals) arrives in your private notice thread on the Lium server (`notice-provider-` plus the start of your hotkey), the same thread our support team writes in. If you don't have one yet, the first message opens it and adds you. Lium never sends you a Discord DM. **What is sent** - **Node offline**, **Node validation failed**, **GPU needs a reset**, **Node inactive** (GPUs changed) - **Node passed validation again** (under **Validation failed**): a node that failed because it could not be reached (`EXECUTOR_UNREACHABLE_BY_MINER`, `RENTED_EXECUTOR_NOT_LISTED`, `EXECUTOR_SSH_UNREACHABLE` or `EXECUTOR_TRANSPORT_UNREACHABLE`) passes its next full check, and the host's boot ID differs from the one at its last successful check. The message says "The host restarted between the last successful check and recovery." and names the failure reason. It shows that a restart happened in that interval, not when, why, or whose fault it was. It changes no score, payout or penalty - **Zero incentive** (a node, rented or not, earns no incentive for three validator cycles in a row), and when it earns again after that message; at most two a day per node. Inbox, e-mail and webhook only, not on Discord - **Node listed** (first time a new node is visible) - **New rental** (a rental started on your node) - **Pod SSH not responding** (SSH to a rented pod on your node stopped answering). Off until you turn it on: it also fires when a renter stops SSH in their own pod - **Rental interrupted**, **Provider penalty applied** - **Rental ended** (portal inbox and webhook, no e-mail or Discord DM, `rental.ended`; not sent after a **Rental interrupted**). Its `payload`: `gpu_type`, `gpu_count`, `tier`, `price_per_gpu`, `started_at`, `ended_at`, `rental_hours`, `close_reason` (`renter_ended`, `node_offline`, `node_broken`, `node_reclaimed` or `other`) - **Provider payout sent** A **rented** node that loses a GPU, or stops passing validator checks for over an hour (even if the renter ends the pod during the outage), also sends you a message in your Discord notice thread and an e-mail, once per outage. It names the node by your [label](managing-nodes.md#naming-a-node), or by its Node ID if the node has none. Bring the node back online: check that the machine is on and the executor is running. A **GPU needs a reset** alert (`node.gpu_reset_needed`: `GPU_WEDGED`, `GPU_MEMORY_HEALTH_FAILED` or `GPU_LOST` twice in a row; the node is hidden until the card is reset) always lands in the portal inbox. It goes by e-mail, Discord or webhook only when both **GPU needs a reset** under **Events** and that channel are turned on in **Profile → Notifications**. These reasons no longer send a **Validation failed** alert. Reset the card (`nvidia-smi -r -i ` with no process on it). Reboot the host only when no rental is running on the node; if one is, wait until every rental on it has ended. **Turn on a channel** 1. Open **Profile → Notifications**. 2. Turn on **E-mail** (needs a confirmed address), **Discord** (needs a linked Discord account that is a member of the Lium server) or **Webhook push**. 3. Turn off any event you do not want. To check Discord, click **Send test** in the Discord section: a test message arrives in your notice thread. **Set up a webhook** 1. Enter an `https://` URL on a public host of your own (not a `lium.io` address) under **Profile → Notifications**. 2. Copy the signing secret. It is shown once. 3. Click **Send test**, then turn on **Webhook push**. A Discord channel webhook URL (`https://discord.com/api/webhooks/...`) works too: it gets each alert as a plain message, without the JSON body or signature check below. Each delivery is a JSON `POST` with `X-Lium-Timestamp` and `X-Lium-Signature: sha256=.")>`. Verify it over the raw body: ```python import hashlib, hmac, time def verify(secret: str, timestamp: str, raw_body: bytes, signature: str) -> bool: try: if abs(time.time() - int(timestamp)) > 300: return False except ValueError: return False expected = "sha256=" + hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, signature) ``` Deduplicate on the body's `id`: a delivery can repeat. After 12 failed deliveries in a row, **Webhook push** turns off; fix the endpoint and turn it back on. ## Verification timeline The node page's **Verification** panel shows where the current validator check is, step by step, and the result of the last one. After a run it shows a count of passed and failed steps with every failed step; **Show all steps** opens the full list. In the CLI: `lium provider node status ` (add `--watch` to follow it). ## Monitoring Tools ### 1. Node Details Page Open `https://provider.lium.io/nodes/{node-id}` for the node's status, specs, network speed, idle-pay tier and public listing state. **Network speed** shows **(measured)** once the validator has checked it. Renters filter on that figure, and a download under 100 Mbps marks the node slow. **GPU Details** shows each GPU's **Temperature** in °C from the last check your node passed. A failed check does not update it. Only you see it, on your own nodes. ### 2. Grafana Integration {#2-grafana-integration} Click the **Grafana** tab on the node's page to see the panels for that one node. Use **Node check logs** to see why a node is not passing checks and **Penalty events** to see what was withheld. The public dashboards are in [Grafana Dashboards](../grafana.md). ![Node Grafana Monitoring](../assets/executor-grafana-monitoring.png) ## Troubleshooting - A badge other than **AVAILABLE** or **RENTED**: start with [What each status means](#what-each-status-means), then the [reason code](../troubleshooting.md#6-validator-reason-codes). - Few rentals on an **AVAILABLE** node: check your price against the market and the [price limits](./managing-nodes.md#price-limits). --- # Default Jobs A Default Job is a workload that runs on a node while it is idle and unrented. Customer rentals always come first: a Default Job stops when the node is rented. ![Default Jobs overview](./assets/default-jobs-overview.png) ## Default Jobs and the unrented incentive {#default-jobs-and-the-unrented-incentive} On an idle node, pick one per node: - **Lium Default Job** (default): Lium runs its own job. The node keeps the [unrented incentive](../rewards/idle-pay.mdx#unrented-pool). - **Your own job**: a Custom Docker or Pearl Mining job of yours. The node earns no unrented incentive while it is assigned. - **Miner Empty Job**: a no-op container that keeps every job off the node. No unrented incentive. A rented node earns the same either way. ## Lium Default Jobs on idle nodes {#lium-default-jobs-on-idle-nodes} With no job of your own assigned, Lium runs its Default Job on an idle node. Nothing to configure. - A customer rental stops it within seconds. - A node with [new rentals paused](./managing-nodes.md#pausing-new-rentals) gets none. - Every start and stop shows in **Node Activity**. ### Which Lium Default Job runs on your node {#which-lium-default-job-runs-on-your-node} Lium picks one of two, per node, whichever earns more on it: - **Dolphin**: an AI inference worker, at full GPU power. It serves a large model, so it runs only on big nodes: each worker needs 340 GB of GPU memory across the node's cards (for example 8× H100, 4× H200, 2× B200 or 4× RTX PRO 6000). The node also needs an Ada-generation or newer GPU, NVIDIA driver 580 or newer, about 1.7 TB free disk, 480 GB of RAM per worker (220 GB on RTX PRO 6000) and an x86 CPU. - **Pearl**: the fallback for every other node. It runs at a lowered GPU power limit, restored when it stops. See [GPU power cap](../nodes/gpu-power-cap.md#the-lowest-limit-the-driver-accepts). Either way the node keeps its unrented incentive and stays rentable. ## Create a Custom Docker job 1. Open **Default Jobs** and click **Create Job**. 2. Select **Custom Docker**. 3. Fill in: - **Job Name** - **Image** and **Image Tag**, for example `alpine` and `3.20` - **Command / Args**: a command that keeps running, such as `sleep infinity` - **Disk Limit GB**: at least 1. The node needs this much free disk plus a 50 GB reserve. 4. Add **Environment Variables**, **Volumes**, **Internal Ports**, **Cache Size GB**, **Minimum VRAM MB** or **Minimum GPU Count** if needed. 5. Click **Save Default Job**. If the command exits, the job ends. A container that stops right after it starts shows **The job container stopped right after it started (exit code N)** in **Node Assignment** and **Node Activity**; exit code `127` means the command is not in the image. Click **Show logs** under the message to see the container's last output. ![Custom Docker Default Job modal](./assets/default-jobs-custom-docker-modal.png) ### Default Job cache Each run starts on a fresh disk. To keep model weights or other downloads between runs, turn on **Default Job cache** and set **Cache Size GB**. Every run then mounts the same volume at `/cache`. - A new cache is created only if its size is at most 30% of the node's free disk, and the node keeps at least 150 GB free beside it and the job's **Disk Limit GB**. Otherwise the run starts without `/cache`. - A cache that is already on the node is mounted again. If it holds less than its size, the part it can still grow by must pass the same check. - The size is not a hard limit: the job can write past it. What it writes past the size counts as used disk, and a full disk fails the node's validation. Keep the files you write inside the size you set. - Changing the size, or picking another job, starts a new empty cache. The old one is removed when the new job has a cache; a job with no cache leaves it on the disk. - A renter always comes first: when a rental needs the disk, the cache is removed. A rental that fits beside it leaves it in place. - The cache counts as free disk for rentals, so a large cache does not hide the node from renters. - Turn off **Default Job cache** for no cache. The form shows on how many of your idle nodes the size fits and does not save a size that fits on none. - The cache is used only when the whole node is free. A run beside a rental starts without `/cache`; the cache stays on the disk and the next run on the whole free node mounts it again. ### Use a private image {#use-a-private-image} Under **Private registry**, click **Add login**. Enter your **Username** and a **Read-only token** with pull access. For registries other than Docker Hub, include the registry host in the image name, for example `ghcr.io/you/miner`. The portal encrypts the saved token and keeps it hidden. To change it, click **Replace token**, check the **Username**, enter the **New read-only token** and click **Save Changes**. To remove the login, click **Remove login** and then **Save Changes**. To switch to a different private registry, first change **Image** to the image on the new registry: the login is saved for the registry in **Image**, and the form then says the saved login is for the old registry. Click **Replace token**, enter the new registry's **Username** and **New read-only token**, then click **Save Changes**. The saved username is kept until you change it. ## Create a Pearl Mining job {#create-a-pearl-mining-job} A Pearl Mining job mines Pearl (PRL) to your own wallet. It runs `daturaai/pearl-miner`, the image Lium's own Pearl job uses, on the Kryptex pool. 1. Open **Default Jobs** and click **Create Job**. 2. Select **Pearl Mining**. 3. Set the environment variables: - `PEARL_POOL_WALLET`: your PRL payout address (`prl1...`) - `PEARL_POOL_WORKER`: a worker name, shown in the pool's stats 4. Click **Save Default Job**. The image, ports and disk limit are fixed. Check your hashrate and payouts on the pool's site under your wallet address. Older Pearl Mining jobs used the Akoya pool, which no longer exists. They are moved to this image with the same wallet and worker name, so nothing needs changing. ## Create a Miner Empty Job {#create-a-miner-empty-job} 1. Open **Default Jobs**. 2. In **Node Assignment**, open the node's **Default Job** dropdown (or tick several nodes for the bulk dropdown). 3. Select **Miner Empty Job**. For several nodes, click **Apply to selected**. Selecting it turns the Miner Empty Job back on if it was off. The node stays rentable but earns no unrented incentive. To undo it, set the node back to **Lium Default Job**. ## Assign a job to nodes **One node**: in **Node Assignment**, pick the job in the node's **Default Job** dropdown. **Several nodes**: tick the nodes, pick the job in the bulk dropdown, click **Apply to selected**. To remove an assignment, choose **Lium Default Job**. A node has one assignment at a time. ### New nodes {#new-nodes} **Default Job for new nodes**, above the node list, sets one job for every node you add from then on. Each new node gets it as its own assignment within about 5 minutes of joining, and you can change it per node like any other. - Nodes you already had keep their assignment, or no assignment. - A new node too small for the job's storage limit is left on **Lium Default Job**. - Choose **Lium Default Job** there to stop; deleting the job stops it too. ### When your job runs {#when-your-job-runs} Your job starts on its own whenever the node is idle, just like Lium's: Lium checks every 5 minutes, including right after validation and after a rental ends. - A customer rental stops it; it starts again once the node is idle. - On a node with [GPU splitting](../nodes/gpu-splitting.md) on, it also runs on the free GPUs beside a rental, like Lium's. A new rental on the node stops it; it starts again on the GPUs left free. - Beside a rental, it starts only if its storage limit is 80 GB or less, the most Lium's own jobs use there. With a higher limit, it waits for the whole node to be free. Beside a rental, it runs without its cache. - After that rental ends, the job keeps only the GPUs it already had until it restarts; it does not grow back to the whole node. - A failed start is retried after 15 minutes. - After 3 failed starts within 12 hours, it waits 12 hours. Edit and save the job to retry at once. ![Default Job node assignment](./assets/default-jobs-assignment.png) ## Monitor runs - **Node Assignment**: assignment, runtime status, last event, runtime today and failure reason. - **Node Activity**: recent rentals and Default Job runs on your nodes, including a node that is failing checks now. A finished Lium Default Job run shows under **Amount** the node's idle pay for the checks scored while it ran (shared between Lium runs on the node at the same time), once they are paid. Until then it shows **In idle pay**: see it as pending on the Dashboard and on the **Earnings** page. ![Default Job activity table](./assets/default-jobs-activity.png) ## Disable or delete | Action | How | Result | |---|---|---| | Disable a job | Edit it, turn **Enabled** off | Kept, but not started | | Clear an assignment | Set the node to **Lium Default Job** | Lium's job runs again | | Delete a job | Open it, click **Delete** | Removed, assignments and the new-node setting cleared | --- # Earnings The Earnings page at [provider.lium.io/provider-earnings](https://provider.lium.io/provider-earnings) shows both of your income streams: **rental fees** and **subnet incentive** (idle pay and rented extra). **Pick what to see** Select a hotkey, a date range (up to 90 days) and, if you want, some of your nodes. Rental fees count for the account that owned the node when they were billed, even after the node moves to another provider. Fees billed to a node's previous owner are not shown. Rental earnings can appear before they are paid out. **Read the summary** The summary reads **Rental + Incentive − Adjustments = Total estimated**. The incentive is split into **Rented** and **Idle**. See [Idle pay](../rewards/idle-pay.mdx). **See held idle pay** When idle pay in the selected days is on hold or lost, **Idle incentive on hold or lost** lists each cycle: node, status, estimated amount, reason, and about when it was held and checked (estimates). It shows the newest 2000 cycles; pick fewer days to see older ones. **Open a day** Each row is one UTC day. Open it for the per-node breakdown, then open a node for its day page. The node's **Incentive history** says why a cycle paid nothing and what to fix. The day's **Rental earnings breakdown** ends on **Net rental**. When the day's payout also carried an account credit or recovered a debt, an **Account adjustment** line follows, then the **Rental payout** it adds up to. The day summary's **Adjustments** shows it too. **Balance adjustment details** says what it was. When Lium added a note to a credit or charge made by hand, it shows under that line. A day paid to your USD balance reads **Paid** once a payout has sent it. Until then, or when that payout failed, it reads **Pending payout** until a later payout run sends it. ## Accounts without a key {#accounts-without-a-key} If your provider account has no key of its own, its Earnings page has the same date range (up to 90 days, last 30 by default) and node filters as above. Only your own nodes are listed. Existing key accounts keep their usual Earnings page, including when signing in with Google. - **Totals:** the selected days and all time, in USD, net of the same adjustments (penalties, refunds, debt recovered and credits). The selected days split the total into Rental, Idle pay and Rented extra. All time shows Rental and one figure for idle pay and rented extra together. While some days' idle pay is pending, the selected days' total says so and leaves it out. While some days' idle pay or rented extra is still settling, the total says so too. - **All time (settled)** counts settled earnings only and does not change with the days you pick. Recent days show in the table and the selected days' total until they settle. - **Table:** each UTC day is a bold total line, followed by one line per node and, when there is one, an **Account adjustments** line. Columns: **Rental**, **Adjustments**, **Idle pay**, **Rented extra** and **Total**. Idle pay is earned while a node waits for a rental. The rented extra is paid on top of the rental fee while a node is rented, on [Secure](./node-tier.md) only. On a node line, Adjustments is rental withheld by a penalty or a declined charge. On the account line, it is debt recovered from your earnings (minus) or a credit (plus). Under a debt recovery, the line names the debt it repaid (for a penalty, the rental and node) and what you still owe after it. Debt is repaid oldest first. Idle pay reads **Pending** until the day's incentive is known; until then the line's total leaves it out and says so. Idle pay and rented extra are paid about a day after they are earned, so the most recent day or two may show only the part paid so far, marked **Still settling** under the line's total: it grows as the rest settles and is not an underpayment. - **Download statement (CSV):** the rows shown, one per node and UTC day, plus the account adjustments. The last column, `rented_extra_usd`, is the rented extra; `idle_usd` is idle pay only. ## Earnings statement For a bank, an accountant or a tax authority, use the toolbar: - **Download statement (CSV):** one row per node per UTC day of rental fees, one row per daily payout, and one row per UTC day of subnet incentive (idle pay, rented extra, total in alpha, and USD), with status `unavailable` when the incentive could not be read, and `not_tracked` for days before Lium tracked your hotkey. - **Printable statement:** the same figures with totals. Use **Print → Save as PDF** to keep a PDF. Subnet incentive settles as stake on your hotkey, not as a transfer to your coldkey. ## Verifying a settlement against the chain On a day's page, **Epoch settlements** lists each epoch that paid into that day. Its **Verify reward** link opens your hotkey's on-chain reward for that epoch on TaoMarketCap. **The epoch total is the authoritative figure.** The day, node and rented/idle splits are Lium's reconstruction, so small differences from the epoch total are expected and do not mean you were underpaid. ## Payouts {#payouts} - **Rental fees** go to your **coldkey** once per UTC day, in alpha. There is no claim button. A day too small to send is carried to your next payout. A day whose transfer did not go out is sent again automatically about two hours later. - **Subnet incentive** accrues as stake on your **hotkey** every tempo (~72 minutes). Look at your hotkey's stake, not your transfer history. An e-mail or Google account gets it in USDT with its rental fees. - **USDT instead of alpha:** set it in **Settings → Payout**. See [Stablecoin payout](../rewards/payouts.mdx#stablecoin-payout-usdt-on-ethereum). If a rental fails because of your node, a penalty is taken from your rental fees. See [Penalties](../rewards/penalties.mdx). Schedule maintenance with a [Notice Period](./managing-nodes.md#notice-period-management) to avoid one. [Payouts](../rewards/payouts.mdx) has the full schedule. ## Related - [Idle pay](../rewards/idle-pay.mdx): how idle pay and rented extra are funded - [Rental fees](../rewards/rental-fees.mdx): your share of what renters pay - [Payouts](../rewards/payouts.mdx): where each stream lands and when --- # Machine Requests Machine requests are renters asking for specific hardware. Answer them to fill your nodes. ![Machine Requests Page](./assets/machine-requests-2.png) ## View requests Open **Machine Requests** in the Provider Portal. - **With at least one verified node**: every open request with its full details. - **Without one**: only totals per GPU class and budget band. The CLI shows the same: `lium provider machine-request list` (see the [CLI reference](/developers/cli/reference/provider#lium-provider-machine-request)). **Requests that name you** A renter can address a request to you by your provider ID. It shows **Asked for you** in the list, and you may get an e-mail at your portal account's address. Other providers can still answer it. ## Respond to a request 1. Open your matching node's page and click **Notify**. 2. Pick the request. 3. Click **Notify**. The renter gets an e-mail about your node. ![Notify Renter](./assets/machine-requests-1.png) You do not have to notify: Lium also e-mails renters when a listed node matches their open request. --- # Provider API Read your nodes and daily earnings, and set node prices, from scripts with an API key. The full reference is at [provider-api.lium.io/docs](https://provider-api.lium.io/docs). ## Create an API key 1. **Open** [Profile Settings](https://provider.lium.io/settings) and find **API tokens**. 2. **Name the key** and keep only the scopes it needs: `read` for the read endpoints below, `price` to set prices, `node` to move or recheck a node. 3. **Click Create token** (enter your current password if asked) and copy the key, which starts with `lpk_`. It is shown only once and lasts 90 days unless you pick another length under **Expires after** (up to 365 days). A script can also create one with a signed-in session: `POST /auth/api-tokens` with `name`, `scopes` and `expires_in_days` (1 to 365). See the [reference](https://provider-api.lium.io/docs). To revoke a key, click **Revoke** next to it under **API tokens**. **Log out everywhere**, a new password (changed in Settings or set through **Forgot password**) or a new e-mail address also ends every key: create new ones afterwards. ## Call the API Send the key in the `Authorization` header: ```bash export LIUM_API_KEY=lpk_... curl -s https://provider-api.lium.io/auth/me -H "Authorization: Bearer $LIUM_API_KEY" ``` `X-API-Key: $LIUM_API_KEY` (the header of the renter API) works too. Without either header a call is answered as signed out: a node's read then has no GPU temperatures or pods. ## Read endpoints **Your nodes and why each is or is not listed** ```bash curl -s https://provider-api.lium.io/executors/listing -H "Authorization: Bearer $LIUM_API_KEY" ``` One entry per node: `listing_state`, `blocking_reasons`, `gpu_count`, `rented_gpu_count` and the idle pay state. **All your nodes in one call** ```bash curl -s "https://provider-api.lium.io/executors?all=true" -H "Authorization: Bearer $LIUM_API_KEY" ``` Each of your nodes includes its GPU temperatures (`executor_info.specs.gpu.details[].temperature`, in °C). The other live GPU readings are only in the one-node call. **One node** ```bash curl -s https://provider-api.lium.io/executors/ -H "Authorization: Bearer $LIUM_API_KEY" ``` **Daily earnings** ```bash curl -s "https://provider-api.lium.io/provider-ledger/daily?from=2026-10-01&to=2026-10-24" \ -H "Authorization: Bearer $LIUM_API_KEY" ``` One row per UTC day and kind, in USD, plus lifetime and month totals. Without dates it returns the last 30 days; a range is at most 90 days. **Referral data** ```bash curl -s https://provider-api.lium.io/miners/provider-referral/summary -H "Authorization: Bearer $LIUM_API_KEY" ``` Your referral code, rate, accrued, paid or pending and balance in USD, and the providers you referred. Linking a code and withdrawing stay in the portal. ## Name a node A key with the `node` scope can set your own label for a node, up to 64 characters. An empty label removes it: ```bash curl -s -X PUT https://provider-api.lium.io/executors//label \ -H "Authorization: Bearer $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"label": "rack 2, box 7"}' ``` Your node reads return it as `label`. Only you see it. ## Set the notes renters see A key with the `node` scope can set the notes renters see on a node. Send the full set each time, from `may_reboot`, `maintenance_announced`, `home_network` and `data_survives_reboot`. An empty list removes them: ```bash curl -s -X PUT https://provider-api.lium.io/executors//notes \ -H "Authorization: Bearer $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"notes": ["may_reboot"]}' ``` Your node reads return them as `notes`. ## Move a node to a new address A key with the `node` scope can change a node's address, the portal's **Edit Address**, for example to fail over to a standby machine: ```bash curl -s -X POST https://provider-api.lium.io/executors//update-address \ -H "Authorization: Bearer $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"ip_address": "", "port": }' ``` If one of your nodes that is not rented holds the address, add `"swap_with_own_node": true`: the two nodes trade addresses in one step. The same rules apply as in the portal. See [Moving a rented node to a standby machine](./managing-nodes.md#moving-a-rented-node-to-a-standby-machine). ## Recheck a node A key with the `node` scope can ask the validator to check a node now, for example after a reboot: send `POST /executors//recheck` with the key as above and no body. A node that has not passed a validator check yet answers `409`. `202` means it is queued. Once per node every 15 minutes and 10 an hour per account; beyond that `429` with `Retry-After`. ## Set a node's price A key with the `price` scope can change a node's price per GPU-hour, so a pricing tool can manage it for you: ```bash curl -s -X POST https://provider-api.lium.io/executors//update-price \ -H "Authorization: Bearer $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"price_per_gpu": 1.85}' ``` The same price limits and notice rules apply as in the portal. Add `?dry_run=true` to run every check without changing the price. On a rented node, add `"apply_after_current_rental": true` (the portal's **Apply after the current rental ends**): the rentals running now keep their price until they end, also for every later change, and the listing takes the new price at once with no raise limit or notice. A key can change prices up to 60 times a minute, enough to reprice 900 nodes every 15 minutes. Beyond that it gets `429` with a `Retry-After` header (seconds until the next minute). The read endpoints above are fine to poll every few minutes. A price of 0 or less is refused with `422` "Incorrect price". Any other refused price change returns `400` with a `detail.code` you can branch on: | `detail.code` | Meaning | |---|---| | `price_below_min`, `price_above_max` | Outside the allowed range for this GPU; `min_price_per_gpu` and `max_price_per_gpu` give it. The minimum applies to Secure nodes only. | | `price_raise_limit_reached` | The node is rented and already had its raise for this period; `next_raise_at` says when the next one is allowed. | | `price_raise_above_cap` | The node is rented and the raise is too large; `max_price_per_gpu` is the highest price allowed now. | | `node_not_found` (404) | No node with this id on your account. | The `price` scope can also pause and resume a node's new rentals (`POST` and `DELETE /executors//new-rentals/pause`). It opens nothing else: no node changes, payouts or account settings. --- # Team Let teammates work on your provider account. Each member uses their own provider account, with the invited e-mail address confirmed on it. ## Invite a member 1. **Open** [Profile Settings](https://provider.lium.io/settings) and find **Team**. 2. **Enter their e-mail** and click **Invite**. The link in the e-mail works for 7 days. ## Accept an invitation 1. **Sign in** at [provider.lium.io](https://provider.lium.io) the way you usually do: with e-mail or Google, with your hotkey, or with hotkey and password. No account yet? Sign up with the invited e-mail address. 2. **Confirm the invited address**: an e-mail account confirms it at sign-up. A hotkey account sets it under **Set Email** in [Profile Settings](https://provider.lium.io/settings) and clicks the link in the confirmation e-mail. 3. **Open the invitation link** and click **Accept invitation**. ## Switch between accounts 1. **Open a team account**: in your own Profile Settings, under **Team**, click **Open** next to it. Each later sign-in on that browser lands you in it. 2. **Return to your own**: in the team account's Profile Settings, under **Team**, click **Return to my own account**. This signs you out, and your next sign-in lands in your own account. ## What members can do Members see and manage the account's nodes and earnings, and see its payout settings. Only the owner changes sign-in details, the account e-mail, API tokens, the notification webhook, payout settings and the team. API tokens are not listed in a member's view; adding a member does not change them, and the owner's tokens keep working. ## Remove a member Click **Remove** next to them under **Team**. They lose access at once. --- # Grafana Dashboards Lium publishes live market and network data at **[grafana.lium.io](https://grafana.lium.io/dashboards/f/cfh8umv50c9oga/)**. No account is needed. Use it to price your GPUs, to see what is renting, and to debug a node when the [Provider Portal](./portal/overview.md) doesn't go deep enough. ## Access - **Direct:** open [grafana.lium.io](https://grafana.lium.io/dashboards/f/cfh8umv50c9oga/). Every dashboard below is public and read-only. - **Embedded:** each node's detail page in the [Provider Portal](./portal/monitoring.md) has a **Grafana** tab with the panels for that one node. Prices and earnings are in USD per GPU per hour. Node ids are shown as their first 8 characters. Pages about your own nodes take your provider ID (the hotkey the portal shows as **Miner Hotkey** on each node page) or a node ID in a text box at the top. ## Dashboards | Dashboard | What it answers | |---|---| | [**Price your GPUs**](https://grafana.lium.io/d/provider-pricing-v1) | What should I list my GPUs at? For each GPU type: what every node lists at, which are rented or idle, price percentiles, and how much of the time nodes at each price are rented and what they earn. | | [**Marketplace prices**](https://grafana.lium.io/d/marketplace-prices-v1) | What do renters actually pay? Rented-at prices per GPU type, asking vs paid price, and how long nodes sit unrented before a rental at each price. | | [**Lium network status**](https://grafana.lium.io/d/bejrh6ldw5lhcc) | How busy is the network? GPUs listed, rented and free by type, utilization, renter spend per hour, and penalties. | | [**GPU demand analytics**](https://grafana.lium.io/d/gpu-demand-analytics-v1) | Which GPU types are in demand? Listed, rented and available GPUs per type over time. | | [**Node check logs**](https://grafana.lium.io/d/aejriu31349hcb) | Why is my node not passing checks? The result of each check Lium runs on your nodes. | | [**Penalty events**](https://grafana.lium.io/d/b7b972f3-a083-415f-886d-ae5b12e2371b) | Was a penalty applied to my node, why, and was it reverted? | ## Price your GPUs Pick a GPU type at the top, or leave it on **All**. Pick a **Tier** (Spot or Secure) to compare one tier's prices; **Price your GPUs** and **Marketplace prices** both have it. - **Nodes listed now**, **GPUs rented now**, **Median asking now** and **Median earned per GPU-hour, 7 days**: the market for that type at a glance. - **Market now**: per GPU type, asking prices at p10, p25, median, p75 and p90, plus the median asking price of the nodes rented now and of the nodes idle now. If rented nodes sit well below idle ones, the market is price-sensitive. - **Utilization and earnings, last 7 days**: per GPU type, the p25 to p90 of how much of the time nodes were rented, and of what they earned per listed GPU-hour. - **Every listed node now**: each node's asking price, whether it is rented now, how it ranks on price within its type (0% = the cheapest), its rented share and its earnings over 7 days. - **Time rented by asking price**: nodes grouped by how their price compares with the median for their type, against the share of time they were rented. - **Median asking price and GPUs rented, 30 days**: the daily trend for the type. **Earned per GPU-hour** is an estimate of rental earnings only: your 95% share of the asking price, times the share of the hours the node was rented. Idle pay is not included. A node counts once it has been listed for at least 24 of the last 168 hours. Groups of fewer than 3 nodes are hidden. To set a price, find your GPU type in **Market now**, compare the median of rented nodes with the median of idle nodes, and check **Time rented by asking price** to see how much time nodes priced like yours spend rented. ## Node check logs Paste your provider ID or a node ID at the top; the panels stay empty until you do. - **Node check logs**: every check, with GPU count, GPU model, status, message and uptime. - **Failed checks on nodes with GPUs**: the node answered but a check failed, for example a job error or a missing runtime. - **Nodes not reachable or no GPUs found**: the node couldn't be read at all, for example unreachable, an auth failure, or no GPU detected. If a node earns nothing, look here first. The second panel means the node is up but failing checks. The third means it can't be reached. ## Penalty events Paste your provider ID or a node ID at the top; **Show reverted** includes penalties that were later undone. One row per penalty that withheld $1 or more. For what a penalty withholds and how to dispute one, see [Penalties](./rewards/penalties.mdx). | Column | Meaning | |---|---| | `event_time` | When the penalty was applied | | `node` | First 8 characters of the node ID | | `reason_code` | Why | | `dry_run` | `true` = recorded but not enforced | | `amount_withheld` | USD withheld for this event | | `failure_type` | The linked deploy or undeploy failure from the 24 h before, if any | | `reverted_at` | When it was undone, if it was | | `comment` | Comment and the extracted error message | ## Common questions | Question | Open | |---|---| | "What should I price my H100s at?" | **Price your GPUs**: pick the type, read **Market now** | | "Am I priced too high to get rented?" | **Price your GPUs**: find your node in **Every listed node now** | | "Which GPU type should I add?" | **Price your GPUs** (earnings per GPU-hour) and **GPU demand analytics** | | "Why is my node not earning?" | **Node check logs**: paste your provider ID | | "Was money withheld from me?" | **Penalty events**: paste your provider ID | --- # Troubleshooting Start here when a node is online but not listed or not earning. 1. Read the node's red **last error** panel in the [Provider Portal](./portal/monitoring.md#the-last-error-panel). 2. Look up its reason code in the [reason code table](#reason-code-table). 3. Apply the fix and wait one check (about 15 minutes). There is no button to re-run a check. ## A newly-added node stuck in `VALIDATION_PENDING` {#a-newly-added-node-stuck-in-validation_pending} A new node shows **VALIDATION PENDING** until a validator checks it: usually about 5 minutes, and nine in ten nodes within about 40 minutes. That is normal. **If it stays there longer** - Check that **Central Miner Server** is ON in [Profile Settings](https://provider.lium.io/settings) (see [Quickstart → Step 2](./quickstart.md#step-2--sign-in-to-the-provider-portal)), or that your [self-hosted provider](./self-hosted-provider.md) is running. - Without either, no validator checks the node, and after 30 minutes it shows **NOT DETECTED**. - Past an hour with the switch ON, read the [Job Logs](#1-pull-error-details-from-grafana-job-logs). ## 1. Pull error details from Grafana Job Logs {#1-pull-error-details-from-grafana-job-logs} The [Job Logs](https://grafana.lium.io/d/aejriu31349hcb/job-logs) dashboard shows every validator check of your node with its exact error. **Open it for your node** 1. Open [grafana.lium.io → Job Logs](https://grafana.lium.io/d/aejriu31349hcb/job-logs). 2. Set **`miner_hotkey`** to your hotkey and **`executor_id`** to the node's ID (from its portal page). 3. Widen the time range if the node has been silent. The node's **Grafana** tab in the portal opens the same view ([Monitoring → Grafana Integration](./portal/monitoring.md#2-grafana-integration)). **Read the three panels** | Panel | Rows mean | |---|---| | **Job Logs** | Every check, with score and uptime. Non-zero scores: the node is fine. | | **Job Error Logs (Score = 0 AND GPU > 0)** | The node is reachable but a check fails. Read the error. | | **Machine scrape Error Logs (Score = 0 AND GPU = 0)** | The validator cannot reach the node. Fix network, firewall or SSH first. | ## 2. Run the verifyx benchmark to reproduce validator checks {#2-run-the-verifyx-benchmark-to-reproduce-validator-checks} Run the validator's network, storage and memory checks on the node host. It runs 10 times and prints one line per run. Each run downloads about 830 MB and uploads for 10–20 seconds, so the time depends on your link. **Network only (about 4 minutes at 1 Gbps, about 15 minutes at the 100 Mbps minimum)** ```bash docker run -t --gpus all --rm daturaai/verifyx-test:latest ``` **Network, storage and memory (the network time above plus a few minutes)** ```bash docker run -t --gpus all --rm daturaai/verifyx-test:latest python3 benchmark.py --full ``` **Minimums** - Download: **100 Mbps** (averaged over checks). - Upload: **10 Mbps** (averaged over checks). - Free disk: **100 GB**. - RAM: **8 GB**. ## 3. Common issues {#3-common-issues} | Symptom | Fix | |---|---| | `VERIFYX_FAILED_NETWORK_SPEED_TOO_SLOW` | Download under 100 Mbps, or upload under 10 Mbps. Re-run the benchmark; if it stays slow, ask your host for a faster uplink. A first check on a new node can fail once and pass the next. | | Storage test fails | Free disk to 100 GB or more. See [Docker storage](./nodes/docker-storage.md). | | Memory test fails | Free RAM, or add RAM. | | `--gpus all` not recognized | Install the NVIDIA Container Toolkit ([Node setup guide](./nodes/quickstart.md)). | | `docker logs executor-watchtower-1` says `Update held: the NVIDIA runtime cannot start a GPU container on this host` | The driver was updated without a reboot. **Pause New Rentals**, wait for the rental to end, reboot, then `docker compose up -d`. | | Renters see no pod logs; `docker logs executor-executor-1` says `Signed timestamp is …s behind the executor clock` | The node clock is off by more than 5 minutes. Run `timedatectl set-ntp true`. | | A rent fails with `the miner no longer lists this executor` | The node was added again under a new ID. Nothing to fix if you re-added it; otherwise check it is still in your node list. | | Job Logs panel 3 shows SSH or auth errors | Check the firewall, the node's public port and its SSH service. | | Job Logs mention `sysbox-runc` | [Install Sysbox](./nodes/sysbox.md). | | Job Logs mention `Advertised CPU cores exceed the host's physical cores` | Advertise the real core count. See [§5](#5-check-your-nodes-cpu-count). | | Job Logs mention `gpu requires reset`, `unknown device`, `nvml error` or a driver/library version mismatch | The node is quarantined. Check the driver with `nvidia-smi --query-gpu=name,driver_version --format=csv`. See [§4](#4-quarantine-your-node-was-pulled-off-the-market). | | Job Logs mention `CC_VBIOS_BELOW_MINIMUM` (score 0) | **Pause New Rentals** and wait for running ones to end, since the update restarts the host. Then update every GPU's VBIOS to at least NVIDIA's minimum for CC in R595 (B200 version 97.00.E4.00.xx, B300 version 97.10.64.00.xx). | | Job Logs mention `cannot_apply_gpu_power_cap` | The node earns no idle pay. See [GPU power cap](./nodes/gpu-power-cap.md). | | The portal does not show the node under your hotkey, or its status stops changing | Another miner hotkey already holds that executor ID or IP and port. List each node under one hotkey; if the node is yours, contact support. | | Job Logs mention `Executor image is outdated` | Once the validator release with this rule deploys, a free node on an old image scores 0 and is off the rent list until it updates; a rented node keeps its rental and score. Update the node: [The standard stack, which stopped updating](./nodes/gpu-power-cap.md#the-standard-stack-which-stopped-updating). | ### Leftover rental pods {#leftover-rental-pods} Lium removes the containers of its ended rentals itself. Do not stop or remove `pod_*` or `filler_*` containers yourself: one mistake deletes a live rental. **What Lium removes** - The validator removes only containers Lium started: one labelled `io.lium.pod_id`, a `pod_` or `filler_` whose rental has ended, or Lium's own `health_check_`, once it is not part of a live rental, together with its volume. - A container left after a delete while the node was offline goes at a check after the node is back, once the container is at least 15 minutes old (usually within 30 minutes). **Keep your own containers safe** - Do not give your own containers a `pod_`, `filler_` or `health_check_` name, or the `io.lium.pod_id` label. **If a leftover stays** Leave it running. If it is still there after an hour, contact support with the container name. **If you script against the provider API** - Read it signed in (`lium provider portal login`). A read that is not signed in hides every node's IP and port. - Match nodes by node ID, never by IP. ## 4. Quarantine: your node was pulled off the market {#4-quarantine-your-node-was-pulled-off-the-market} A quarantined node takes no new rentals until it passes a clean check. Fix the cause; the next clean check (about 15 minutes) lists it again. | Verdict | Fix | |---|---| | `GPU_RUNTIME_DEVICE_FAULT` | On a rented node only new rentals stop; the running rental continues. Reboot the host once no rental runs on it, then check `nvidia-smi` and `dmesg`. | | `GPU_RUNTIME_NVML_MISMATCH` | The driver was updated without a reboot. Reboot the host once no rental runs on it, then [hold driver updates](#hold-driver-updates). | | `REGISTRY_DNS_UNRESOLVABLE` | Fix the host's DNS (`/etc/resolv.conf`), or remove a registry mirror that does not answer. | | `GPU_RUNTIME_MISSING_RENTED_GPU` | On a rented node only new rentals stop; the running rental continues. If the message ends `visible: []`, the executor container lost sight of the GPUs (a GPU reset or driver reload while it ran): once no rental runs on it, run `docker restart executor-executor-1`, or reboot the host. Otherwise the node lists again on its own once a clean check sees its cards, also while a rental runs on it: a card that came back, or new cards (for example a VM came back on other GPUs), or as soon as the rented pod is moved onto them. | | `RENTED_GPU_DROP` | A GPU dropped out during a rental. The running rental continues; new rentals stay paused after it ends, until the next full check sees every GPU. Check `nvidia-smi` and `dmesg \| grep -i xid`; reseat, reset or replace the card once no rental runs on it. | | `CREATION_FAILURE_RUN` | A container failed to start, so new rentals are paused. They resume after the next successful check, or about an hour later on a node with a rental running. If it repeats, check `docker ps`, `docker logs executor-executor-1`, `df -h` and the renting port range. | ### Hold driver updates {#hold-driver-updates} Pin the driver, Docker and containerd packages so the system never updates them on its own: ```bash sudo apt-mark hold $(dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' 'nvidia-*' 'libnvidia-*' \ | awk '$1 == "ii" {print $2}') docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin containerd.io ``` To update them: **Pause New Rentals**, wait until no rental runs, `sudo apt-mark unhold` them, upgrade, hold them again and reboot. ### A driver version marked invalid {#a-driver-version-marked-invalid} A driver version the platform cannot match to an NVIDIA release scores `0`. Install a driver release NVIDIA publishes. ## 5. Check your node's CPU count {#5-check-your-nodes-cpu-count} ```bash docker exec executor-executor-1 lscpu | grep '^CPU(s):' docker exec executor-executor-1 cat /sys/devices/system/cpu/present ``` The second prints a range: `0-127` means 128 CPUs. The advertised count fails only when it is more than 4 above that. ## 6. Validator reason codes {#6-validator-reason-codes} Every verdict has a reason code. It is the title of the red **last error** panel on the node's page ([Monitoring → The last error panel](./portal/monitoring.md#the-last-error-panel)) and the `reason_code` in the Job Logs. For ports, disk, GPU power limit and network speed, the panel names the measured value next to the required one, for example `12.3 GB free, 50 GB required`. ### Before you open a ticket {#before-you-open-a-ticket} 1. Find the code in the [table](#reason-code-table) and apply its fix. 2. For `GPU_VERIFY_FAILED`, match the `stderr` in **Technical details** to [Which `GPU_VERIFY_FAILED` case is yours](#gpu-verify-failed-sub-cases). 3. Wait one check (about 15 minutes). 4. Still failing? Open a ticket through the [support flow](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) with the reason code, the **Technical details** JSON and the output of the commands you ran. ### Reason code table {#reason-code-table} Unless the table says otherwise, the node scores `0` until the cause is fixed. | Reason code | What it means | What to do | |---|---|---| | `GPU_VERIFY_FAILED` | The GPU test did not give the expected result. | Match the `stderr` in [Which case is yours](#gpu-verify-failed-sub-cases). | | `SYSBOX_REQUIRED_MISSING` | Sysbox is missing or its test container failed. | If **Technical details** shows `DIND_INNER_DOCKERD_IPTABLES`, run `sudo modprobe -a ip_tables iptable_nat iptable_filter`. Otherwise [install Sysbox](./nodes/sysbox.md). | | `SYSBOX_RUNTIME_WRAPPER_OUTDATED` / `SYSBOX_RUNTIME_WRAPPER_INSTALL_FAILED` | The Lium Sysbox runtime wrapper on the host is missing or old, or the validator could not install it. A Sysbox start that fails (for example while a GPU is not up yet after a reboot) can leave a pod's files shifted, so its next start has no working `sudo` or `apt`. The wrapper puts them back before each start. The score is not changed. | Run `curl -fsSL https://raw.githubusercontent.com/Datura-ai/lium-io/main/neurons/executor/nvidia_docker_sysbox_setup.sh \| sudo bash -s -- --install-runtime-wrapper`. It reloads Docker and restarts no container. | | `SYSBOX_RUNTIME_WRAPPER_CREATE_REFUSED` | The wrapper found a pod's files shifted by an earlier failed start and could not put them back, so it stopped that start instead of starting the pod with `sudo` and `apt` broken. The score is not changed. | **Technical details** names the error. Most often a file in the pod could not be changed: check the disk (`df -h`, and `dmesg` for I/O errors). The next start tries again. If it keeps failing, [open a ticket](#before-you-open-a-ticket). | | `SYSBOX_RUNTIME_WRAPPER_SHIFTED_BACK` | An earlier failed start had left a pod's files shifted; the wrapper put them back before the pod started. | Nothing. Many on one host mean pod starts keep failing there: read `journalctl -u docker.service` and `journalctl -u sysbox-mgr.service`. | | `SYSBOX_RUNTIME_WRAPPER_UNRESOLVED` | The wrapper could not check a pod's files before its start, so the pod started without the check. | Nothing for a single one. If it repeats, run the install command in the `SYSBOX_RUNTIME_WRAPPER_OUTDATED` row again. | | `DIND_PROBE_UNREACHABLE` | The validator's test container on the node started, but did not answer over SSH within 60 seconds. | Check that Docker is running and healthy, that the node's mapped ports accept connections from outside (no firewall blocking them), and that the host is not overloaded. | | `NVIDIA_TOOLKIT_CDI_MODE` | The NVIDIA container toolkit is in CDI mode, so the validator's test container could not start. | Set `mode = "auto"` under `[nvidia-container-runtime]` in `/etc/nvidia-container-runtime/config.toml`, then run `sudo systemctl restart docker`. The check runs again on the next cycle. | | `EXECUTOR_PID_HOST_MISSING` | The executor container does not run with `pid: host`, so encrypted pod backups and restores cannot run. | Standard stack: the updater installs the signed runner, which recreates the executor with `pid: host`; a pre-18 Sep stack moves onto that updater by itself. If the code stays, run `cd ~/compute-subnet/neurons/executor && git pull && docker compose pull watchtower && docker compose up -d watchtower` once, then wait 5 minutes. Custom stack: add `pid: host` to the executor service in your compose file, then `docker compose up -d --force-recreate executor`. | | `NVIDIA_RUNTIME_MISMATCH` | The driver was updated without a reboot. | Reboot the host or reload the driver. | | `NVIDIA_CONTAINER_HOOK_FAILED` | NVML failed on the host. | Make `nvidia-smi` work (reset the GPU or reboot), then reinstall the NVIDIA Container Toolkit if needed. | | `VERIFYX_FAILED_NETWORK_SPEED_TOO_SLOW` | Download under 100 Mbps, or upload under 10 Mbps. | See [§2](#2-run-the-verifyx-benchmark-to-reproduce-validator-checks). | | `CONTAINER_DOWNLOAD_SLOW` | The node failed the network check from inside a container in two readings in a row on the rentals network. The check reads downloads and an upload from inside the container, as a pod would. It must pass the network check. | Remove any traffic shaping or extra firewall rules you added on Docker traffic, in both directions; keep Docker's own NAT rules. If the uplink MTU (`ip link`) is below 1500, recreate the rentals network with it while no pod container exists, running or stopped: `docker network rm lium-rentals`, then `docker network create -d bridge -o com.docker.network.bridge.enable_icc=false -o com.docker.network.driver.mtu= lium-rentals`. Pods on `lium-rentals` use the new MTU. Where a pod has a network of its own, that network is created from `lium-rentals` and copies its MTU. | | `SCRAPE_FAILED` / `SCRAPE_PARSE_FAILED` / `SCRAPE_FAILED_ON_HOST` | The hardware scan failed on the node. | Read `docker logs executor-executor-1`; update the node and free disk and memory. | | `RENTED_EXECUTOR_NOT_LISTED` | Your provider server left a rented node out of its answer two checks in a row, most often because the node's executor is not answering. It counts like the node being offline. | If the executor is not answering, restarting it may help: `cd ~/compute-subnet/neurons/executor && docker compose restart executor-runner`. Rented pods keep running. Removing or stopping a rented node counts as the node being offline, so the [offline penalty](./rewards/penalties.mdx#a-rental-that-ends-on-an-inactive-node-24-hours) applies. | | `EXECUTOR_RESULT_MISSING` | Your provider server returned no result for a rented node. It counts like the node being offline. | As for `RENTED_EXECUTOR_NOT_LISTED`. | | `EXECUTOR_UNREACHABLE_BY_MINER` | Your provider server could not reach an unrented node to set up its check, or the node answered and refused the validator's key (self-hosted provider servers: not released yet, comes with the next miner release): the message then reads `Miner reached this node, but the node refused the validator's key` and names the node's answer. | Could not reach: make sure the node's executor is running and its port is open. Refused with `Stale upload nonce`: the node's clock is more than 10 minutes off. Run `timedatectl set-ntp true` and check that `timedatectl status` shows the clock synchronized. Answer `HTTP 404`: the request never reached the executor, so the address and port your provider server has for the node point at something else. Compare the IP and port the node is registered with (its row on provider.lium.io, or the `add-executor` command for a self-hosted provider server) with the port `executor-executor-1` publishes (`EXTERNAL_PORT` in the node's `.env`; `docker ps` shows it). `sudo ss -ltnp` lists every published Docker port as `docker-proxy`, whichever container it belongs to, so use `docker ps` to see which container holds the port. Any other refusal: read `docker logs executor-executor-1` for the `/upload_ssh_key` request. | | `NODE_ACCOUNT_MISMATCH` | The node at this hostname is not the one registered under this account. Verification fails. | Point the node's hostname at the machine registered under this account, or register the node again. | | `HOST_PID_MAX_UNUSABLE` | The host's `kernel.pid_max` is missing, not a number, or too low to reserve process IDs for the host and still give a rental a safe process limit, so every rental on the node would be refused. Hidden from new rentals; a running rental continues. | `cat /proc/sys/kernel/pid_max` on the host must print only a number of at least 4608 (the Linux default 32768 is fine). Set it with `sudo sysctl -w kernel.pid_max=4194304` and keep it in `/etc/sysctl.d/`. If the command prints a banner or other text first, remove that output from the login profile for non-interactive SSH commands. | | `RENTAL_NETWORK_UNUSABLE` | The `lium-rentals` Docker network is not a bridge with traffic between containers turned off, so every rental on the node would be refused. Hidden from new rentals; a running rental continues. | While no pod container exists, running or stopped, run `docker network rm lium-rentals`: the validator recreates it at the next rental. Or create it yourself with `docker network create -d bridge -o com.docker.network.bridge.enable_icc=false lium-rentals` (add `-o com.docker.network.driver.mtu=` if the uplink MTU is below 1500, as in the `CONTAINER_DOWNLOAD_SLOW` row). | | `SCRAPE_FAILED_NO_GPU` | The driver listed no GPU. | `nvidia-smi` and `docker exec executor-executor-1 nvidia-smi` must both list every GPU. | | `SCRAPE_FAILED_DRIVER` | The driver returned an error. | Check `nvidia-smi` and `dmesg`; reboot or reinstall the driver (pause rentals first). | | `SCRAPE_TIMEOUT` / `SCRAPE_TRANSPORT_FAILED` | The scan timed out or the connection dropped. | Once is fine. If it repeats, check `nvidia-smi` responds, the SSH port answers from outside, and the disk is not full. | | `INSUFFICIENT_PORTS` | Fewer than 3 renting ports are free and reachable (3 per split on an unrented split node). Not shown while every GPU is rented. Also shown when every pod on the node has stopped and its rental has ended. | [Add ports](./nodes/index.md#add-or-change-ports) and open them in the firewall and NAT. | | `DISK_TOO_FULL` / `DISK_FREE_TOO_LOW` | The node's disk is more than 90% used, or has less than 50 GB free. An idle node fails; a running rental continues. On a partly rented split node under 50 GB free, the free GPUs are not listed and earn no idle pay. | Free disk space on the node. See [Docker storage](./nodes/docker-storage.md). | | `DISK_NOT_REPORTED` | The node did not report its disk. An idle node fails; a running rental continues. | Update the node software. | | `UPLOAD_FAILED` | The validator could not copy its scripts over SSH. | Free disk; check the SSH port answers from outside. | | `GPU_USAGE_HIGH` / `GPU_USAGE_OUTSIDE_TENANT` / `GPU_FOREIGN_PROCESS` / `GPU_VRAM_HELD` | Something other than Lium uses the GPU. A desktop session counts: a terminal, file manager or browser window on the NVIDIA GPU can fail the check. | Stop it until `nvidia-smi` shows no processes. On a desktop install, run the node headless: `sudo systemctl set-default multi-user.target`, then **Pause New Rentals**, wait until no rental runs, and reboot. If the message names a leftover process of a stopped or removed container, reboot the node once no rental runs on it. | | `ORPHANED_RENTAL_CONTAINER` | The validator could not match this container to a live rental on this node. | Leave it running. The message says whether the validator removes it by itself ([Leftover rental pods](#leftover-rental-pods)); otherwise follow Technical details and contact support if it persists. | | `EXECUTOR_TRANSPORT_UNREACHABLE` / `FILLER_TRANSPORT_UNREACHABLE` | The connection dropped mid-check. No verdict. | Nothing if once. If it repeats, check the network and SSH port. | | `EXECUTOR_SSH_UNREACHABLE` | The validator could not open SSH to the node. The node is hidden until a check succeeds. | Check the SSH port answers from outside and no firewall or rate limit refuses it. If inbound SSH passes through a relay, tunnel or NAT, set `EXECUTOR_SSH_SOURCE_PIN=false` and `EXECUTOR_SSH_SOURCE_LIMITS=false` in the executor `.env`, then run `cd ~/compute-subnet/neurons/executor && docker compose up -d --force-recreate` (a plain `docker compose up -d` or `docker restart` keeps the old settings). | | `NVLINK_MISSING` | A full SXM board reports no NVLink between its GPUs. Score 0 until NVLink works. | Start NVIDIA Fabric Manager (`systemctl enable --now nvidia-fabricmanager`, same version as the driver), check `nvidia-smi nvlink -s`, then `docker restart executor-executor-1`. H100 modules on SXM-to-PCIe adapter boards are listed as H100 PCIe and never get this. | | `NVLINK_FAULT` | The GPUs report an NVLink error, or the GPUs of a full NVLink board cannot join NVLink multicast, so multi-GPU jobs fail. Score 0 until NVLink works again. | Check `dmesg` for Xid lines, `nvidia-smi nvlink -e`, and that `nvidia-smi -q` shows Fabric State Completed on every GPU. Stop the workloads, restart `nvidia-fabricmanager` (same version as the driver) or reboot, then `docker restart executor-executor-1`. If it comes back, service the board. | | `VERIFYX_FAILED_*` (other suffixes) | The hardware test failed for a reason other than speed. | Read `docker logs executor-executor-1`, check `dmesg` and `df -h`, restart the container. | | `FILLER_STOPPED_BY_HOST` / `FILLER_CONTAINER_MISSING` / `FILLER_KILLED_AT_CREATE` | Something on the host stopped Lium's Default Job. No idle pay. | Do not stop `filler_*` containers; exclude them from cleanup tools. See [Default Jobs](./portal/default-jobs.md). | | `FILLER_CONTAINER_EXITED` | Lium's Default Job container stopped on its own, for example when Docker could not restart it after a reboot. A warning: no penalty. | Nothing, unless it repeats; then check the host's GPUs and Docker after the reboot. | | `RENTAL_NOT_VERIFIED` | A rented pod's container could not be checked, or a test rental failed. | If the fix text says no renting port answered, open the ports in the firewall and NAT. Otherwise check it runs (`docker ps`). If it is gone, see [Force-closing a pod](./portal/managing-nodes.md#force-closing-a-pod-mark-broken). If the error ends `visible: []`, restart the executor container: `docker restart executor-executor-1`. | | `RENTAL_PROBE_NOT_YET_PROVEN` | No test rental has passed on this node yet, for example a new node, or a node whose listed GPUs changed or whose card could not run the GPU work-proof (the earlier pass is dropped until a test rental passes on the current machine). A node is listed only after the validator rents it once and the rental works; until then it is not listed and scores 0. The test rental runs while the node is idle. If the message says `skipped: NVIDIA driver X is below the network minimum Y`, no test rental runs on this node until its driver is upgraded. | Keep the node idle, with the default rental image for its GPU and driver pulled (see `RECOMMENDED_IMAGE_NOT_CACHED`). For the driver message, upgrade the NVIDIA driver to version Y or later and reboot, then [hold driver updates](#hold-driver-updates). It is listed after the first test rental that passes. | | `RENTAL_PROBE_NOT_RUN_ON_VALIDATOR` | The validator could not run the test rental for a reason on its own side, for example it has no default rental image for this GPU and driver. No score this cycle; the listing stays as it was. | Nothing to do on the node. The test rental runs once the validator can run it. | | `RENTAL_PROBE_FAILED` | A test rental failed: a renter could not use this node. Score 0 and verification is cleared until a test rental passes; the node is tested again next cycle while it stays idle. | Follow the fix text, which names the step that failed. Container did not start: check that Docker and the NVIDIA container runtime start a GPU container by hand, that the default rental image is present and that the executor's port range is free. sshd did not answer: check that sshd starts in the container (`docker logs `), the host firewall and Docker port publishing; the container's port 22 must be reachable from the internet on the mapped port. Login refused: check that the container's `/root/.ssh/authorized_keys` is written and sshd allows public-key login as root. GPUs not usable: `docker run --gpus all sh -c 'nvidia-smi -L; ls /dev/nvidia*'` must list every GPU the node advertises, and each GPU must also open as a CUDA device of the model the node lists, with its full memory: in the default rental image, `python3 -c 'import torch; n = torch.cuda.device_count(); print(n); [print(torch.cuda.get_device_name(i), torch.cuda.get_device_properties(i).total_memory) for i in range(n)]'` must show every listed GPU by its model. The fix text says how many listed GPUs were confirmed. A test rental with no internet shows as `NO_OUTBOUND_INTERNET` instead. | | `RENTAL_PROBE_PROOF_UNREADABLE` | The validator could not read this node's test rental record. No score this cycle; the listing stays as the last cycle that could read the record left it. | Nothing to do on the node; the record is read again next cycle. | | `RENTAL_PROBE_SKIPPED_UNLISTED_POD` | The test rental was skipped because a pod on the node is not a listed rental. This cycle fails. | Nothing, if a rental on this node just ended; the next cycle tests the node again. | | `RENTAL_PROBE_CYCLE_WITHOUT_VERIFYX` | This cycle could not pass: VerifyX did not run, because an earlier failed test rental still stood. Score 0 for this cycle. | Nothing; VerifyX runs next cycle. | | `RENTAL_PROBE_CYCLE_WITHOUT_ALLCARDS` | This cycle could not pass: the all-cards GPU work proof did not run, because an earlier failed test rental still stood. Score 0 for this cycle. | Nothing; every card proves itself next cycle. | | `POD_NOT_RUNNING` | A rented pod is not running. A rental that ends while the node is inactive is penalised. | `docker start `. | | `PROVIDER_BANNED` / `GPU_BANNED` | Hotkey, coldkey or GPU is banned. Running rentals finish. | See [Provider ban](./rewards/penalties.mdx#provider-ban). | | `EXECUTOR_IMAGE_OUTDATED` | The node runs an old image. Once the validator release with this rule deploys, a free node scores 0 and is off the rent list until it runs the current release; a rented node keeps its rental, score and idle pay. Until that release deploys it is a warning. | `cd ~/compute-subnet/neurons/executor && git pull && docker compose pull watchtower && docker compose up -d watchtower`. See [Move the node onto the updater](./nodes/gpu-power-cap.md#move-the-node-onto-the-updater-once). | | `GPU_MISSING` | A GPU this node listed is not visible. Verification resets and the node scores 0 until every listed GPU is back. | Check `nvidia-smi -L` and `dmesg` on the host; reseat or replace the card. | | `SPEC_FLOOR_REJECTED` | The reported specs are below the minimum. An idle node fails; under a rental the score is 0. | Report the machine's real specs: at least one CPU core, 4 GB of RAM per GPU, one card per counted GPU, and each card's own GPU UUID. | | `DOCKER_CPU_MISMATCH` | Docker sees fewer CPUs than the machine has, so rentals on the node fail. An idle node fails; a rented node gets a warning. | Remove the CPU limit on the Docker service (for example a `CPUQuota` or `AllowedCPUs` drop-in), run `sudo systemctl daemon-reload && sudo systemctl restart docker`, then check that `docker info --format '{{.NCPU}}'` matches `nproc`. | | `NO_OUTBOUND_INTERNET` | Containers on the node cannot reach the internet. Score 0 until a check passes. | Check the Docker bridge, the `FORWARD` chain and DNS: `docker run --rm alpine wget -qO- https://example.com` must succeed on the host. | | `EXECUTOR_IMAGE_UNOFFICIAL` | The node does not run an official executor build. An idle node fails; a rented node scores 0. | Run the official image: `cd ~/compute-subnet/neurons/executor && git pull && docker compose pull && docker compose up -d`. | | `REBOOT_FAILED_HOST_FAULT` | (Not released yet.) After a pod reboot failed, the host could not start a GPU container. Score 0 and the node is inactive until the host passes again. | Run `docker run --rm --gpus all ubuntu nvidia-smi -L` on the host and fix Docker or the NVIDIA container runtime; check `dmesg` for Xid errors and reboot if a GPU is lost. | | `GPU_VERIFY_TIMEOUT` | The GPU test did not finish in time. | Check `nvidia-smi` for stuck processes; reboot if a GPU is wedged. | | `GPU_IDENTITY_MISMATCH` | (Not released yet.) A GPU UUID now points at a different card than before, or a card that passed NVIDIA attestation now fails it. | Keep each card under its own UUID and remove anything that intercepts `nvidia-smi` or NVML on the host or in the executor container. If a card stopped attesting, turn Confidential Computing back on. | | `GPU_UUID_SWAPPED` | (Not released yet.) The same cards are reported under new UUIDs. | Report each card under its real UUID. Re-registering the node does not clear this. If you replaced every card, [open a ticket](#before-you-open-a-ticket). | | `GPU_IDENTITY_INCONSISTENT` | (Not released yet.) A GPU UUID changed its model, memory or serial, or the node lists more than one GPU model. | Each UUID must keep its model, memory and serial, and a node lists one GPU model. Fix the driver (reboot after an update) and remove any NVML override. | | `HARDWARE_IDENTITY_SPOOFED` | The node's hardware did not match what the host reports. A running rental continues. | Remove anything on the host or in the executor container that changes how the hardware or GPUs are reported. After a real motherboard replacement the next check clears it. | | `PINNED_MEMORY_PROBE_FAILED` | A GPU could not copy pinned host memory to the card and back. | Check `dmesg` for Xid errors and the IOMMU settings. On a TDX VM, set the GPU mode as in [CVM setup](./nodes/cvm.md#4-enable-gpu-confidential-computing-mode): CC mode for single GPUs, Protected PCIe for a whole 8× H100 / H200 board. | | `GPU_FAULT_PROBE_FAILED` | A GPU returned a CUDA error, wrong data or hung during a short memory test, or reported new uncorrected ECC errors or remapped rows. Also shown when the test could not run or finish on an idle node 5 checks in a row (the error says "no verdict"). Score 0. | Check `nvidia-smi -q -d ECC,ROW_REMAPPER` and `dmesg` for Xid lines. Stop the processes on that card, then reset only it (`nvidia-smi -r -i `) and wait one check, or reseat or replace it. If the error says "no verdict", the GPUs were not tested: check `nvidia-smi` and that `libcuda.so.1` is installed, and repair the NVIDIA driver install first. | | `RECOMMENDED_IMAGE_NOT_CACHED` | The default rental image is not on the host. | `docker pull ` (name in **Technical details**). | | `GPU_VERIFY_VRAM_UNAVAILABLE` | Another process held GPU memory. | See [Out of memory](#gpu-verify-failed-vram). | | `GPU_VERIFY_SKIPPED_RENTED` | A Lium pod or Default Job had the GPU. Score unchanged. | Nothing. | | `RENTED_POD_RESOURCES_REDUCED` | A rented pod was pinned or throttled below 95 % of its advertised CPUs (`docker update --cpuset-cpus`, `--cpus` or `--cpu-quota`). Score 0 until the pod has at least 95 % of its CPUs again. | Remove the script that changes rented containers; leave their CPU settings as Lium deployed them. | | `RENTED_THROUGHPUT_SLOW` | A rented node failed two network or disk readings in a row: its download speed from inside the pod, and its upload speed, fails the idle-node test, or disk writes under the Docker root run below 50 MB/s while the link and disk are not busy. The node scores 0 until that side passes a reading; the rental keeps running. The portal status names the failed side and the values, for example "network too slow (PyPI 1.5 Mbps measured, 10 Mbps required)" or "disk too slow (disk write 30.2 MB/s measured, 50 MB/s required)". | Network: remove any traffic shaping or bandwidth limit on rented nodes, upload as well as download, and check the uplink and the Docker bridge MTU. Disk: keep the Docker root on a disk that is not saturated or failing. | | `RENTED_THROUGHPUT_NOT_RUN` | The throughput reading was due on a rented node but the earlier checks left too little cycle time, three cycles in a row. Nothing was measured. The node scores 0 until a reading completes; the rental keeps running. | Make sure the node answers SSH and Docker commands promptly (load, a slow or full disk under the Docker root, a slow uplink). | | `GPU_VERIFY_CUDA_NOT_READY` | CUDA cannot start; on HGX boards the fabric is not ready. | See [CUDA cannot start](#gpu-verify-failed-cuda-not-ready). | | `GPU_VERIFY_NO_CUDA_DEVICE` | The node container cannot see the GPUs. | See [No CUDA device in the container](#gpu-verify-failed-container-gpu-access). | | `GPU_MODEL_MISMATCH` | The GPU is not the model the node reports. Score 0, hidden from new rentals; a running rental is kept. | Report the model the card really is; a node is paid for the card it has. | | `GPU_MODEL_NOT_MEASURED` | The GPU check returned no numbers for the card. Score 0, hidden from new rentals; a running rental is kept. | Run the current executor image with its default environment; the next measured check clears it. | | `GPU_UUID_CHANGED` | A GPU was added or swapped since the first check. A GPU that is only missing is `GPU_MISSING`. | If you replaced every GPU with the same model and number, keep the node: it is verified again with the new set. Otherwise bring back the original set, or delete and re-register the node. See [One node, one fixed set of GPUs](./nodes/index.md#one-node-one-fixed-set-of-gpus). | | `SPEC_CHANGED` | The GPU model reported for the node changed. If the node's GPUs change to a different model, the node stays unverified; renamed cards of the same model are unaffected. | Same cards under a new name: nothing to do; the node scores 0 for that check and is verified as it is now on the next one. A change back resets it again. Other GPUs of another model: Restore this node's original GPUs or point it back to its original machine. To register another machine at the same IP and port, first free that address by updating the existing node's address or deleting the existing node. A rented node cannot be deleted. See [One node, one fixed set of GPUs](./nodes/index.md#one-node-one-fixed-set-of-gpus). | | `GPU_POWER_LIMIT_BELOW_DEFAULT` | A GPU's power limit is under 80 % of its default. During a rental, it also fails if lowered under 90 % and under the limit the rental started on (a node rented at 80 % can stay at 80 %). | `nvidia-smi -pl `. See [GPU power cap](./nodes/gpu-power-cap.md). | | `GPU_DETAILS_MISMATCH` / `GPU_COUNT_ZERO` / `GPU_VRAM_MISMATCH` / `GPU_COUNT_EXCEEDS_MAX` / `GPU_MODEL_UNSUPPORTED` | The GPUs reported do not match or are not [supported](./architecture.md#supported-gpus). | Register the GPU type and count `nvidia-smi -L` shows. | | `GPU_KERNEL_COUNT_MISMATCH` | The node reports more GPUs than the NVIDIA driver lists. | Report only this host's GPUs; `ls /proc/driver/nvidia/gpus` must show every card. | | `KERNEL_GPU_VIEW_OVERLAID` | The NVIDIA driver's GPU list on the host could not be trusted. Score 0 until it can. Also when something is mounted over the kernel's GPU list; score 0 while the mount is in place. | Leave the host's GPU devices and driver files as the NVIDIA driver installs them. Remove any mount over `/proc/driver/nvidia/gpus` on the host. | | `GPU_MODEL_MIXED` | The node has more than one GPU model. Not listed. | One GPU model per node. | | `NVML_DIGEST_MISMATCH` / `NVML_DRIVER_UNKNOWN` | Unknown driver build. | See [A driver version marked invalid](#a-driver-version-marked-invalid). | | `GPU_LOST` | A GPU dropped out of the node's GPU list, or a rented node came back with a whole new set of GPUs (as after a VM host restart) and its pod is not yet restarted on them; that restart happens on its own. Hidden from new rentals; a running rental continues. A dropped GPU clears on a check that sees every GPU while the node is not rented and then passes a load test on every card (a rented node whose GPUs are all back shows *Waiting for re-test after the GPUs came back* until then: nothing to do); new GPUs are checked once the pod is restarted on them or the rental ends. | `nvidia-smi` must list every GPU without `Unknown Error`; check `dmesg` for Xid errors. Reseat, reset or replace the card. Pass the same GPUs through on every restart (`nvidia-smi -L` matches before and after). If the node came back with new GPUs, see [One node, one fixed set of GPUs](./nodes/index.md#one-node-one-fixed-set-of-gpus). | | `GPU_LOST_POD_UNREAD` | Right after a rented node's GPUs changed, the validator could not read a pod's container, usually because the pod is being recreated on the new GPUs. Not a lost GPU: that check scores 0, the node is checked again within minutes, and it does not count against reliability. | Nothing, usually. If it repeats, run `docker inspect --format '{{.State.Status}} {{.State.Error}}'` on the host for the pods the report lists. It prints only the container's state, not the renter's settings or environment. | | `GPU_KERNEL_UNATTACHABLE` | A reported GPU cannot be attached to a container. Hidden from new rentals; a running rental continues. | Restart the executor container first. If the node still shows this reason after the next check, reboot the host only when no rental is running on the node. | | `GPU_MEMORY_HEALTH_FAILED` | Broken GPU memory: uncorrected ECC errors or a pending or failed row remap. Also shown when the NVIDIA driver keeps asking for a recovery action (a host reboot or a GPU reset) on a card for several checks in a row; cards without ECC, such as the RTX 5090, can get this one, and the message names the action. Hidden from new rentals; a running rental continues. | Check `nvidia-smi -q -d ECC,ROW_REMAPPER`. Reset the card (`nvidia-smi -r`) or reboot; if errors return, replace the card. Recovery action: when no process uses the card and the action is `GPU_RESET`, reset only that card with `nvidia-smi -r -i `. Reboot the host only for `NODE_REBOOT` or when no rental runs on the node, since a reboot stops every pod on it. If the driver asks again after the recovery action, check `dmesg` for Xid lines on that card: it may need replacing. | | `GPU_THERMAL_COLLAPSE` | A busy GPU ran below half its normal clock because its driver slowed it down: from heat, a power brake from the power supply, or a hardware slowdown the driver does not explain. The message names which. On a rented node this is a warning only. An idle node with that card fails, and stays held from new rentals until the card passes a busy reading at normal speed, is replaced, or 7 days pass. While the node is held, no filler runs on it (Lium's filler and your own Default Job are stopped) and the validator puts a short load on the card itself at each check, so a card whose cooling or power is fixed passes at its next check. A card that still slows down stays held. | Read `Clocks Event Reasons` (`Clocks Throttle Reasons` on older drivers) with `nvidia-smi -q -d PERFORMANCE,TEMPERATURE` to see which. Thermal slowdown: the cooling, fans and thermal pads; on GDDR6X cards the memory can be too hot while the core temperature looks normal. Power brake: the power supply, the GPU power cables and the PDU. HW slowdown alone: check both. Replace the card if it does not recover. Work that needs the node shut down (pads, cables, the card): on a rented node, **Pause New Rentals** and wait for running ones to end first. | | `GPU_RUNTIME_*` / `GPU_WEDGED` | GPU fault. Quarantined. | See [§4](#4-quarantine-your-node-was-pulled-off-the-market). | | `CPU_QUOTA_EXCEEDS_HOST` / `CPU_TRUTH_MISMATCH` | Advertised CPU count is too high. | See [§5](#5-check-your-nodes-cpu-count). | | `PROVIDER_SIDE_LOAD_ABOVE_LIMIT` | A non-Lium workload uses CPU or disk. | Stop it. | | `PORT_VERIFY_FAILED` | A mapped port is unreachable. | Check Docker port mappings and the firewall. | | `EXECUTOR_DUPLICATE` | Another node already lists this node or its GPUs; the first listing keeps them. | Remove the duplicate in the portal. | | `EXECUTOR_GPU_ALIAS` | Two of your nodes under one hotkey reported the same GPU. One keeps the score (a rented one first); the others score 0 for the cycle. | List each machine once. | | `EXECUTOR_DUPLICATE_ACROSS_MINERS` | The same machine scored under more than one miner hotkey in one cycle. One hotkey keeps the score; the others score 0 for the cycle. | Register the machine under one miner only. | | `INSPECTOR_*` | Informational. Score unchanged. | If it repeats, restart the executor container. | | `*_CONFIG_MISSING`, `MISSING_REMOTE_DIR`, `*_POLICY_MISSING` | A validator-side problem. | Nothing. If it lasts more than two checks, contact [support](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support). | ### Which `GPU_VERIFY_FAILED` case is yours {#gpu-verify-failed-sub-cases} Match the `stderr` in **Technical details**: | `stderr` says | Go to | |---|---| | `system not yet initialized` | [CUDA cannot start](#gpu-verify-failed-cuda-not-ready) | | `no CUDA-capable device is detected` or `CUDA driver version is insufficient` | [No CUDA device in the container](#gpu-verify-failed-container-gpu-access) | | `out of memory` | [Out of memory](#gpu-verify-failed-vram) | | anything else | Check `docker run --rm --runtime=sysbox-runc --gpus all daturaai/compute-subnet-executor:latest nvidia-smi` lists every GPU, stop leftover GPU processes, and wait one check. | #### CUDA cannot start: `system not yet initialized` {#gpu-verify-failed-cuda-not-ready} On HGX H100/H200 boards, NVIDIA Fabric Manager must bring up the NVLink fabric before CUDA works. **Check** ```bash nvidia-smi -q | grep -A4 -i fabric # must say State : Completed systemd-detect-virt # "none" on bare metal ``` **Fix** - **Bare metal**: `systemctl enable --now nvidia-fabricmanager`. Its version must match the driver (`nvidia-fabricmanager-`). - **VM without `/dev/nvidia-nvswitch*`**: ask your hosting provider to activate the fabric partition. - **Board without NVSwitch** (NVL or PCIe models): disable Fabric Manager, reinstall the driver and reboot. Then wait one check. Bring the fabric to `Completed` before you add an HGX node. #### No CUDA device in the container {#gpu-verify-failed-container-gpu-access} ```bash docker exec executor-executor-1 nvidia-smi ``` It must list every GPU. - **No GPU listed**: reinstall `nvidia-container-toolkit`, run `nvidia-ctk runtime configure --runtime=docker`, `systemctl restart docker`, then `cd compute-subnet/neurons/executor && docker compose up -d --force-recreate`. - **All GPUs listed, test still fails**: run `modprobe nvidia_uvm` and recreate the container the same way. - **`CUDA driver version is insufficient`**: install a current NVIDIA driver. - **`unknown or invalid runtime name: sysbox-runc`**: [install Sysbox](./nodes/sysbox.md). Then wait one check. #### Out of memory {#gpu-verify-failed-vram} Another process held GPU memory during the test. Run `nvidia-smi` and stop anything that is not a Lium pod or `filler_*` container. If `nvidia-smi` prints `Driver/library version mismatch`, reboot the host (pause rentals first). Then wait one check. ## Next steps - [Grafana Dashboards](./grafana.md): Price your GPUs, Marketplace prices, Lium network status, GPU demand analytics, Node check logs and Penalty events. - [Provider Portal: Monitoring](./portal/monitoring.md): status badges and the last error panel. - [Node Quickstart](./nodes/quickstart.md): set up the host again. --- # Validators Lium runs a single validator, operated by the Lium team. ## Lium team validator | Hotkey | |--------| | `5F7X5UpKSr26KU3jKfpLmT8kuKtBNyHhEnfS8xtxPCqCb13p` | The validator checks every connected node every 15 minutes. Providers: what each verdict means and how to fix it is in [Troubleshooting → Validator reason codes](../providers/troubleshooting.md#6-validator-reason-codes). ## Running your own validator Use the community auditor project: [github.com/Datura-ai/sn51-auditor](https://github.com/Datura-ai/sn51-auditor) --- # Renters Rent GPUs on [lium.io](https://lium.io). Pick a machine, deploy a pod, pay per second with no minimum rental ([when a pod is charged](/pod-users/billing#when-a-pod-is-charged)). These pages follow the dashboard. The API and CLI are in [Developers](/developers). ## Get started **1. Sign up and top up.** [Quickstart](/pod-users/quickstart) **2. Deploy a pod.** [Create a pod](/pod-users/create-pod) **3. Pick an image.** [Templates](/pod-users/templates) **4. Keep your data.** [Volumes](/pod-users/volumes) and [Backups](/pod-users/backups) **5. Know what you pay.** [Billing](/pod-users/billing) ## More - [Your first hour](/pod-users/first-hour) - [Before you rent 8 GPUs](/pod-users/multi-gpu-checks) - [Multi-node clusters](/pod-users/clusters) - [Restores](/pod-users/restores) - [Scheduled termination](/pod-users/scheduled-termination) - [Pod statements](/pod-users/statements) - [Invoices](/pod-users/invoices) - [Discord support](/pod-users/discord-support) - [Refer & Earn](/pod-users/refer-and-earn) - [Broken pods](/pod-users/broken-pods) - [If your pod disappears](/pod-users/pod-disappeared) - [Pod overview & security model](/pod-users/overview) - [Pod security](/pod-users/security) - [API Keys](/pod-users/api-keys): generate keys for the CLI, SDK, or your own AI agent. - [GPU profiling with ncu](/pod-users/gpu-profiling) --- # Quickstart Rent a GPU pod at [lium.io](https://lium.io) and connect to it in about 5 minutes. **Sign up** Create an account at [lium.io/register](https://lium.io/register) with email, GitHub, Google or a [fingerprint](./fingerprint-signup). With email, pick a password of 12 to 72 characters that is not a common one and does not contain your e-mail address, then click the link in the confirmation mail before you log in. **Add funds** Open the account menu (bottom-left) → **Billing** → **TOP UP**. Pay by card, crypto or TAO. To rent, your balance must be above 15 minutes of the pod's hourly price plus 15 minutes of each open pod. Some older accounts need more. **Pick a GPU** Open **Browse Pods**. Filter by GPU type, count, location or NVLink, then click **RENT NOW** on the node you want. ![Browse Pods list with filters](./assets/browse-pods.png) **Create the pod** On the **Create Pod** page: 1. Under **SSH Key**, choose your key, or click **Add an SSH Key** and paste your public key (for example `~/.ssh/id_ed25519.pub`). 2. Turn on Jupyter if you want a notebook. 3. Check the **Total cost** on the right and click **Deploy**. No key yet? Click **Generate a key** on the rent form and keep the private key file it downloads, or run `ssh-keygen -t ed25519`. **Connect** Open **Your Pods** and click your pod. When it shows **RUNNING**, click **Connect**. - **SSH:** copy the command from the **SSH Connection** tab and run it: ```bash ssh -o HostKeyAlias=lium-pod- root@ -p ``` `HostKeyAlias` keeps a separate host key for each pod, so a new pod on the same IP and port connects. - **Jupyter:** on the **Other Options** tab, click **Jupyter Note Book**. **Add another SSH key to a running pod** In the pod's **Connect** window, on the **SSH Connection** tab, click the edit icon next to **SSH KEYS**. Choose saved keys, or click **Add a new SSH Key**, save it and choose it in the list. Then click **Add**. With the API, send the public keys with your [API key](./api-keys): ```bash curl -X POST https://lium.io/api/pods//multiple-ssh-keys \ -H "X-API-Key: $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"user_public_keys": ["ssh-ed25519 AAAA... you@laptop"]}' ``` **Remove an SSH key from a running pod** Send the same body to `remove-ssh-keys`, with each key exactly as the pod lists it. The pod stops accepting it, and a reboot does not add it back: ```bash curl -X POST https://lium.io/api/pods//remove-ssh-keys \ -H "X-API-Key: $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"user_public_keys": ["ssh-ed25519 AAAA... you@laptop"]}' ``` On the website, open the pod and click the trash icon next to the key under **SSH KEYS**. A saved key can't be deleted while a running pod still uses it; remove it from each pod first. The error names the pods. **Delete the pod when you are done** On the pod page, click **Delete** → **Delete pod now**. Billing stops, and everything on the pod is deleted. Keep data you need on a [Volume](./volumes). ## Next steps - [Your first hour](./first-hour): the same steps with the CLI - [Create a pod](./create-pod): every field on the Create Pod page - [Billing](./billing): how pods are charged --- # SSH Keys SSH keys saved on your account are the ones you can put on a pod when you rent it, so you can log in with `ssh`. The rent form on lium.io selects your first saved key; pick the others under **SSH Key** if you need them. The CLI and SDK install the key they are given or configured with, and an agent on the hosted MCP installs every saved key unless it is given a specific one. This page is about SSH keys; for keys that let the CLI, SDK or an agent use your account, see [API Keys](./api-keys). **Add an SSH key to your account** 1. At [lium.io](https://lium.io), open **Access** → **SSH Keys** in the left menu. 2. Click **ADD NEW**. 3. Enter a **Name** and paste your public key into **Key** (for example the contents of `~/.ssh/id_ed25519.pub`). 4. Click **ADD**. No key yet? Run `ssh-keygen -t ed25519` and paste the `.pub` file it makes. **With the CLI** `lium ssh-keys sync` adds every local public key that is not on your account yet. See [`lium ssh-keys`](../developers/cli/reference/ssh-keys). **A running pod** A new key reaches new pods only. To add it to a pod that is already running, follow **Add another SSH key to a running pod** in the [Quickstart](./quickstart). --- # Your first hour From no account to a result on your laptop, using the CLI. The dashboard-only version is the [Quickstart](./quickstart). ## 1. Sign up Create an account at [lium.io/register](https://lium.io/register) with email, GitHub, Google or a [fingerprint](./fingerprint-signup). ## 2. Top up Open the account menu (bottom-left) → **Billing** → **TOP UP**. Pay by card, crypto or TAO. To rent, your balance must be above 15 minutes of the node's hourly price plus 15 minutes of each open pod. Some older accounts need more. ## 3. Install the CLI ```bash curl -fsSL https://lium.io/install.sh | bash exec $SHELL -l lium --version ``` Or with Python: `pip install lium.io`. ## 4. Connect the CLI to your account ```bash lium init ``` This opens the browser; click **Approve**. On a machine without a browser, use `lium init --no-browser`. Check it works with `lium balance`. ## 5. Pick a node ```bash lium ls --gpu RTX4090 ``` Prices are **per GPU** per hour. Multiply by the GPU count. ## 6. Rent ```bash lium up --name first --ttl 2h -y --no-ssh ``` - `` is the node's name or id from `lium ls`. - `--ttl 2h` deletes the pod after 2 hours, so it stops billing even if you forget. - Add `--jupyter` to get a Jupyter notebook. ## 7. Run something on the GPU ```bash lium exec first "python -c 'import torch; print(torch.cuda.is_available())'" lium ssh first ``` The default template has PyTorch with CUDA ready. ## 8. Get a result back ```bash lium scp first /root/out.txt ./ -d ``` ## 9. Stop billing ```bash lium rm first -y ``` Billing stops when the pod is removed. Your charges stay on the pod's [statement](/pod-users/statements). ## Next - [Templates](./templates): other images, or your own - [Scheduled termination](./scheduled-termination): change `--ttl` on a running pod - [API keys](./api-keys): keys for agents and scripts - [AI agents](/developers/agents): the same steps with no human in the loop --- # Signing up without an email Lium can create an account in **one click**, with no email or password. You get a **fingerprint**: a random 32-character string that is your login. It is not biometrics or a passkey; store it like a password. Use it to rent a GPU right away, or when an AI agent or script signs up for you. For password resets, receipts and balance alerts, sign up with an email instead ([Quickstart](./quickstart)). :::danger The fingerprint is shown exactly once Nobody at Lium can look it up or reset it. Lose it and the account is gone, with its balance. ::: ## Sign up **Register** Go to [lium.io/register](https://lium.io/register) and press **Register with fingerprint**. **Save the fingerprint** Copy it into your password manager or use **Download as .txt**. Tick the confirmation box and continue. Top up to rent. ## Script it {#script-it} One unauthenticated POST creates the account: ```bash # an empty body is the whole request; the server names the account curl -fsS -X POST https://lium.io/api/auth/signup \ -H "Content-Type: application/json" \ -d '{}' ``` ```json { "user_id": "ec8c2436-1039-45aa-a508-bcbe865fbcd8", "username": "lium_a1b2c3", "fingerprint": "9lbcaReNipAqVExn7VJXpHMm5IFNZRae", "api_key": "sk_..." } ``` Save `fingerprint` first; it appears nowhere else. Use `api_key` with the API. If it is `null`, sign in and create an [API key](./api-keys). ## Sign in {#sign-in} Go to [lium.io/login](https://lium.io/login), scroll to **or sign in with your fingerprint**, paste it and press **LOGIN WITH FINGERPRINT**. ## What you give up without an email - **Lost fingerprint = lost account.** There is no reset. - **No e-mails:** no receipts or low-balance alerts. Renting, the API and the CLI work the same as with an email account. **Add an email later:** on [Account Settings](https://lium.io/profile), press **Add e-mail**, enter the address and your fingerprint, then open the confirmation link we send. ## Keep it safe - **Store it in a password manager** and keep an offline copy. - **Anyone with it is you** and can spend your balance. - **Never share it.** Lium support will never ask for it ([Official support and scams](/security/official-support-and-scams)). --- # Two-factor authentication Two-factor authentication adds a second step after your password, Google, GitHub or fingerprint sign-in. Use an authenticator app (a 6-digit code), passkeys (Touch ID, Face ID, Windows Hello or a security key), or both. A passkey is a second step only: it never replaces your first sign-in. **Turn it on** 1. In [Account Settings](https://lium.io/profile), under **Two-factor authentication**, click **Configure 2FA**, then **Set up** next to the method. 2. If you signed in more than 10 minutes ago, enter your password or sign in again. If the other method is already on, confirm with it instead. 3. For the app, scan the QR code and enter the 6-digit code it shows. For passkeys, follow your browser. 4. For your first method, if your e-mail address was confirmed from its inbox, we send a confirmation link there. Open it within 1 hour in the same browser, still signed in, and click **Turn on** or **Add a passkey** on that page. 5. For the app, save the recovery codes. They are shown once, and each works once in place of a code. Passkeys have no recovery codes. Turning on the first method signs out every other browser and device. API keys keep working: if someone else may have one, delete it and create a new one under **API keys**. From CLI 0.48.0, `lium workspaces login` can finish the second step in your browser: press Enter at the code prompt, then confirm with a passkey or a code. Confirm only if you just ran the command. On a machine without a browser, add `--no-browser`: open the printed link on any device and confirm only if the page shows the same code as the terminal. See [`lium workspaces login`](/developers/cli/reference/workspaces). **Sign in** After your usual sign-in, your browser asks for a passkey if you have one. To type a code from your app instead, click **Use an authenticator code**. No phone? Click **Use a recovery code**. **Change it or turn it off** Under **Configure 2FA** you can add, rename or remove a passkey, get new recovery codes (the old ones stop working) and turn a method off. Adding a passkey, new recovery codes and turning a method off ask for a code or a passkey. Turning one method off keeps the other. The last passkey goes only by turning passkeys off, which removes every passkey. A password reset does not turn two-factor off. We e-mail you when a method is turned on or off and when a passkey is added or removed, with the time and IP address. If it was not you, contact [support](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) straight away. **Change your e-mail address** A verified e-mail address can be changed only with two-factor authentication on (either method): turn it on first. Your current address also approves every change, so a stolen password cannot move it: 1. In [Account Settings](https://lium.io/profile), next to **Email address**, click **Change e-mail**. 2. Enter the new address and your current password, then a code from your app (or a recovery code) and click **Send links**, or click **Use a passkey**. 3. Open the approval link we send to your current address, then the confirmation link we send to the new one. Each works for one hour. The address changes only then: every signed-in session ends, and we tell your old address about the change. Changing the address needs a password. If you sign in with a fingerprint, set one first with **Forgot password** on the sign-in page. If you get an approval e-mail you did not ask for, do not open the link and change your password: someone else knows it. If you no longer have access to your current address, you cannot approve the change yourself: contact [support](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support) and say which address you want. Support checks that the account is yours before it changes the address. If a code is refused as already used, wait for the next code from your app. **Lost your phone and your recovery codes** Support cannot turn two-factor off for you. Keep your recovery codes somewhere safe. API keys keep working without a code. --- # Renter FAQ Short answers to the most common questions. ## How much does it cost? You pay the provider's hourly price per GPU, times the number of GPUs. Live prices are at [lium.io/pricing](https://lium.io/pricing). See [Billing](./billing.md). ## How is billing done? Per second, from your Lium balance, with no minimum, counted from the moment the pod reaches RUNNING if it runs the node's default image (marked **Fast deploy** in the template list), and otherwise from the deploy request, so starting is included. A pod moved to another node because the first one failed to start is charged from the move. A pod that never starts is not charged. To deploy, your balance must be above 15 minutes of the pod's hourly price plus 15 minutes of each open pod. Some older accounts need more. See [Billing](./billing.md). ## How do I stop paying? Delete the pod. Pods have no Stop, so a pod is billed until you delete it. ## How can I pay? Top up your balance with a card, stablecoins, TAO or alpha. Card top-ups come with an invoice. See [Billing](./billing.md) and [Invoices](./invoices.md). ## How do I keep my data when a pod ends? Put it on a Volume or in a backup. Anything else is gone when the pod is deleted. See [Volumes](./volumes.md) and [Backups](./backups.md). ## Is my data secure? On a non-CVM machine the provider can read your pod, so never put private keys or API keys on it. CVM machines encrypt the pod's memory in hardware, and you can verify the VM's attestation yourself. See [Pod security](./security.md). ## A GPU in my pod hung. What can I do? Reset it: open the pod's menu on **Your Pods** and choose **Reset GPU**. The reset takes 1 to 2 minutes. Every process in the pod stops; your files are kept. ## Which e-mails does Lium send me? Pick them in **Profile → Notification Settings**. **Product News** is on by default; it brings a monthly summary of what is new on Lium and news of big updates. Untick it there, or use the unsubscribe link in any offers or news e-mail, to stop it. Receipts and account notices still arrive. ## How do I get support? Open a private ticket in the `#tickets` channel of the official Lium Discord. See [Discord support](./discord-support.md). --- # Coming from another GPU cloud Run the job you already have on Lium. Every command here is the `lium` CLI. If you have not signed up yet, start with [Your first hour](./first-hour). ## What maps to what | Elsewhere | On Lium | |---|---| | Instance, VM | **Pod**: a container on one node, with SSH. | | Instance type | **Node**: one provider machine. `lium ls --gpu H100` lists them. | | Spot instance | The `spot` tier (may be reclaimed). Each Spot node shows its provider's average Spot uptime. `secure` is dedicated. | | Machine image | **Template**: a Docker image and its settings. See [Templates](./templates). | | Persistent disk | **Volume**: mounted at `/mnt`, survives the pod. See [Volumes](./volumes). | | Stopped instance | No Stop. Delete the pod to end billing. | | Auto-shutdown | `lium up --ttl 6h`. See [Scheduled termination](./scheduled-termination). | | API token | An [API key](./api-keys). | A pod is charged per second, with no minimum, until you remove it. Charging begins once it turns **RUNNING**: on the node's default image (**Fast deploy**) from that moment, so setup is free; on any other image from the deploy request, starting time included. See [When a pod is charged](./billing#when-a-pod-is-charged). ## Steps **1. Start a pod with your environment.** Use the default template and install your requirements: ```bash lium up --gpu H100 --name job --ttl 6h -y --no-ssh lium rsync job ./requirements.txt /workspace/ lium exec job "pip install -r /workspace/requirements.txt" ``` Or use your own image: ```bash lium up --gpu H100 --name job --image /: --ttl 6h -y --no-ssh ``` **2. Move code and data in.** ```bash lium rsync job ./data /workspace/data ``` `/workspace` is the fast local disk and is gone when the pod is removed. `/mnt` is your Volume and survives the pod. Never copy cloud credentials files to a pod. **3. Run the job.** Run it detached, with a log file on the pod: ```bash lium exec job -d --log /workspace/train.log "cd /workspace && python train.py" lium exec job "tail -n 50 /workspace/train.log" ``` **4. Get results out.** ```bash lium scp job /workspace/out/model.pt ./ -d ``` For large results, push from the pod to your own storage or Hugging Face. **5. Check what it cost.** ```bash lium billing history ``` See [Pod statements](./statements) and [Billing](./billing). **6. Remove the pod.** ```bash lium rm job -y lium ps ``` Volumes outlive pods and are billed separately. Remove them with `lium volumes rm` when you are done. ## Next - [Your first hour](./first-hour) - [AI agents](/developers/agents) - [Train a model on a pod](/developers/sdk/examples/training-workflow) - [Clusters](./clusters) --- # Create a pod The **Create Pod** page opens when you click **RENT NOW** on a node in **Browse Pods**. ![Create Pod page top: pod name, machine card, template, SSH key](./assets/create-pod-top.png) :::warning Don't put secrets on a non-CVM pod The GPU provider may have access to the pod. For sensitive work, filter **Browse Pods** for **Confidential Computing** nodes. See [Pod security](./security). ::: ## The fields {#the-fields-top-to-bottom} **Pod Name** A name is filled in for you. Change it to something you will recognize in **Your Pods**. **Template** The Docker image the pod runs. The default is PyTorch with CUDA. To use another image, see [Templates](./templates). **SSH Key** The keys installed on the pod. You need at least one to connect. Click **Add an SSH Key** to paste a new public key. **GPU Count** Shown only on nodes that can be split. CPU, memory and disk are shared out in proportion to the GPUs you take. About 2/3 of your disk is the local volume at `/root`; the rest is the pod disk. **Volume** (optional) Mount a [Volume](./volumes) at `/mnt`. It keeps your data after the pod is deleted. Everything else on the pod, including `/root`, is deleted with the pod. **Back up the pod's volume** On by default: a new pod's local volume is backed up on a regular schedule and kept 2 days, so you can [restore](./restores) it on another node. Untick it to rent without a backup. Automatic backups require a paid deposit or existing backup storage; without one the option is unticked and the pod rents without a backup. See [Backups](./backups#default-backup-for-new-pods). **Initial Port Count** How many ports to open. One is for SSH; use the rest for your own services. **Auto-Termination (Optional)** Pick one, and the pod is deleted when it is reached: - **Hours**: a number of hours. - **End time**: a date and time. - **Spend cap**: a budget in USD, at the node's price per hour. See [Scheduled termination](./scheduled-termination). **Jupyter** Turn it on to get a Jupyter notebook on the pod. For a terminal in the browser, open Jupyter from the pod's **Connect** dialog, then **File → New → Terminal**. The pod page hides the Jupyter login token, because anyone with it can use the pod. Click the eye icon to show it, or the copy icon to copy the full link. **Encrypt local volume** On by default where the template supports it. See [Encrypted local volumes](./encrypted-volumes). **Restore** (optional) Restore files from one of your [backups](./backups) into a new folder, such as `/root/restored`. See [Restores](./restores). ## Deploy Check the summary on the right, including **Total cost**, and click **Deploy**. ![Right-hand summary panel with Deploy button](./assets/create-pod-summary.png) ## After you deploy The pod appears in **Your Pods**. When it shows **RUNNING**, open it and click **Connect** for the SSH command or Jupyter. Some provider nodes block outbound port 25, so sending mail directly on port 25 may fail. Send mail through a mail service on port 587 or 465. - [Back up your data](./backups) - [Schedule termination](./scheduled-termination) - [Get help in Discord](./discord-support.md) ## Cancel a delete {#cancel-a-delete} A pod you deleted shows **DELETING** until its node removes it. While the node has not received the delete, you can take it back: open the pod and click **Cancel delete**. This works when the delete has not been sent yet, or when the node was unreachable for every attempt and has not come back. The pod returns to **RUNNING** with its files and its backup schedule, and billing starts again from the cancel: the time it spent deleting is not charged. If the node may already have the delete, the button says why it cannot be cancelled. The same call is `POST /api/pods//cancel-delete`. ## Bare metal (not released yet) {#bare-metal} Nodes marked **Bare metal** let you have root on the whole host. 1. Rent all GPUs of a node marked **Bare metal**. 2. Open the pod and click **Request bare metal**. 3. The provider adds your pod's SSH key to root on the host and sends you the SSH command in the pod's support channel. When you delete the pod, your access to the host ends. --- # Before you rent 8 GPUs Two things decide whether a multi-GPU node suits your job. Check both in the first two minutes of a rental. 1. **How the GPUs are wired.** Tensor parallelism and FSDP need NVLink. On PCIe they run several times slower, and without peer-to-peer (P2P) NCCL may not start at all. 2. **How fast the node downloads.** The same 756 GB checkpoint took 12 minutes on one 8-GPU node and 75 minutes on another. Jobs with one independent process per GPU (batch inference, sweeps) run fine on any wiring. ## Check the wiring **Run on the pod** ```bash nvidia-smi topo -m nvidia-smi topo -p2p r # OK = P2P reads work, NS = not supported ``` Or from your machine: `lium exec "nvidia-smi topo -m && nvidia-smi topo -p2p r"`. **Read the result** - **`NV#` in every GPU pair** (e.g. `NV18`): NVLink. Good for tensor parallelism. - **`PIX`, `PXB`, `PHB`, `NODE` or `SYS`:** PCIe. Slower. - **`NS` in the P2P matrix:** no peer-to-peer. NCCL won't work with its defaults. **If it's not what you need** Delete the pod and pick another node. ## Check the download speed Use the disk you will download to (`/workspace`, not `/root`): ```bash # a real Hugging Face object, ~550 MB (pip install -U huggingface_hub if `hf` is missing) cd /workspace && time hf download openai-community/gpt2 model.safetensors --local-dir /workspace/probe # a 50 MB CDN object; prints the HTTP code and bytes per second curl -o /dev/null -sS -w 'ingress HTTP %{http_code} %{speed_download} B/s\n' 'https://speed.cloudflare.com/__down?bytes=50000000' ``` At 45 MB/s a 750 GB checkpoint takes 4.6 hours; at 1 GB/s it takes 12.5 minutes. If it doesn't fit your budget, delete the pod now. The **Download** figure in Browse Pods does not predict Hugging Face or S3 speed. ## Filter before you rent In **Browse Pods**, an **NVLink** badge marks a node where every GPU pair is on NVLink. **NVLink 2/6 pairs** means only some pairs are bridged. Hover the badge for the link bandwidth. `GET /executors` shows each node's wiring and filters on `nvlink=true` and `min_download_mbps`. The `lium ls` **Link** column shows the same. See [Interconnect and download speed](/developers/executor-interconnect). --- # GPU profiling with ncu Profile CUDA kernels with [NVIDIA Nsight Compute](https://developer.nvidia.com/nsight-compute) (`ncu`) in a Lium pod. `ncu` needs GPU performance counters, which most machines keep closed, so you need a profiling machine. ## Rent a profiling machine **Find one** In **Browse Pods** on [lium.io](https://lium.io), turn on **GPU Profiling (ncu)**. **Rent it** Rent as usual. You always get the **whole machine**, so the price covers all its GPUs. ## Run ncu **Get the toolkit** Use the **CUDA devel (nvcc, full toolkit)** template, or install the CUDA toolkit for the machine's driver (**Max CUDA driver** in the create-pod summary): ```bash apt-get update && apt-get install -y cuda-toolkit-12-6 ``` **Profile** ```bash ncu --version # sanity check ncu -o profile ./my_kernel_binary # profile a binary, write profile.ncu-rep ncu --set full -o profile python train.py ``` **Open the report** Copy the `.ncu-rep` file to your computer with `scp` or `rsync` and open it in Nsight Compute. --- # GPU clock lock Lock your pod's GPU clocks to a fixed MHz range, for example for repeatable benchmarks. The pod keeps running, and the clocks go back to default when the pod is deleted. ## Lock the clocks **Open it** On the pod page of a running pod, click **Lock GPU clocks**. **Set the range** Enter **Min MHz** and **Max MHz**, tick the GPUs (on a multi-GPU pod), and click **Lock clocks**. The node uses the closest range the GPU supports and shows the applied range. ## Reset the clocks Open **Lock GPU clocks** again and click **Reset to default**. ## Use the CLI or API ```bash lium gpu-clocks my-pod --lock 1400,1800 # all GPUs lium gpu-clocks my-pod --lock 1400,1800 --gpu 0 # GPU 0 only lium gpu-clocks my-pod --reset ``` ```bash curl -X POST https://lium.io/api/pods//gpu-clocks \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"min_mhz": 1400, "max_mhz": 1800}' ``` Send `{"reset": true}` to reset. Add `"gpu_indices": [0]` for some GPUs only (indices as `nvidia-smi` shows them in the pod). The SDK has `Lium.lock_gpu_clocks(pod, min_mhz, max_mhz)` and `Lium.reset_gpu_clocks(pod)`. ## If it fails The error names its reason: - `clock_lock_not_supported`: this machine or GPU cannot lock clocks. - `mig_enabled`: the GPU is in MIG mode. - `operation_in_progress`: another GPU lock or reset is running on the pod. Wait for it. - `gpu_clocks_unavailable`: no answer in time. Check `nvidia-smi` in the pod before trying again. --- # Templates A **template** is what Lium starts in your pod: a Docker image and tag, environment variables, ports, a start command and the volume path. ## Pick a template **On the Templates page:** click **Templates** in the sidebar. **My templates** are yours; **Browse templates** shows everyone's. Pick **Hopper** or **Blackwell** to see only templates that run on that GPU generation. **On Create Pod:** the **Template** card is pre-filled. Click **×** to pick another. ![Templates list page with My templates and Browse templates](./assets/templates-list.png) A **Fast deploy** badge marks the usual image for the chosen GPU, so the pod starts faster. Pulling an image the node doesn't have adds 1–10 minutes. ## Official templates | Template | What is inside | Pick it when | |---|---|---| | **Pytorch (Cuda + DinD)** | PyTorch, Python 3.12, CUDA, Docker-in-Docker, SSH | Training and inference; the default | | **CUDA devel (nvcc, full toolkit)** | `nvcc` and the full CUDA 13.0 toolkit, no PyTorch | Compiling CUDA code or `ncu` profiling | Multi-node rentals use **Multi-node cluster**: see [Clusters](./clusters.md). A pod started from a template (other than a one-time template) runs on its own copy of it, removed with the pod. `source_template_id` on the copy, and `launch_snapshot.source_template_id` in `GET /pods/{id}/record` (still readable after the pod is removed), name the original template. ## Create a custom template {#creating-a-custom-template} **Open the form** Go to **Templates** and click **CREATE A NEW TEMPLATE**. Name it and choose **Private** or **Public**. **Fill in the Configure tab** - **Start from**: one click fills the image, tag and start command for a PyTorch, CUDA devel or Ubuntu base. - **Container Image** (required), e.g. `pytorch/pytorch`, and optionally a **Tag** or **Digest**. - **Docker Credential**: only for a private registry. Add one with **+** and set its **Registry** to the image's registry host (e.g. `ghcr.io`, or `docker.io` for Docker Hub). - **Container Start Command**: must keep the container running, e.g. end it with `sleep infinity`. - **Volume**: leave it at `/root`. Backups and restores use that path. Any other path must be absolute (e.g. `/workspace`) and use only letters, digits, `.`, `_`, `-` and `/`. It cannot be `/mnt`, `/lium-cipher` or a folder under them: `/mnt` is where an attached [Volume](./volumes) mounts and `/lium-cipher` holds the encrypted data, so saving, renting, rebooting or editing a pod with such a path is refused. A public template whose path breaks this rule is taken off the template list. - **Internal Ports**: include `22` for SSH, plus any others (e.g. `8888` for Jupyter). - **Environment Variables**: `KEY=value` pairs. In a **Public** template anyone who rents it can read these values, so keep secrets out of them. While you type, the form checks the image with its registry and shows a hint under a field to fix: a missing image or tag, a missing registry credential, no `linux/amd64` build, or a start command that exits at once. You can still save. **Save** Click **SAVE**. The template is usable on Create Pod at once. Lium does not test-boot it, so deploy a cheap pod first and check that SSH works. ![Create new template form: Configure tab fields](./assets/templates-create.png) ## Edit or delete a template In **My templates**, click **EDIT**. Changes apply to new pods only; running pods keep the old version. Editing a running pod's ports, image, environment or startup command on its own page restarts the pod. Only files in the pod volume (where it was first mounted; the edit dialog names the path, usually `/root`) and attached volumes are kept; running processes and everything else in the container are lost. ## Template status `CREATED` and `UPDATED` mean saved, not tested. Both are ready to deploy. `VERIFY_SUCCESS` means a recorded deployment test passed; no automatic test runs yet, and an edit clears an earlier test. Do not wait for `VERIFY_SUCCESS`. ## Use the API or CLI You need an [API key](./api-keys). ```bash # List all templates (yours + public) curl https://lium.io/api/templates \ -H "X-API-Key: $LIUM_API_KEY" # Create one curl -X POST https://lium.io/api/templates \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My PyTorch Template", "docker_image": "pytorch/pytorch", "docker_image_tag": "2.2.0-cuda12.1-cudnn8-runtime", "volumes": ["/root"], "environment": {"PYTHONUNBUFFERED": "1"}, "internal_ports": [22, 8888], "startup_commands": "bash -c \"pip install -r /root/requirements.txt && sleep infinity\"" }' ``` The CLI does the same with `lium templates list` and `lium templates create`. See the [`lium templates` reference](/developers/cli/reference/templates). --- # Multi-node clusters A cluster is several whole machines on the same RDMA fabric, for one distributed job. If your job fits on one machine, rent a single pod instead. ## Rent a cluster **Find one** On [lium.io](https://lium.io), open **Browse Pods** and switch to the **Clusters** tab. Filter by **GPU type** and **GPU count**. **Read the card** Each card is one fabric: GPU model, GPUs per node, location and price. A badge shows **InfiniBand**, **RoCE** or **EFA** (AWS Elastic Fabric Adapter). Every RoCE and EFA cluster on the tab has been tested between each pair of nodes before it is listed. **Rent it** Pick the machines (at least two) and click rent. The price shown is for the whole order per hour. All nodes have the same GPU model and count. The cluster runs the **Multi-node cluster** template. If you pick another Lium template, the cluster template is used instead. Every node must report a GPU driver that supports the cluster template's CUDA version, or the rental is refused. From the terminal: `lium clusters up --nodes N --name ` ([CLI reference](/developers/cli/reference/clusters)). ## What each node gets Each node is a normal pod with SSH, plus: - **A private network**, `10.42.0.x` (a /24): node N is `10.42.0.`, so node 0 ends in `.1`, node 1 in `.2`, and so on. Use it for setup and SSH, not for heavy data (about 1 Gb/s). - **The RDMA devices** in `/dev/infiniband/`, so NCCL uses the fabric. - **Shared SSH:** `ssh 10.42.0.` from any node logs in to node N. **Check it works** ```bash ip -4 addr show wg0 # 10.42.0./24 on node N (.1 on node 0) ls /dev/infiniband/ # rdma_cm uverbs0 … uverbs7 ssh 10.42.0. hostname # log in to node N as root ``` ## Run a job Run the same command on every node with its own `--node_rank`. Point `--master_addr` at node 0's private address, the first host of `10.42.0.x` (it ends in `.1`). In the commands below, put that address in place of ``: ```bash # on node 0 (the pod whose wg0 address ends in .1) torchrun --nnodes=2 --node_rank=0 --nproc_per_node=8 \ --master_addr= --master_port=29500 train.py ``` ```bash # on node 1 torchrun --nnodes=2 --node_rank=1 --nproc_per_node=8 \ --master_addr= --master_port=29500 train.py ``` In **Your Pods**, click **Launch info** on the cluster block to copy the hostfile and one `torchrun` command per node. `torchrun` prints nothing until every node has started. **Confirm it uses the fabric** Set `NCCL_DEBUG=INFO`. On InfiniBand and RoCE the log should show `NET/IB`; on AWS EFA it should show `NET/OFI` and `NET/Libfabric`. If it shows `NET/Socket` instead, NCCL is not using the fabric; tell support which cluster it is. ## Use your own image You can rent a cluster with your own template. Build its image `FROM daturaai/lium-cluster`: that image starts the private network and the shared SSH. On another image, the nodes cannot find each other. You can also run your image inside the cluster pod with Docker. Keep `--network host`: ```bash docker run --rm --gpus all --network host \ your-registry/your-image:tag your-command ``` ## Replace a failed node **Replace it** In **Your Pods**, a node that is down shows **Replace node N** on the cluster block. Click it. The API does the same with `POST /clusters//members//replace`. **What happens** Lium rents a free node from the same provider and fabric. It keeps the failed node's number, private address, shared SSH and scheduled stop time, so the other nodes need no change. The failed node is deleted once the new one is running. If no such node is free, the request is refused; try again later or rent a new cluster. The new node starts empty: copy your data back to it. ## Stop a cluster If a node fails to start within 20 minutes, Lium deletes the whole cluster, and a node that never started is not charged. Each node bills on its own until it is deleted. In **Your Pods**, click **Delete cluster** on the cluster block and confirm to delete every node at once. The CLI does the same with [`lium clusters rm `](/developers/cli/reference/clusters#lium-clusters-rm), and the API with `DELETE /clusters/` and your API key. `cluster_id` is shown on each member pod in `GET /pods`. --- # Reserved rentals (30 days) Lium has two rental modes: On-demand and Reserved. On-demand is the usual rental, billed per second, that you can end at any time. Reserved rents a whole Secure node for 30 days at the Reserved price the provider sets. That price is often below the On-demand price, and it stays fixed for your term. You are billed per second at that price, and both you and the provider hold a deposit of 7 days of that price. ## Rent one On **Browse Pods**, switch the mode at the top from **On-demand** to **Reserved**. The list then shows only the nodes that take a reserved rental now, each with its Reserved price per hour for the whole node and the deposit; hover the deposit for the rules. The price filter and the sort use the Reserved price. The other filters work as usual. Click **RENT NOW** on a node. The rent form rents every GPU of the node and has no auto-termination. The summary shows the Reserved price per hour, the 30-day total and the deposit; that is what the rental charges. Your balance must cover the deposit plus the first hour. The deposit is held from your balance at the start: it cannot be spent on other rentals or withdrawn. From the API, send `"reserved": true` in the body of `POST /executors/{executor_uuid}/rent`, for every GPU of the node. An API key with a daily, monthly or lifetime budget rents Reserved only when the deposit fits in what is left of the budget; if it does not, the rent answers 402. `GET /reserved-rentals/offers/{executor_uuid}` returns the price and the deposit, 404 when the node offers no reserved rental, or 409 when it offers one but cannot take it now. No node free yet? **Auto-rent a GPU** in Reserved mode starts the term for you as soon as a matching node takes a reserved rental, within your price per GPU-hour (the Reserved price divided by the node's GPUs). See [Start the rental automatically](./machine-requests#start-the-rental-automatically). ## Your terms **Billing** lists your reserved rentals with the end date and the deposit. From 7 days before the end you can **Renew for 30 days** at the same price (`POST /reserved-rentals/{term_id}/renew`). The provider can turn a node's Reserved offer off, which stops renewals but never ends your running rental early, and a renewal is also not possible after the provider changes the node's Reserved price. **Billing** then shows **No renewal** for the rental. If you do not renew, the pod keeps running as an ordinary rental after the end date: it moves to the node's listed price, a lower price at once and a higher one only after the usual price-change notice. ## How the deposits move | What happens | Your deposit | Provider's deposit | |---|---|---| | The 30-day term ends | Returned to your balance | Stays with the provider | | You leave early, no outage | Goes to the provider, less the Lium fee, after a 7-day review hold | Stays with the provider | | The node is down 1 to 4 hours and you leave | Returned | The provider pays 24 hours of the price, as for any rental | | The node is down 4 hours or more and you leave | Returned | Paid to you, in place of the 24 hours | | A second outage in the same 30-day term | Returned | Paid to you; the term ends | | The provider removes the node, gives a permanent removal notice for it, or it is down 24 hours | Returned | Paid to you; the term ends | | The pod never starts, or Lium ends it (not you, not the provider) | Returned | Stays with the provider; the term ends | | Planned maintenance under the notice periods, or a Lium incident | No change | No change | An outage is the node down for an hour or more. A shorter drop is not an outage: no fee, it does not count toward the second outage and opens no 48-hour window, and you are not billed for that time. If one node's short drops add up to an hour within a week, they count as one outage. During an outage and for 48 hours after the node is back, you can leave with no fee and get your deposit back. If you stay, you are not billed for the outage time. If your balance runs out, you are warned first. The deposit then pays the next 24 hours. If the balance is still empty after that, the rental ends as an early leave. Otherwise, the remaining deposit comes back when the 30-day term ends. Every deposit that moves from one side to the other is held for review for 7 days before it is paid out, and the side that loses it can dispute it in that time. A provider deposit paid to you is held, and the provider can dispute it: if your own job took the node down, the outage does not count. Your deposit paid to the provider after an early leave is held too: **Billing → Reserved rentals** shows it and the date it is paid. To dispute it, for example when the provider caused your leave, write to support in [Discord](https://discord.gg/lium) before that date. A disputed transfer stays held until the team decides it; if your dispute is upheld, your whole deposit comes back. --- # Volumes A **Volume** is storage that outlives your pods. Attach one to a pod and it is mounted at **`/mnt`**. Use it for datasets, model weights, checkpoints and results. Any user in the pod can read and write the volume, and every file on it shows as `0777`. Keep SSH private keys on the container disk with `chmod 600`, because `ssh` refuses a key that other users can read. Volumes are object storage: fine for loading data, slower than local disk for random reads and writes. For heavy I/O, copy what you need to `/root` (or `/tmp` if `/root` is [encrypted](./encrypted-volumes#tradeoffs)) and write results back to `/mnt`. ## Create a volume Creating a volume needs one completed top-up on your account. Signup, referral or admin credit alone does not count. **Open Volumes** In the sidebar, open **Storage** → **Volumes**, then click **ADD NEW +**. **Name it** Enter a **Name** and click **Create**. ![Volumes page with rate calculator and existing volume](./assets/volumes-list.png) **See what a volume costs** The **Est. cost / day** column shows each volume's storage cost per day. Click **COST HISTORY** for the last 30 days, per volume per day. ## Attach a volume to a pod {#attach-a-volume-to-a-pod} **When you deploy** On the Create Pod form, open **Choose Volume** and pick one, or click **Add a Volume**. Then **Deploy**. With the API, pass `volume_id` in the rent request (`POST /executors/{executor_id}/rent`). **After you deploy** On the pod page, click **Volume**. This works only while the pod has no volume. Attaching restarts the pod. Only files in the pod volume (where it was first mounted; the attach dialog names the path, usually `/root`) and the attached volume are kept; running processes and everything else in the container are lost. With the API, pass `volume_id` to `POST /pods/{id}/reboot`. A pod's volume can't be changed or detached. To stop using it, terminate the pod; the data stays on the volume. One volume can be attached to several pods at once. They all see the same files, with no locking. ## Use it in the pod ```bash ls /mnt df -h /mnt # confirm it's mounted ``` Copy files you read often from `/mnt` to the pod's disk and read them there: every read from `/mnt` is downloaded again and billed as egress. ## List a volume's files {#list-files} See what a volume holds without attaching it to a pod: ```bash curl "https://lium.io/api/volumes//files?prefix=data/" \ -H "X-API-Key: $LIUM_API_KEY" ``` It returns `files` (`name`, `size`, `last_modified`), `folders` and `next_cursor`, one folder level at a time. Names are relative to `/mnt`. Leave `prefix` empty for the top level. Up to 200 entries per page (`limit`, max 1000); pass `next_cursor` as `cursor` for the next page. A key with `read` is enough; it needs `account` pod visibility. Listing bills no egress. ## Billing {#billing} - **Storage:** $0.00005 per GB-hour (about $0.036 per GB-month) of data stored, also while detached. - **Egress:** every read from `/mnt` and every download is billed per GB at what AWS charges Lium. Writes are free. - **Balance below $0:** your volumes and backups keep billing, and we e-mail you to top up. At -$5.00 they are deleted, never sooner than 48 hours after your balance reached -$5.00. - **Charged as it accrues:** every 5 minutes, like pod time, storage so far (at your volume's last measured size) is taken from your balance once it reaches $0.01, and the egress of the reads made so far is taken as it is read. Low-balance warnings, auto top-up and your estimated balance see them like pod time. - **COST HISTORY** on the Volumes page shows storage and egress per volume per day, including deleted volumes. A day's exact cost is settled about 2 days later, once AWS reports it in full: any difference from what was already charged is charged or returned. The Volumes page and **Billing** show egress for the latest 2 days AWS has reported, with a warning when one day reaches $10. ## Delete a volume In the **Volumes** list, click the trash icon. Billing stops. To undo it, contact support with the volume ID within 7 days. [Pod backups](./backups) do not include `/mnt`. ## Use the API or CLI ```bash # List your volumes curl https://lium.io/api/volumes \ -H "X-API-Key: $LIUM_API_KEY" # Create one curl -X POST https://lium.io/api/volumes \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "my-dataset", "description": "Training data v2"}' # Delete one curl -X DELETE https://lium.io/api/volumes/ \ -H "X-API-Key: $LIUM_API_KEY" ``` CLI: `lium volumes list / new / rm` ([reference](/developers/cli/reference/volumes)). You need an [API key](./api-keys). --- # Encrypted local volumes Lium can store your pod's `/root` volume encrypted on the provider's disk. Inside the pod it looks like a normal folder. It is **on by default**. ## What it protects Encryption at rest covers stored data only: while the pod runs, the volume is decrypted and a standard-node host can read it and the pod's memory. The [provider ban rule](./security) applies, and for secrets use a Confidential Computing node. ## Turn it off **In the UI:** clear **Encrypt local volume** on the Create Pod page. It shows only for templates that support it. **API, SDK or CLI:** - API: `"enable_volume_encryption": false` in the rent request. - SDK: `Lium.up(..., enable_volume_encryption=False)`. - CLI: `lium up --no-volume-encryption`. If the template's image does not support encryption, the pod starts with a plain volume. ## Tradeoffs {#tradeoffs} - **Disk is slower**, most for many small files. In our test on an encrypted `/root` (30 Oct 2026): - large sequential writes were about 4x slower (210 vs 800 MB/s); - small 4 KiB writes with fsync were about 3x slower; - creating small files was about 13x slower, and `stat` was about 30x slower. Model downloads are not affected on a new encrypted volume: Ollama and Hugging Face caches are stored unencrypted (see [Model caches](#model-caches)). - **For fast scratch space**, write temporary files to `/tmp`. It is on the same disk, not encrypted, not backed up, and gone on reboot or removal. `/tmp` is smaller than `/root`: on a small share it may hold only a few tens of GB. - **Rent with encryption off** for mostly small-file I/O. - **Backups and restores** of an encrypted volume work only while the pod is running. ## What to put where {#what-to-put-where} | Workload | Encrypted volume (`/root`) | `/tmp` | Plain volume | | --- | --- | --- | --- | | Code, notebooks, configs, SSH keys, private data | Best fit if it must stay encrypted at rest; small-file I/O is slower. | Do not keep; wiped on reboot and with the pod. | Only if you do not need encryption. | | Ollama or Hugging Face cache on a new encrypted pod | Automatic plain cache; no action. | Fine for a scratch model; gone on reboot. | Fine; unencrypted at rest. | | Model cache on an existing encrypted pod | Stays encrypted and slow; a reboot does not convert it. | Re-download a scratch copy. | Create a new pod for the fast path. | | `pip` or `uv` install cache | Cached under `/root/.cache/pip` and `/root/.cache/uv`; slower for large installs. | Use `PIP_CACHE_DIR=/tmp/pip` and `UV_CACHE_DIR=/tmp/uv` for a one-off. | Use for persistent installs. | | Large datasets and checkpoints | Works; large sequential writes are about 4x slower and many small files about 13x slower. | Use for temporary copies and builds. | Use when encryption is not required. | | Backups | Included and encrypted. | Not included. | Included and encrypted. | `pip install` is network-bound on the first download. Caching helps repeat installs; it does not make a slow PyPI path faster. The installed packages go to the image's site-packages or your venv, not to `~/.cache/pip`. To keep both the cache and a scratch venv off the encrypted volume, set `PIP_CACHE_DIR` and `UV_CACHE_DIR` under `/tmp`, and create the venv under `/tmp` or a plain volume. ## Model caches {#model-caches} Ollama and Hugging Face model caches are stored in a plain directory inside the encrypted volume, outside the decrypted view, so downloads are not slowed by per-file encryption. That cache is not encrypted at rest. It is skipped by backups, shares the volume's size limit, and is deleted with the pod. `df` counts it; `du` of the decrypted view does not. Existing pods keep the cache they already have. The fast path is set up only when an encrypted volume is created, so a reboot does not convert an existing cache. To get it, create a new pod; the models download again into the unencrypted cache. Default automatic backups skip the model caches on every volume, plain or encrypted: `.ollama/models`, `hf/hub` and `hf/xet`. A model you build with `ollama create` is stored there too, so automatic backups do not include it; keep its source GGUF and Modelfile in a folder you back up, such as `/root/models`, and rebuild the model after a restore. The cache link covers only the Ollama `blobs` and the Hugging Face `hub` and `xet` directories. Keep `HF_HOME` (or `HF_TOKEN_PATH`) on the encrypted volume so the Hugging Face token, SSH keys, pip/uv caches, code, notebooks and all other data stay encrypted. Hugging Face hub blobs can include private or gated weights and pickle checkpoints (`.bin`, `.pt`). Treat the hub cache as unencrypted: for private weights, download with `--local-dir` to a normal encrypted path, or keep them out of the hub cache. ## Check the status The pod page shows **Volume encryption**: **Enabled**, **Unavailable** (image does not support it), **Disabled** (turned off) or **Setup failed**. ## If SSH suddenly asks for a password The host rebooted and the encrypted volume was not mounted again. The pod still shows **RUNNING** and keeps billing. Your data is intact. **Fix:** **Reboot** the pod from the pod page, or run [`lium reboot `](../developers/cli/reference/reboot.md). --- # Private models and datasets Run a model or dataset the GPU provider must not see. You rent a Confidential Computing machine, the pod proves what machine it is on, and only then does your own key service release a short-lived key that decrypts your data. ## What is guaranteed On a **Confidential Computing** machine, after your verifier checks the pod's quote ([step 4](#4-verify-the-quote-and-release-the-key)): - **The provider cannot read the VM's memory or disk.** Intel TDX encrypts them. - **The quote does not identify your image or your pod.** It measures the machine. Rent every GPU so yours is the only pod on it. - **Lium's node software still runs inside the VM.** The VM keeps the provider out, not Lium. - **GPU memory and the CPU-GPU link are not covered.** The label comes from the CPU's TDX quote; Lium only observes GPU attestation. If you need GPU protection, check the GPUs with NVIDIA's attestation tools from your pod before you load anything. - **Data that leaves the VM** (backups, volumes, logs, network) is protected only if you encrypt it. On an ordinary machine none of this holds ([Pod security](./security)). ## The flow **1. Prepare outside Lium** - Encrypt the weights or dataset with a data key and upload only the ciphertext. - Keep the data key in a key service you control (the **key broker**). - Build an image with your code and the [dstack SDK](https://github.com/Dstack-TEE/dstack), and no secrets. **2. Rent a Confidential Computing machine** On **Browse Pods**, turn on the **Confidential Computing** filter and rent **all** GPUs of a machine. With the SDK: `Lium.up(executor_id=..., gpu_count=...)`; with the CLI: `lium up -c `. Don't put secrets in the rent request, template or start command. **3. Get a quote from inside the pod** Make an in-memory key pair, get a nonce from your broker, and bind both into the quote: ```python import hashlib from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat from dstack_sdk import DstackClient nonce = get_nonce_from_your_broker() # your code private_key = X25519PrivateKey.generate() public_key = private_key.public_key().public_bytes(Encoding.Raw, PublicFormat.Raw) quote = DstackClient().get_quote(hashlib.sha256(public_key + nonce).digest()) send_to_your_broker(quote.quote, quote.event_log, public_key, nonce) # your code ``` ### 4. Verify the quote and release the key {#4-verify-the-quote-and-release-the-key} The broker releases nothing until all three pass: 1. **Signature and TCB:** the quote verifies with an Intel DCAP verifier or the dstack verifier, and its TCB status is up to date. Refuse a quote whose TCB is out of date. 2. **Binding:** `report_data` equals `sha256(public_key + nonce)`, with a fresh, unused nonce. 3. **Measurements:** MRTD and RTMR0–2 match the dstack OS release in the [CVM guide](../providers/nodes/cvm.md), and RTMR3 matches the "CVM attestation" section of the [executor release notes](https://github.com/Datura-ai/lium-io/releases). Then the broker encrypts the data key to the pod's public key and returns it. **5. Load the data** Decrypt into memory or `/root`. Don't write plaintext to a volume or a backed-up path. **6. End the run** Terminate the pod. Revoke any storage credential still valid. ## Keep credentials short-lived - **Lium API key:** on your laptop or CI, never the pod. Set a [budget](./api-keys#budgets). - **Storage access:** a read-only pre-signed URL or temporary token that expires on its own. --- # Backups Lium can back up a folder in your pod on a schedule. Backups are stored in S3 for your account and kept until they expire or you delete them, even after the pod is gone. Creating your account's first backup storage requires a paid deposit. Signup, referral or admin credit alone does not count. Accounts with existing backup storage can continue creating backups. ## Default backup for new pods {#default-backup-for-new-pods} On an account with a paid deposit or existing backup storage, every new pod is backed up unless you untick **Back up the pod's volume** when you rent it (CLI: `lium up --no-backup`; API: `"enable_backups": false`). Other accounts rent without a backup: the dashboard shows the option unticked (**Backups need a deposit**), and the rent response carries a `backup_notice` (also as the `X-Lium-Backup-Notice` header). - Backs up a new pod's local volume on a regular schedule and keeps 2 days of backups. - While the pod is rented, its newest good backup is kept until a newer one completes. A size-paused pod's last copy is kept 7 days after the pause. - If 3 backups you set up for a running pod fail or save nothing in a row, you get an email once. Check that the backup path exists and holds your data. - Default backups stay off on [encrypted](./encrypted-volumes) pods rented before 29 October 2026 until the pod is restarted. The pod's **Backups** tab shows **Paused: restart the pod to resume** (API: `"paused": true` on the backup configuration); a restart resumes them. - Skips caches (`.cache`, `.ollama/models`, `hf/hub`, `hf/xet`, `.npm`, `__pycache__`) and credentials (`.ssh`, `.aws`, `.docker` and similar). A model you build with `ollama create` is stored under `.ollama/models`, so the default backup does not include it. - Pauses by itself while the volume is over 200 GB and resumes once it is back under 200 GB. The last backup is kept 7 days after the pause, and the pod page shows it. We e-mail you once per pause. Configure your own backup for a bigger volume. ## Backup path: the rule that matters {#backup-path-the-rule-that-matters} **The backup path must be `/root` or a folder inside it.** `/root` is the pod's local volume. Prefer a stable folder such as `/root/checkpoints`: it is faster and smaller than all of `/root`. [Volumes](./volumes) at `/mnt` are never backed up. ## Configure a backup in the UI {#configure-a-backup-in-the-ui} **Open the form** On the pod page, click **Backup**. **Fill it in** - **Backup Path**, e.g. `/root/checkpoints`. - **Backup Frequency**: 1 to 168 hours. - **Retention**: 1 to 365 days. **Save** Click **Save**. Open the same form to change or delete the schedule. Deleting it keeps your finished backups. ![Backup Configuration modal on the pod detail page](./assets/backups-config-modal.png) ## Back up now On the pod's **Backups** tab, click **Back up now**, or run `lium bk now `. ## See your backups - **One pod:** the pod page, **Backups** tab. - **All pods:** **Storage** → **Backups** in the sidebar. ![Global Backups page with filters and history](./assets/backups-list.png) A **Completed** backup is ready to [restore](./restores). If a completed backup shows **The folder being backed up is empty. Check the backup path.**, the folder was missing, empty or only held skipped files: point the backup at the folder that holds your data. The **Backups** tab shows when the **Next backup** runs. ## Billing - **Storage:** $0.00005 per GB-hour (about $0.036 per GB-month), the same as a [volume](./volumes.md#billing). It continues after the pod is deleted. - **Transfer:** data read out of backups is billed at what AWS charges. - **Charged as it is stored:** storage is taken from your balance as it accrues, at your backup storage's last measured size, and data read out within about 5 minutes of the read. While an auto backup may still make a day free, that day's storage and reads are taken once it ends. Each day's exact cost is settled about 2 days later and any difference is charged or returned. After you delete your account nothing more is charged; a day that turns out cheaper, or free through an auto backup, is still returned. - **Deleting your account** deletes your backups with it, in one step. To stop paying, delete the backups you don't need. ## Use the API or CLI ```bash # Create a backup configuration curl -X POST https://lium.io/api/backup-configs \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "pod_id": "", "backup_path": "/root/checkpoints", "backup_frequency_hours": 6, "retention_days": 30 }' # Start a manual backup curl -X POST https://lium.io/api/pods//backup \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "before-upgrade", "description": "Manual checkpoint"}' # Delete the stored data for a completed backup curl -X DELETE https://lium.io/api/backup-logs/ \ -H "X-API-Key: $LIUM_API_KEY" ``` CLI: `lium bk now / set / show / logs / delete` ([reference](/developers/cli/reference/bk)). You need an [API key](./api-keys). --- # Restores A **restore** copies a completed [backup](./backups) into a pod. Use it to recover work, move to another GPU, or start a new pod with your data. ## Restore path: the rule that matters {#restore-path-the-rule-that-matters} **The restore path must be a new or empty folder inside `/root`**, such as `/root/restored`. `/root` itself is not allowed. Restore only copies files. Template, ports and environment variables are not restored. ## Two ways to restore {#two-ways-to-restore} **Into a running pod** 1. On the pod page, open the **Backups** tab. 2. Click **Restore** on a completed backup. 3. Pick the target pod and a restore path, then click **Confirm**. ![Pod detail Backups tab showing restore section](./assets/backups-tab-pod.png) **Into a new pod** 1. In **Browse Pods**, click **RENT NOW** on a node. 2. Under **Restore**, click **Select a Backup**. 3. Enter a restore path and click **Deploy**. ![Restore section on the Create Pod page](./assets/create-pod-restore.png) If another restore or backup of the same backup is still running, the rent is refused before a node is taken. Wait for it to finish or cancel it, then rent again, or rent without a restore and restore later. If the backup is being cleaned up, try again in a few minutes, or rent without a restore. **Move a pod off a node that is down** 1. On a pod marked **· NODE OFFLINE**, or one whose reboot failed, click **Move to another machine**. 2. The window shows when the latest backup was taken. Files written after that time are lost. A pod with no backup moves to an empty pod; tick **I understand my files will be lost** first. 3. Pick a machine with the same GPUs and click **Move**. The new pod starts from that backup, restored into `restored` inside its volume folder, and opens with the restore progress. If the rental request is refused, the old pod stays. Once the replacement is accepted, deletion of the old pod starts. A later startup failure is shown on the new pod and does not restore the old one. A pod with no completed backup starts empty, and its files are deleted with the old pod, even if its machine comes back; through the API, send `allow_empty: true` to confirm. If the machine's price went up after the list was shown, nothing moves and the list refreshes. A scheduled termination carries over: the new pod is removed when the old one would have been. If the old pod cannot be deleted, the window says so; click **Move** again to retry, or delete it yourself. An attached volume moves with the pod: the new pod mounts the same volume. A cluster pod cannot be moved; use **Replace node N** on the cluster bar once its node is down. **While it runs** The pod stays usable. Don't touch the restore folder until it finishes. Progress shows on the pod's **Backups** tab. ## When your pod moved to another machine {#pod-moved-to-another-machine} If the provider moves or replaces the machine, Lium restarts your pod on other GPUs and e-mails you. Files on the pod's own disk may be missing; an attached volume is mounted as before. Nothing is restored automatically. The pod page shows a notice with **Restore latest backup**, which restores the newest backup taken before the move into `/root/restored`. ## Use the API or CLI ```bash # Trigger a restore into a running pod curl -X POST https://lium.io/api/pods//restore \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "backup_id": "", "restore_path": "/root/restored" }' # Restore with the CLI lium bk restore --id --to /root/restored lium bk restore-logs ``` See the [API reference](/developers/api). You need an [API key](./api-keys). --- # Scheduled termination Have a pod deleted automatically at a set time, so you don't pay for one you forgot. Billing stops when the pod is deleted. ## Set it when deploying On **Create Pod**, enter a number of hours in **Auto-Termination (Optional)**. Leave it blank to keep the pod until you delete it. ## Set it on a running pod **Open the menu** On the pod page, click **DELETE**, then **Schedule pod deletion**. **Pick a time** Choose a preset (1 h to 1 day) or a custom date and time. The pod page then shows "Scheduled to terminate at …". ![Schedule deletion menu on the pod detail page](./assets/scheduled-termination.png) ## Cancel it On the pod page, click **Remove Scheduled Terminate**. ## See all scheduled terminations 1. Open **Your Pods**. 2. Click the **Scheduled** tab. It lists every pod with a scheduled termination, soonest first. Hover the calendar icon on a row for the time. ## Cancel several schedules at once 1. On **Your Pods**, tick the pods (the box in the list header ticks every pod shown). 2. Click **Cancel scheduled termination**. ## Remove or reboot several pods 1. On **Your Pods**, tick the pods. 2. Click **Remove selected** or **Reboot selected**, then confirm. ## Use the API or CLI ```bash # Schedule removal at a specific UTC datetime curl -X POST https://lium.io/api/pods//schedule-removal \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"removal_scheduled_at": "2026-05-01T12:00:00Z"}' # Cancel a schedule curl -X DELETE https://lium.io/api/pods//schedule-removal \ -H "X-API-Key: $LIUM_API_KEY" ``` CLI: [`lium up --ttl`](/developers/cli/reference/up) or `--until` at create time; [`lium schedules list / rm`](/developers/cli/reference/schedules) for existing pods. You need an [API key](./api-keys). --- # Request a GPU that is sold out If no node with the GPU you need is free, file a **machine request**. Providers of that GPU may be e-mailed, and Lium e-mails you when a matching node is listed. ## File a request **Open Machine Requests** In the left menu, open **Machine Requests** and click **ADD NEW**. **Fill it in** Pick the **Machine Name** (GPU model, e.g. `NVIDIA B200`) and the **GPU Count** for one pod. Set **Tier** to Secure or Spot to hear only about that tier; leave it empty for any. **Save** The request shows in your list. Its **Nodes** column lists the nodes offered for it. ## What happens next - **Providers may be told** and can offer a node. - **Lium checks Browse Pods every 5 minutes** and e-mails you a link to the cheapest match, at most once a day. - **A request is watched for 30 days.** After that, file a new one. The node in the e-mail is not reserved for you: anyone can rent it, so rent from the link quickly. ## Start the rental automatically Lium can rent the node for you as soon as one matches. You can set this up on the [Machine Requests](https://lium.io/machine-requests) page with **AUTO-RENT**, from **Auto-rent a GPU** on Browse Pods, or through the API, as described below. **Add the rental details** In `POST /machine-requests` (or `PUT /machine-requests/{id}`), also send `auto_rent: true` and `ssh_public_keys`. Leave out `template_id` (and `pod_settings.dockerfile_content`) to rent with the default template matched to the rented node's driver, as a normal rent preselects it; a `template_id` you send must be one you can rent with, and a `pod_settings.volume_id` must be a volume you can attach to a new pod, as for a rent. You can have up to 10 open auto-rent requests. `max_price_per_gpu_hour` is optional. Set it to limit the price, or omit it (or send `null`) to rent any matching node at its listed price. `hours` is optional too. Set it from 1 to 720 for a scheduled stop, or omit it (or send `null`) to run until you stop the pod or your balance runs out. Optionally send `start_after` and `start_before` (UTC) to set a window. **Auto-rent a Reserved term** To start a [Reserved rental](./reserved-rentals) instead, set **Tier** to **Reserved - 30 days** in any auto-rent dialog (opening it while Browse Pods is in **Reserved** mode presets it), or send `"pod_settings": {"reserved": true}` in the API. Lium then rents only a whole Secure node with exactly your GPU count that takes a Reserved rental now, and starts a 30-day term at that node's Reserved price. `max_price_per_gpu_hour` is compared with the node's Reserved price for the whole node divided by its GPUs. Leave `hours` empty: the term runs 30 days, so a request with `hours` or `"tier": "spot"` is refused. Your balance must cover the 7-day deposit plus the first hour at the node's Reserved price; the dialog shows that amount before you save, and the start e-mail names the term's price and the deposit held. As for any Reserved rental, the node's Spot offer is never used, no Spot renter is moved off the node, and an API key with a budget starts the term only when the deposit fits in what is left of it. **Keep enough balance** You need a confirmed e-mail address and at least one paid top-up; signup credit alone does not turn on auto-rent. With `hours`, your balance must cover the node's listed price × GPU count × `hours`. Without `hours`, it must cover one hour at the node's listed price × GPU count. Lium makes this check for the cheapest matching node, then for each candidate before it starts the rental. These checks come on top of what your running auto-rented pods still cost until they stop. A running auto-rented pod without `hours` keeps one hour at its price set aside, so a second request does not start on the same money. If the balance is short when a node matches, Lium e-mails you once a day to top up. **Wait for the e-mail** A GPU type that names its memory, such as A100 80GB, matches only nodes whose GPUs have that memory. When Lium finds a free matching node within your price limit, it rents that node and e-mails you the pod, its price and how long it runs. Without a price limit, Lium rents the node at its listed price. The pod stops `hours` after it starts. Without `hours`, the start e-mail says that the pod runs until you stop it or your balance runs out. If nothing matches before `start_before` (or within 30 days), the request expires and you get an e-mail. **Read the status** The **Status** column of an auto-rent request (`auto_rent_status` in the API) shows what happened: - **Waiting**: no rental yet; Lium keeps looking until the deadline. - **Started**: the pod was created. **View pod** opens it. - **Failed**: the pod was created but did not start. The request does not rent again; make a new one if you still need it. - **Could not confirm**: Lium did not get a clear answer when it started the rental, so it does not try again. Check **Your pods**; if no pod runs there, make a new request. - **Expired**: nothing matched before the deadline. The request stays in the list until you delete it. - **Closed**: you marked the request achieved. **Save your work before the stop** With `hours`, Lium e-mails you 30 minutes before the pod stops. Without `hours`, there is no scheduled stop and no stop-warning e-mail. The pod's disk is deleted when it stops, so copy what you need first. If the node fails during the run, Lium does not start a new rental for the request. Whether you are refunded depends on the node's tier, as for any pod: see [Broken pods](./broken-pods). Make a new request if you still need one. ## Close the request When you have what you need, delete it with the bin icon in its row. ## Use the API With an API key (`X-API-Key`): | action | call | |---|---| | file a request | `POST /machine-requests` with `{"machine_name": "NVIDIA B200", "gpu_count": 8}`; add `"tier": "secure"` or `"spot"` for one tier | | rent it automatically | add `"auto_rent": true, "template_id": "…", "ssh_public_keys": ["ssh-ed25519 …"], "max_price_per_gpu_hour": 3.5, "hours": 24` | | start a Reserved term automatically | add `"auto_rent": true, "ssh_public_keys": ["ssh-ed25519 …"], "max_price_per_gpu_hour": 3.5, "pod_settings": {"reserved": true}` with no `hours` | | your open requests | `GET /machine-requests` | | nodes offered for one request | `GET /machine-requests/{id}/executors` | | close it | `DELETE /machine-requests/{id}` | --- import LaunchStatsTable from "@site/src/components/LaunchStats"; # Launch success and time to SSH How often a pod of each GPU type starts on Lium, and how long it takes until you can SSH in. The table is computed from production data over the last 14 days and refreshed every 15 minutes; this page holds no number of its own. ## What is counted - **A launch** is a pod created in the window that either reached RUNNING or failed to start. A pod you delete while it is still starting, before it either runs or fails, is not a launch. A pod Lium moves to another node after a failed start stays one launch, and counts as a success if the second node starts it. - **Reached RUNNING** is the share of launches whose pod reached RUNNING. A pod turns RUNNING once the node reports its container started and the validator's start-up checks, SSH among them, have passed: the moment you can log in. - **Time to SSH** runs from your rent request (the pod's creation) to RUNNING, for the launches that got there. The median is the typical launch; the 90th percentile is the slow tail: one launch in ten took longer. - **A failed start counts whatever its cause**, your own image included: a template whose command exits right after start, or a Dockerfile that does not build, lowers its GPU's rate. - **Per GPU type and GPUs per pod**, because a whole 8-GPU node and a single GPU of the same model are different launches. The type is the model the node reports. A GPU and count with fewer than 20 launches, or launches on fewer than 3 providers, in the window is not listed: a rate off a handful of launches or one provider says little. ## Read it yourself The same numbers, without authentication: ```bash curl -s https://lium.io/api/public/v1/launch-stats ``` `gpus` holds one object per GPU type and count: `success_rate` (0 to 1), `time_to_ssh_p50_seconds` and `time_to_ssh_p90_seconds`. `window_days`, `min_launches`, `min_providers` and `generated_at` say what the numbers cover. --- # Invoices Card payments get an invoice. You can download it from **Billing → Billing History**. ## Invoice Details **Add your company details** 1. Open **Billing**. 2. Under **Saved Cards**, click **Add billing details**. 3. Fill in **Company Name**, the address, **Country** and **Tax / VAT ID**. 4. Click **Save Changes**. - **Country** is required once you fill in an address field or a tax id. - The details apply from your next card payment. Past invoices do not change; support can reissue one under your new details, keeping its payment date and receipt number. - Card payments from the last 30 days without an invoice get one a few minutes after you save. **Download an invoice** Open **Billing → Billing History** and click the icon in the **Invoice** column. A card payment without an invoice gets one when you click it. ## Crypto and TAO top-ups Card payments get an invoice. Crypto and TAO top-ups do not. Use **Download CSV** above **Billing History** for your records. --- # Refer & Earn Open **Refer friends, earn 5%** in the sidebar, just above Provide GPUs ([lium.io/refer-earn](https://lium.io/refer-earn)). Your Pods, your pod's page, the billing page, the pricing page and every GPU model page link to it too. Know someone with GPUs? [Provider referrals](/providers/rewards/referrals) pay 4% of their new GPUs' rental billing for 12 months. **Share your link** 1. Copy the link under **Your referral link**. 2. Share it. Accounts that sign up through it are listed under **Referral history**. You earn **5% for 3 months, then 2.5% for 3 months** of each referred account's top-ups. **Partner codes** If Lium gave your account a named partner code (for example `lium.io/?ref=yourname`), it is listed under **Your partner codes**, below your referral link, with a copy button for its link. Signups through it count as your referrals, the same as your own link. Your personal `LIUM-` code keeps working alongside it. The `GET /referrals/my-code` API returns these codes in `partner_codes`. **Choose how you are paid** 1. Pick **Balance** or **Crypto** in the selector next to **Your referral link**. 2. For **Crypto**, click **Setup** and connect your wallet. **Withdraw** 1. Check **Pending balance** and click the button next to it. It names where the money goes: **Move to balance** or **Send to wallet**. 2. The dialog shows your payout method (click **Change** to pick another) and what you receive now. Confirm with **Move $X to balance** or **Send $X to wallet**. If your payout method was changed after the dialog opened (for example in another tab), nothing is paid: reopen the dialog and confirm again. Commission is held for 7 days after each payment. A crypto withdrawal pays only commission past its hold. Moving it to your Lium balance is not held. **Track payouts** - **Pending payouts** lists withdrawals that are not sent yet. - **Payout History** lists every payout with its status, destination and transaction. - Click a row to open **Payout details**: amount, method, status, dates, destination, network, transaction hash and any error. --- # Provider maintenance on your pod A provider can announce downtime for the machine your pod runs on. The pod page then shows a yellow **Maintenance Notice** banner, and you get an e-mail if you were already renting. ## Scheduled maintenance The banner shows the window. It is at most **24 hours** and announced at least **24 hours** ahead (48 hours for one over 60 minutes). A provider can take a window over 6 hours at most once in 30 days. A provider who learns of maintenance later can announce a **Late Notice**: at most 3 hours, possibly starting at once, and you get the e-mail right away. If you rent on Secure and your pod was on the machine when the Late Notice was announced, you can end the rental during the window and get up to 24 hours of its highest hourly price in the 24 hours before the announcement back (never more than you paid and were not refunded). A provider can also only e-mail you about downtime without a window (a removal or maintenance announced too late for a notice). Billing then continues as usual. **What happens** The machine can go offline during the window. You are not charged for the window. After it, your pod keeps running if its container is still running. If the machine reports within three hours that it is not, Lium reboots a managed container pod once; on a bare-metal rental, coordinate recovery with your provider. **What survives** Files in `/root` and an attached [Volume](./volumes) at `/mnt`. In a reboot, running jobs, memory and anything else are lost; reinstall packages you added outside `/root`. **What to do** - **Before:** save your work in `/root` or download it with `lium scp`. Stop or checkpoint long jobs. - **After:** log in and continue. If a managed container pod isn't back an hour after the window, reboot it from the pod page. On a bare-metal rental, coordinate recovery with your provider. ## Permanent removal The banner shows the removal time, announced at least **48 hours** ahead. The machine stays rentable until then. Its listing shows **Removed at** with the time (`removal_at` in the API), and if you rent it you get an e-mail with the time right away. **What happens** Your pod is deleted shortly after that time and can't be restored. Billing stops then. **What survives** Your [Volume](./volumes) at `/mnt` and completed [backups](./backups). On a managed container pod, everything else is deleted. A bare-metal rental is not wiped by Lium; arrange removal of your data with your provider. **What to do** Before the removal time, download what you need, copy it to a Volume, or run a backup. Then rent a new pod and attach the Volume or [restore](./restores) the backup. ## If something went wrong If your pod came back broken or stayed down much longer than the window, ask in [Discord support](./discord-support) with the pod name and the times from the banner. --- # Billing Prices are hourly, in USD. You pay **per second**: `hourly price × seconds / 3600`, with no minimum. ## What is charged | Item | Rate | |------|------| | Pod | The pod's hourly price (per-GPU price × GPUs) | | Volume | `$/GB/hour` on the data stored, charged every 5 minutes. See [Volumes](./volumes) | | Backups | `$/GB/hour` on the backup data stored, charged as it accrues. See [Backups](./backups) | If the provider raises the price, a running pod moves to it only after you are told by e-mail. A lower price applies at once, unless the provider chose to keep your rental at its price until it ends: then no later price change, lower or higher, reaches it. Some Secure nodes show an intro price: a lower price for the first hours of your first rental of that node. Your pod pays the intro price for those hours, then the node's price shown when you rented, and you get an e-mail when it changes. Your pod page shows the intro price and when it ends. If you have rented the node before, you pay its price from the start. Price changes by the provider do not reach your pod during its intro hours. After that it follows the rules above, like any rental. ## When a pod is charged {#when-a-pod-is-charged} | Pod status | Charged? | |---|---| | Starting (**PENDING**) | Not yet. Once the pod turns **RUNNING**, a pod on the node's default image (marked **Fast deploy** in the template list) is charged from that moment, so its setup is free; any other image is charged from the deploy request, starting time included. A pod moved to another node because the first one failed to start is charged from the move, so its setup on the new node is charged | | Failed to start (**CREATION_FAILED**), or deleted while **PENDING** | No | | **RUNNING**, rebooting (**REBOOT_PENDING**) or **REBOOT_FAILED** | Yes | | Rebooting or **REBOOT_FAILED**, but the pod's container was never created | No | | **REBOOT_FAILED** because the validator could not reach the node | No, until the pod runs again or you reboot it. Lium's automatic retries do not resume billing. | | **REBOOT_FAILED** because a copy of the pod kept from an earlier edit blocked the reboot and the pod was left as it was | No, until the pod runs again or you reboot it. If the next reboot is blocked the same way, it is charged, since the pod kept running | | **REBOOT_FAILED**, and the pod's error says a platform step left it stopped and it is not billed while it stays down | No, until the pod runs again or you reboot it. Billing restarts from your accepted reboot, even while the pod is still starting. | | Node offline for an hour or more | No, until the node is back | | Node fails a validator check and your pod stops answering SSH | No, from that check until the pod answers or the node passes the check for rented nodes | | Secure pod deleted while it shows **not reachable since** a time and its node is failing validator checks | Refunded from that time or the node's last passing check, whichever is later | | **BROKEN** | No. See [Broken pods](./broken-pods) | | Deleted | No. Charging stops at the delete request | While a node is offline, time in which your pod still answers SSH is charged, and is not refunded once the node is back. Charges are taken from your balance every 5 minutes (every minute once less than 10 minutes of balance is left), and once more when the pod is deleted. Between charges, the balance shown in the app is an estimate that updates once a minute. ## Add funds **Top up** Open the account menu (bottom-left) → **Billing** → **TOP UP**. Pay by card, crypto, TAO, alpha or SN51 gamma. - **Saved card:** once a card is saved, **TOP UP → Charge saved card** charges it with no checkout page. - **Link:** pay with a card. A payment from a bank account through Link is refunded in full automatically, and the credit it added is taken back. The refund can take a few business days to reach your bank. - **Crypto:** pay the invoice before it expires, from a wallet you control, not an exchange withdrawal. Open invoices show under **Pending crypto deposits** on the Billing page. - **TAO:** send only from a wallet verified on your account. If you already sent from an unverified wallet, verify it with **Add Wallet** in the Pay with TAO window; transfers from it in the last 7 days are then credited (30 days for one received before 20 October 2026). A transfer that arrived but is not credited yet shows as *received, crediting…* in the Pay with TAO and Pay with Alpha windows; one that shows *received, contact support* needs support. - **SN51 gamma:** choose **Gamma**, connect a Polkadot.js, Talisman or SubWallet wallet and link it once by signing a message. **Pay** buys gamma with TAO on subnet 51; Lium credits it 1 gamma = 1 USD within a few minutes. The mint fails, costing only the network fee, if the price moves more than 2% before it lands. From subtensor runtime 493, gamma is credited when the hotkey spends it at Lium's service on subnet 51 (`5FTVrwEpjvpNeKwczFtYjs62GHKKLHLCdqCThtj2unZouKg1`): **Pay** mints and spends in one signature, also spending gamma already in the deposit. It spends the mint's guaranteed minimum, so the gamma minted above it (up to 2%) stays in the deposit until you credit it with **Credit the rest of my deposit** (a second signature) or your next payment spends it. Under a daily spend cap on the deposit, both spend only what the cap allows now, and the rest waits in the deposit until it refills; while it allows less than 0.1 gamma, **Pay** is refused before you sign. A linked hotkey can spend from the command line with `btcli gamma spend`. Gamma a hotkey spends there before it is linked to your account is credited to an account of the hotkey's own (see below), so link the hotkey before it spends. - **Gamma without a Lium account:** `GET /api/gamma/hotkey-account/challenge?hotkey=` returns a `message` to sign with the hotkey (sr25519, e.g. `btcli wallet sign --use-hotkey`). Before you mint, send `{hotkey, message, signature}` to `POST /api/gamma/hotkey-account/check`: it refuses a hotkey whose gamma would not reach a wallet account (one already linked to another Lium account, or a closed account), so you do not mint gamma that Lium cannot credit. Before subtensor runtime 493 it returns Lium's spender and also refuses a deposit that names another spender or has a daily spend cap of 0; from runtime 493 it returns Lium's `service` and does not read the deposit (see the end of this item). Its answer holds for the moment you ask: if the account is deleted before your mint lands, the gamma is not credited. A blocked account is different: its deposit is still spent and credited to it, but its sign-ins are refused (as closed) while it is blocked. The check does not use up the signed message. Before runtime 493: mint gamma into your hotkey naming that spender, then send the same `{hotkey, message, signature}` (or a newly signed challenge) to `POST /api/gamma/hotkey-account`. The first sign-in refuses a deposit capped at 0 (raise the cap first) and otherwise opens an account for the hotkey and answers 409 with the code `AWAITING_CREDIT` until the gamma is credited (usually within a few minutes): then sign a new challenge and sign in again. Every later sign-in returns an API key that can rent and revokes the key the previous sign-in returned, even if you renamed it (keys you create yourself stay). Call it from the CLI or a script: a browser request is refused. That stops only a web page's own request, so treat the signed message as a password until it is used or expires (10 minutes): anyone you give it to, a website's server included, can sign in with it. Once you turn on an authenticator app for the account, this call is refused: sign in on lium.io with the wallet and your code, then create API keys there. The gamma is credited 1 gamma = 1 USD within a few minutes, unless a daily spend cap delays it. If you set a daily spend cap on the deposit, Lium credits only what the cap has refilled: each credit waits until the refilled amount reaches the smallest of 1 gamma, your cap and what is left of the deposit (with a 0.5-gamma cap and 0.2 gamma left, the 0.2 is credited once 0.2 has refilled), so a cap that has only partly refilled delays the next credit, and a cap of 0 is never credited until you raise it. Before runtime 493, if the hotkey's deposit already names another spender, a new mint naming Lium's is refused on chain: its coldkey owner calls `set_gamma_deposit_spender` naming Lium's spender instead, then signs in with the hotkey as above: the gamma already in the deposit is credited once the hotkey's account is open, with no second mint (until that sign-in, nothing is credited). If the deposit's daily spend cap is 0, its coldkey owner raises it in the same step, before any mint. If that spender already spent the whole deposit, nothing is left to credit: after changing the spender (and raising a zero cap), mint new gamma into it naming Lium's; if you already submitted a mint, do not mint again, but wait until it is finalized on chain and sign in again. A hotkey already linked to another Lium account (for gamma top-ups, or an account that signs in with e-mail, Google or a device) signs in through that account. On lium.io, **Log in → or sign in with a Bittensor wallet** does the same from Polkadot.js, Talisman or SubWallet and opens the dashboard (it signs its own message and issues no API key). That wallet stays linked under **Billing → Gamma**: it is how the account signs in, so it cannot be unlinked. From subtensor runtime 493 deposits have no spender, and the spender and zero-cap steps above do not apply: the check names Lium's `service`, and a pass does not mean your gamma will reach it, since a deposit's daily spend cap limits what the hotkey can spend there per day and the check does not read it. Before you mint, check the deposit's cap and lift it if it is 0 or too low, then spend gamma at the returned `service` (`lium fund --gamma` mints and spends, or `btcli gamma spend`); gamma minted but not spent there is not credited. The first sign-in opens the account once the hotkey has spent gamma at that service that is not credited yet; the account then waits for the credit as above. - **A refused signed message (HTTP 400):** linking a hotkey, the hotkey-account check and both hotkey sign-ins say which check failed. "Not the challenge we issued" means the signed text differs from the `message` you were given: sign it exactly, with nothing added or changed. "Older than 10 minutes" means the challenge expired: request a new one and sign it right away. "Does not verify for this hotkey" means the signature came from another key: sign with the hotkey itself (e.g. `btcli wallet sign --use-hotkey`), not its coldkey. - **Gamma Integration Standard (subnet 51, btauth/1):** from subtensor runtime 493 every hotkey that spends gamma at Lium's service (`5FTVrwEpjvpNeKwczFtYjs62GHKKLHLCdqCThtj2unZouKg1`) has a Lium account keyed by the hotkey, opened and credited 1 gamma = 1 USD within about 10 finalized blocks with no sign-in. The exception is a hotkey that was once linked to a Lium account and then unlinked: it opens no account of its own, and its spends are credited only once it is linked to an account again, so link it to an account (see **SN51 gamma** above) before paying with it. `GET /api/gamma/balance?hotkey=` (no key needed) returns `balance_usd`, the hotkey's spendable USD, as a decimal string, zero for a hotkey that never spent (`credited_usd`, `used_usd` and `remaining_usd`, which equals `balance_usd`, stay for earlier clients); a hotkey linked to an e-mail account shows its credits as used, since that account's balance is private. Instead of an API key, a request can be signed by the hotkey with btauth/1 (`bt.http_auth.sign`, receiver Lium's service hotkey, sr25519 or ed25519; the hashed schemes are not accepted yet). A signed request acts as the hotkey's account with the read and rent scopes, needs a fresh nonce each time (at most 10 seconds old) and is refused (401) if replayed, if an e-mail account linked it, or if the hotkey was unlinked from its account (its spends wait for its next link, so do not pay again). A signed request that starts paid work (creating a volume, a rent, a rent-by-spec, dry runs included, or a cluster rent) from a hotkey that never spent at the service is refused with HTTP 402 `{"error": "insufficient_balance"}` and opens no account; other routes refuse it with 401. While the hotkey's newest payment is still finalizing, a signed request that would get this 402 (a first request, or a rent its balance cannot cover yet) gets `503` with `Retry-After` instead (retry, do not pay again), and on an environment where sign-up is limited to listed addresses a hotkey that spent gets `401` saying its spend waits (do not pay again). A signed rent the balance cannot cover first credits the hotkey's newest spends, then is refused with the same 402. The API description (`/api/openapi.json`) lists the scheme as `btauth`; routes that need the billing or manage scope refuse a signed request (403). The `template_id` a rent-by-spec answers (a dry run too) is the template the pod starts from: the pod runs on its own copy of it, so in `GET /api/pods` and the pod detail the pod's `template.id` is the copy and its `template.source_template_id` equals that `template_id`. Pods bill by the hour from the balance as with any key. The service document is at `https://lium.io/api/gamma/services.json`; prices are at [lium.io/pricing](https://lium.io/pricing), and as JSON at `https://lium.io/pricing.json` (the document's `pricing`). - **Subnets that pay Lium from their emission:** from subtensor runtime 493, gamma that a subnet sends to subnet 51 from its emission lands in the deposit at the subnet owner's hotkey with a daily spend cap of 0, so none of it reaches Lium until the owner spends it. Lium cannot take gamma from a deposit. These commands need `btcli` from the `bittensor` package, version 11.3.5 or later (the separate `bittensor-cli` package has no `gamma` commands). Name the wallet and network on both so the right keys sign: the owner coldkey sets the daily cap once, to the expected daily payment (`btcli gamma set-cap -w OWNER_WALLET -n finney --netuid 51 --hotkey OWNER_HOTKEY_SS58 --daily-spend-cap-gamma DAILY_AMOUNT`). What the hotkey can spend refills to the cap over 7200 blocks, about a day, so after the first refill it can pay every day with no further coldkey step. Then the owner hotkey spends at Lium's service (`btcli gamma spend -w OWNER_WALLET -H OWNER_HOTKEY_NAME -n finney --netuid 51 --service-hotkey 5FTVrwEpjvpNeKwczFtYjs62GHKKLHLCdqCThtj2unZouKg1 --amount-gamma AMOUNT`). Keep the cap rather than removing it (`--remove-cap`): it limits how fast a leaked owner hotkey can spend, to the full cap at once and then what refills, about one cap a day. A spend cannot be undone once its block is finalized. Save the extrinsic ID or explorer link if `btcli` shows one. If you lose a spend's result, check the signing hotkey's finalized transaction history for the original spend. If you cannot establish the outcome, treat the spend as pending and repeat it only after confirming that it failed or expired without executing. Otherwise the gamma is spent twice. Each spend is credited 1 gamma = 1 USD to the account linked to that hotkey, or to the hotkey's own account as above. `GET /api/gamma/balance?hotkey=` shows what was credited; it does not tell you whether a spend executed, so do not use it to decide whether to spend again. - **When the bank wants a confirmation.** An API card top-up can return a 402 `CARD_AUTHENTICATION_REQUIRED` with a `next_action_url`: the cardholder opens it to confirm with their bank (3-D Secure), and the balance is credited seconds later. To retry, repeat the call with the **same** `idempotency_key`; a new key opens a second payment on the card, and that one can also be charged. With an API key that has a spending budget, only a card's first API top-up asks for this: once the card has passed 3-D Secure on your account, later top-ups charge it without asking. A key without a budget is also asked after several top-ups in a day. Lium asks again if it cannot confirm the card's earlier check, and the bank can always ask. **Turn on Auto Top Up** On the **Billing** page, set an amount to charge your card when the balance falls below a threshold. A card saved before 10:40 UTC on 27 October 2026 is charged by Auto Top Up as before. A card saved later is charged only after it has passed your bank's check (3-D Secure) once. Saving a card on the **Billing** page asks for the check. A card added through the API qualifies after a card top-up on the **Billing** page in which your bank completes the check; a completed payment alone is not enough. ## Accounts with only a hotkey {#hotkey-only-accounts} An account can have a Bittensor hotkey and nothing else: no e-mail address and no password. - **How it opens:** by the hotkey's first sign-in after it paid in SN51 gamma (see **Gamma without a Lium account** above), or, from subtensor runtime 493, by its first spend of gamma at Lium's service, with no sign-in. A hotkey once linked to an account and then unlinked never opens one: link it to an account again before paying, and its spends are credited there. - **Signing in on lium.io:** **Log in → or sign in with a Bittensor wallet**, pick the hotkey in Polkadot.js, Talisman or SubWallet and sign the message; nothing is sent on chain. From the CLI or a script, `POST /api/gamma/hotkey-account` returns an API key, and a btauth/1-signed request needs none. - **What it cannot do yet:** create volumes or turn on backups. Both need one completed top-up, and gamma credit does not count, so they answer 402 until the account has a top-up of another kind. It also gets no e-mails, balance warnings included. ## Transfer credits **Billing → Transfer credits** sends part of your balance to another account. - **Card top-ups wait 14 days:** credit paid by card can be transferred 14 days after the payment. Renting uses it at once. Accounts whose first payment is more than 30 days old are not held. - A held transfer is refused with the amount you can send now and the date the rest can be sent. - **Recipient not found:** an e-mail with no account, or an account that cannot receive credits, gets the same answer. Check the address with the recipient. ## When the balance runs out - To rent, your balance must be above **15 minutes** of the pod's hourly price plus 15 minutes of each open pod. Some older accounts need more. - You get an e-mail when your balance is about to run out, if your account has an e-mail address (an account opened by a wallet or hotkey sign-in has none, so it gets no e-mails; if you set a [low balance webhook](./balance-warnings#low-balance-webhook) and threshold alerts are on (**Low Balance** ticked, and not turned off through the API), Lium makes one webhook delivery attempt, with no retry, each time the balance drops below your threshold). Set when in **Notification Settings** on your profile. See [Balance warnings](./balance-warnings). - When the balance reaches zero, your pods keep running for **2 minutes**. If a volume egress charge takes a positive balance to zero or below, they keep running for **60 minutes** instead. Pod time is still charged. If the balance is still zero or below at the end, they are stopped (a [bare-metal](./create-pod#bare-metal) rental is ended instead; Lium does not wipe that machine, its files stay until the provider reinstalls it): a managed container pod's volume folder (`/root`, or the folder its template mounts) is kept for up to **24 hours** at no charge; an attached Volume at `/mnt` is not touched, and everything else is deleted at the stop. Top up and reboot the pod to get it back, if the node still has its GPUs free (they go back to the node when the pod stops); after 24 hours or at a termination you scheduled earlier, it is deleted. A pod's first stop always gets the full 24 hours. If it is stopped again after that grace has ended, the disk is kept for as long as the pod was charged since the stop that began that grace, up to 24 hours; time refunded for an outage does not count. - Volumes and backups keep charging until you delete them. ## Quote a job before you rent `GET /executors/{executor_id}/quote?hours=…` returns the compute, volume and backup cost of a job on that node. Optional: `gpu_count`, `volume_gb`, `backup_gb`. It needs no key and reserves nothing. ```bash curl -s "https://lium.io/api/executors//quote?hours=24&gpu_count=8&volume_gb=200" | jq '{total_usd, lines}' ``` ## See what you spent The **Billing** page shows your balance and daily spend. Each pod has a [statement](./statements). --- # Pod statements A **statement** lists the charges for one pod. It stays available after you remove the pod. ## Where to find it **All pods in a period** Open **Billing** and scroll to **Pods in this period**. Expand a pod to see its charges. **One pod** In **Your Pods**, open the pod's menu and click **Billing statement**. **Removed pods** In **Your Pods**, click **Statements for removed pods**. ## Pick a period **Show any start and end date** 1. Open **Billing**. 2. Click the date field next to the period arrows. 3. Pick the start day, then the end day. The chart and **Pods in this period** switch to that range. The arrows still step one month back or forward. ## What a statement shows - **Total**: what your balance was charged for the pod. - **Time billed**: the total time charged. - **Price**: the hourly price. Two prices mean it changed during the rental. - **Rented / Removed**: start and end of the rental, and why it ended. - **Ledger rows**: one or more rows per UTC day, oldest first. Pods are charged every 5 minutes, and every minute once less than 10 minutes of balance is left.
For agents and automation: API Both routes are under `https://lium.io/api` and accept an `X-API-Key` header: - `GET /billing/statement?start_day=YYYY-MM-DD&end_day=YYYY-MM-DD`: every pod in the period. - `GET /pods/{id}/statement`: one pod, before or after removal.
## Run record A **run record** is one page about a pod you can keep to repeat or cite the run: what it ran on, when, and what it cost. Like the statement, it stays available after the pod is removed. | Field | Meaning | |-------|---------| | `pod_id`, `pod_name` | The pod's ID and name. | | `removed` | `true` once the pod is removed. | | `executor_id` | The node the pod ran on last. | | `gpu_name`, `gpu_count` | GPU model and count. | | `image` | The image reference the container was started from. It ends in `@sha256:…` when the template pins a digest; a tag alone can point at a different image later, so pin a digest in the template when the exact image matters. | | `launch_snapshot.template_id` | The template row the container was started from: usually the pod's own copy of the template you picked, removed with the pod. | | `launch_snapshot.source_template_id` | The template you picked, when `template_id` is the pod's copy of it. Empty when the pod ran on the template itself (a one-time template) and for a pod whose container came up before this was recorded. | | `launch_snapshot.image` | The image reference recorded when the container came up; `image` above is this value when the snapshot exists. | | `launch_snapshot.gpu_driver`, `launch_snapshot.cuda_driver` | NVIDIA driver build and the highest CUDA version it supports, as the node reported them when your container came up. | | `launch_snapshot.gpu_interconnect` | `nvlink` when every GPU pair on the node is joined by NVLink, `pcie` when at least one pair is not. Empty on a single-GPU node. | | `launch_snapshot.recorded_at` | When the container came up and these values were recorded. | | `created_at`, `removed_at`, `close_reason` | Rental start and end, and why it ended. | | `total`, `billed_seconds`, `price_segments` | What you were charged, the same figures as the statement. | If the pod was rebooted, moved to another node, or switched to another template, the record describes the last container that came up. Pods whose container came up before run records existed have no `launch_snapshot`; `image` then comes from the rental. ```bash curl https://lium.io/api/pods//record -H "X-API-Key: $LIUM_API_KEY" ``` The route answers `404` under the same rule as `GET /pods/{id}/statement`. `GET /version` lists `"run_record"` under `features` on a backend that serves this route, so a client can tell a backend without it from a pod that is not yours. --- # Low balance warnings Pods are billed every 5 minutes, and every minute once less than 10 minutes of balance is left. Lium warns you before your balance runs out. ## The three warnings - **Your own threshold**: one email when your runway or balance drops below what you set. - **60 minutes left**: one email. - **15 minutes left**: one more email. The time left counts a price rise already set on your pods: an [intro price](./billing#what-is-charged) that ends, or a price raise you were told about. A warning comes before the higher price starts, not after. These are emails, so they reach only an account with an email address. An account opened by a wallet or hotkey sign-in has none and gets none of them. For your own threshold, use the [low balance webhook](#low-balance-webhook) instead; the 60- and 15-minute warnings have no webhook, so watch the [banner in the web app](#the-banner-in-the-web-app) (or `balance_warning` from `GET /users/me`) for the time left. **Set your thresholds** Open **Profile → Notification Settings**, tick **Low Balance** and set the hours or amount. Untick **Low Balance** to turn off all three emails. ## When the balance reaches zero Your pods keep running for 2 more minutes. Top up in that time to keep them. If a volume egress charge takes a positive balance to zero or below, you get 60 minutes instead. Pod time is still charged. If the balance is still zero or below, your pods are stopped and you get an email. An account with no email address (opened by a wallet or hotkey sign-in) gets no email: the stopped banner in the web app and, if you set one, the [`pods_stopped_insufficient_balance` webhook](#low-balance-webhook) tell you instead. A [bare-metal](./create-pod#bare-metal) rental is ended instead: Lium does not wipe that machine, and your files stay on it until the provider reinstalls it, so arrange removal of your data with the provider. The rest of this section is about managed container pods. A stopped pod keeps its volume folder (`/root`, or the folder its template mounts) for up to 24 hours and is not charged. An attached [Volume](./volumes) at `/mnt` is not touched. Everything else on the pod is deleted at the stop: packages installed outside that folder, other folders, and Docker images or containers run inside the pod. Top up and reboot it to get it back with the files in that folder, if the node still has its GPUs free (they go back to the node when the pod stops). After 24 hours, at a termination you scheduled earlier, the pod and its disk are deleted. A pod's first stop always gets the full 24 hours. If it is stopped again after that grace has ended, the disk is kept for as long as the pod was charged since the stop that began that grace, up to 24 hours; time refunded for an outage does not count. If the provider removes the node first, the pod is removed then and its volume folder can no longer be recovered through Lium; an account with an email address gets an email. Backups are not affected: the stopped email names each pod whose last automatic backup we kept and the date it is kept until (without an email address, find them on the **Backups** page). To get those files back, top up, rent a new pod and restore the backup to it from the **Backups** page (see [Restores](./restores)). A backup you created yourself is stored in your own backup storage, which is kept only while your account can pay for it. Volumes keep charging until you delete them. ## The banner in the web app A banner at the top of every page shows when: - your balance runs out in 60 minutes or less, - your pods were stopped for insufficient balance, - your **Auto Top Up** card was declined. Each banner links to **Billing** so you can top up.
For agents and automation: API `GET /users/me` returns the same warning as `balance_warning`. It is `null` when there is nothing to say. ```bash curl -s https://lium.io/api/users/me -H "X-API-Key: $LIUM_API_KEY" | jq '{balance, balance_warning}' ``` `kind` is `runway`, `pods_stopped` or `auto_top_up_failed`. `auto_top_up_on` is `true` when Auto Top Up is set and charging.
## Low balance webhook For agents and scripts: Lium can POST each warning to your own URL. **Set the URL** ```bash curl -s -X PUT https://lium.io/api/users/me/low-balance-webhook \ -H "X-API-Key: $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"url": "https://example.com/lium-hook"}' ``` The URL must be public HTTPS, on your own host (a `lium.io` address is refused). The answer has a `secret`: save it, it is shown only once. Setting the URL again gives a new secret. `GET` shows the URL, `DELETE` removes it. A read-only key can read it; changing it takes a key with `rent` or `manage`. **The events** | `event` | When | |---|---| | `low_balance` | Your own threshold is crossed, once per dip, while threshold alerts are on (**Low Balance** ticked, and not turned off through the API). Sent whether or not the account has an email address. | | `balance_grace_started` | The balance reached zero. `data.pods_stop_at` is when your pods stop unless you top up. | | `pods_stopped_insufficient_balance` | Your pods were stopped. `data.pod_ids` lists them. | | `provider_message` | The provider of a machine you rent sent you a notice. `data` has `pod_id`, `message` and `sent_at`. The pod page shows it too. | | `pod_restart` | Lium restarted one of your pods, or asked its machine to, because a GPU stopped responding or the pod's GPU set changed. `data` has `pod_id`, `pod_name`, `cause` (`not_responding` or `gpu_set_moved`) and `result` (`requested`, `restarted` or `not_restarted`). Sent once per restart, after the email (right away when the account has no email address). | | `pod_gpu_fault` | A GPU of a pod you rent dropped out or failed a health check. `data` has `pod_id`, `pod_name`, `headline` and `detail`, the same words as the email. | | `pod_gpu_recovered` | That GPU is back. `data` has `pod_id`, `pod_name`, `headline` and `detail`. | Each POST is JSON: `id`, `event`, `created_at`, `user_id` and `data` (balance and details). Lium makes one delivery attempt per event, with a 10-second timeout and no retry: if your endpoint is down or answers an error, that warning is not sent again (a `low_balance` breach counts as told either way). Answer with any `2xx`. **Check the signature** `X-Lium-Signature` is `sha256=` + HMAC-SHA256 of `.` with your secret. ```python import hashlib, hmac def is_from_lium(secret: str, timestamp: str, body: bytes, signature: str) -> bool: expected = "sha256=" + hmac.new(secret.encode(), timestamp.encode() + b"." + body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, signature) ``` Reject a timestamp more than 5 minutes old. --- # Broken pods A pod with the red status **BROKEN** was **force-closed by the GPU provider**. The container and the rental are gone. ## What it means for you - **Billing has stopped.** On a Secure node you are also **credited** for the interrupted rental; on a Spot node you are not ([When a pod is charged](./billing#when-a-pod-is-charged)). - **The credit can be withdrawn after review.** If the Lium team finds the provider was not at fault, the credit is charged back. You get an email with the reason, and the charge-back line on your billing page carries it too. - **Data is gone** unless it was on a [Volume](./volumes) or in a [Backup](./backups). ## What to do **Delete the pod** Open the pod and click **DELETE**. It is the only action a broken pod allows. **Rent another node** Click **Rent another `` node** on the pod page. Browse Pods opens with the same GPU model and count, without the node that failed. To rent the same node again, just rent it: Lium deletes your broken pod there first. A broken bare-metal pod must be deleted by hand before you rent its node again. ## When a pod fails to start {#when-a-pod-fails-to-start} - **The node failed:** Lium first tries another node with the same GPU at the same or lower price. The pod stays **PENDING** a bit longer. - **CREATION_FAILED:** the pod never ran and you are **not billed**. Use **Rent another node**. - **FAILED:** the pod started but its SSH check failed. Lium reboots it after about 30 minutes, and billing resumes then. Delete it if you don't want it back. - **Container stopped:** if a running pod's container stops and cannot start again, Lium reboots it, usually within about an hour and at most once a day, and emails you. The container is recreated: data on the pod's local disk (usually `/root`) and attached [Volumes](./volumes) is kept; files elsewhere are lost. Check the pod page for the result. - **REBOOT_FAILED:** if that reboot fails, Lium tries again after 10 minutes, 30 minutes, then every hour, while the node is online and the container is still down. These retries send no separate automatic-reboot notice. If the pod's local disk is no longer on the node, no reboot can bring it back: Lium does not retry, and you are **not billed** while the pod stays REBOOT_FAILED. Delete it, or reboot it yourself (billing resumes then); to get your files back, restore a [backup](./restores) to a new pod. When you pick the next node, the **Reliability**, **Uptime** and **Download** filters on Browse Pods help you avoid a repeat. **Provider notes** on a card, such as *May reboot occasionally*, are notes the provider picked from a fixed list. --- # If your pod disappears A pod can leave **Your Pods** without you deleting it. Here is how to find out why, and how to never lose more than a few minutes of work. ## Why a pod goes away | What you see | What happened | |---|---| | Pod gone at a time you set | [Scheduled termination](./scheduled-termination) | | Pod gone, balance near zero | Your balance ran out | | Pod gone, nothing else changed | Someone or an agent on your account deleted it: any API key can delete any pod | | Pod gone after an e-mail about the machine | The provider took the machine off after notice ([Provider maintenance](./provider-maintenance)) | | Status **BROKEN** | The provider force-closed it ([Broken pods](./broken-pods)) | | Status **CREATION_FAILED** | The pod could not start. The pod page shows which step failed. | | Status followed by **· NODE OFFLINE** | The node stopped answering. Once the validator finds it down or it is marked inactive, the badge adds **billing paused** and the pod is not charged until the node is back. The pod page shows since when it is offline and how often it came back in the last 30 days, to help you choose between waiting and renting another node. After an hour offline you get an e-mail, and another when the pod is back. If the node is back but the pod does not answer SSH for 30 minutes, Lium reboots it once. | | Status followed by **· SSH NOT RESPONDING SINCE** a time | SSH to the pod stopped answering, for example after its host restarted. Billing is unchanged. It clears when SSH answers again; if it does not after a few minutes, reboot the pod or rent another node. A reboot recreates the container: the pod volume (usually `/root`) and attached [Volumes](./volumes) are kept, running jobs and other files are lost. | | Status **REBOOT_FAILED** | A reboot could not recreate the container. The pod stays reserved; billing may pause when a check identifies its node as unreachable. While the node is online, Lium keeps retrying the reboot (after 10 minutes, 30 minutes, then every hour). You can also reboot it yourself or delete it. | ## Where to look **Your Pods** Is the pod listed with a red status, or gone? **Account events** Run the command below. A `pod-delete.success` at the time the pod went away means a key on your account deleted it. Removals by the platform don't show here. ```bash curl -s https://lium.io/api/users/me/events -H "X-API-Key: $LIUM_API_KEY" \ | jq -r '.[] | "\(.created_at) \(.event_type) \(.event)"' ``` **Billing history** The rental row shows when billing stopped. Give each job or agent its own [API key](./api-keys) so you can tell them apart. ## Keep your work safe A pod is compute, not storage. - **Upload results as you go** to a store you control (S3, Hugging Face, your server). - **Hash each file when it's finished** and check the hash before reusing it: ```bash sha256sum outputs/run7.mkv >> outputs/SHA256SUMS # once per finished file sha256sum -c SHA256SUMS # before you use the files again ``` - **If a hash doesn't match**, download the good copy again and move to another machine. --- # Discord support A rented pod can open a private Discord channel with you, the GPU provider and Lium support. Use it for SSH trouble, restarts, networking, performance or container problems. ## Connect Discord **Sign in** Sign in to [lium.io](https://lium.io), open the account menu at the bottom of the sidebar and click **Account Settings**. **Connect** In the **Discord** section, click **Connect Discord** and approve the prompt. The section then shows **Connected**. The provider must have connected Discord too ([Provider Discord setup](../providers/portal/discord.md)). ## Request a support channel **Open the pod** In **Your Pods**, open the pod that needs help. **Request the channel** Click **Request Discord Support**. The channel opens in a new tab. Lium posts the pod's details there, so you don't need to. If the pod already has a channel, the button reads **Open Discord channel**. Don't paste secrets, private keys or API keys into the channel. ## When the pod is removed Lium saves the channel's messages to the pod's event log first (`GET /pods/{pod_id}/events`). If the pod ended in a failure, the channel stays open as Lium's support case. Otherwise it is deleted. ## If it doesn't work The pod page shows a short sentence saying what is missing, e.g. **Connect Discord first.** or **Provider has not connected Discord.** Follow it, or contact Lium support with the pod ID. If Discord doesn't open, allow popups for `lium.io` and click again. --- # Workspaces A **workspace** is what a team shares: pods, API keys, volumes, templates, backup configurations and one balance. Every account has a **personal workspace**. A team is another workspace you create and invite people into. A template with a private image pulls it in a team only with a registry login saved with its registry host (**Access → Docker Credentials**). A login saved without a host is used only for its owner's own rents. ## Roles | | owner | admin | member | |---|---|---|---| | Use pods, volumes, templates and backups | ✓ | ✓ | ✓ | | Manage API keys | ✓ | ✓ | - | | Manage members and roles | ✓ | ✓ (not `owner`) | - | | Delete the workspace | ✓ | - | - | The **billing owner** is the account whose balance pays for the workspace. Your personal workspace is always paid from your own balance; to share billing, create a team workspace. When a billing transfer is accepted, the workspace's pods, volumes, API keys, templates and backups move to the new billing owner, backups made before the transfer included. Those older backups stay billed to the previous billing owner until they expire or the new billing owner deletes them, and the previous billing owner cannot delete their backup volume until then. ## Switch workspace Use the **workspace switcher** at the top of the sidebar navigation, below the balance. Open **Workspace settings** to rename, manage members, invite people or transfer billing. ## Invitations {#invitations} **Invite someone** In **Workspace settings**, use **Invite by e-mail** and pick a role, or run `lium workspaces invite`. To make a member an owner, pick **owner** as their role: they get an owner invitation and become owner only when they accept it. **Accept or decline** The person opens the link in the e-mail within **7 days**, signed in as the invited address, and accepts or declines. Nobody joins a workspace, or sees anything in it, before accepting. ## API keys An API key belongs to **one** workspace, chosen when you create it. Everything it does is billed to that workspace. To work in a team from the CLI or SDK, create a key in that team. ## API and CLI - API: see [Workspaces API](/developers/workspaces-api). - CLI: `lium workspaces`, `lium workspaces use `, and `lium keys create --workspace --save`. See [`lium workspaces`](/developers/cli/reference/workspaces). --- # Renter overview A pod is one GPU rental: a container on a provider's machine, with its own GPUs and SSH access. ## Security Security depends on the machine you pick. - **CVM machines** encrypt your pod's memory in hardware, and you can verify the VM's attestation yourself ([Private models](./private-models.md)). - **Non-CVM machines** may let the provider access your pod. Never put secrets on them. Read [Create a pod](./create-pod.md) before you deploy. For the full model, see the [CVM guide](../providers/nodes/cvm.md). --- # Pod Security :::warning Keep your secrets off standard nodes On a standard node the provider operates the host and can read a running pod's files, environment and memory, so never put wallet private keys or seed phrases on it; use a [Confidential Computing](#confidential-computing) node for those and fetch other secrets at runtime ([Handling credentials](#handling-credentials)). ::: ## What a provider can see on a standard node A standard node is any node that is not CVM-enabled. Its provider has full access to the host, so they can: - **Read files** inside your pod. - **Read environment variables**, including secrets passed with `--env` or `.env` files. - **Read process memory**, including loaded keys and tokens. Doing this is forbidden by the [rental privacy rules](../providers/rental-privacy.md). If you think it happened, report it through [official Discord support](../security/official-support-and-scams.md#the-safest-way-to-contact-lium-support). ## Other pods on the same node Another customer's pod on the same node cannot connect to your pod. It can only reach the ports Lium publishes, like anyone else. Pods started before this protection shipped get it only after a re-deploy. ## Never put these on a standard node - Wallet private keys and seed phrases - SSH private keys - Cloud and API tokens (OpenAI, Hugging Face, AWS and similar) - Database passwords - Proprietary model weights ## Confidential Computing {#confidential-computing} CVM-enabled nodes run your pod in an Intel TDX confidential VM: its memory is encrypted in hardware, and you can verify the VM's TDX attestation yourself ([Private models and datasets](./private-models)). Nodes are labeled CVM-enabled in the UI. If a node is not labeled, assume the provider can access your pod. Through the API, each node in `GET /executors` carries the label in its `specs` object: | Field | Meaning | |-------|---------| | `specs.tdx_attestation_passed` | `true` when the node's Intel TDX attestation was verified and its GPU attestation did not fail. This is the CVM-enabled label; the CVM filter and badge on Browse Pods read the same field | | `specs.tdx_host_supported` | `true` when the host CPU supports Intel TDX, `false` when it does not, `null` when not measured. Support alone does not make a node CVM-enabled | There is no query parameter for it, so filter the listing yourself: ```bash curl -s "https://lium.io/api/executors" \ | jq '[.[] | select(.specs.tdx_attestation_passed == true)]' ``` See the [CVM guide](../providers/nodes/cvm.md) and [Private models and datasets](./private-models). ## Handling credentials {#handling-credentials} If you must use a standard node: - **Fetch secrets at runtime** from a secrets manager. Don't bake them into the image. - **Use short-lived tokens** with the smallest scope. - **Rotate every secret** you used once the pod is gone. [Encrypted local volumes](./encrypted-volumes) protect data at rest only, not a running pod. ## Attesting from inside your pod {#attesting-from-inside-your-pod} On a Confidential Computing node, your pod can prove it runs inside the node's TDX VM. Every pod gets a [dstack](https://github.com/Dstack-TEE/dstack) socket at: ``` /var/run/dstack.sock ``` **Get a quote** ```python from dstack_sdk import DstackClient client = DstackClient() # dials /var/run/dstack.sock quote = client.get_quote(b"my-64-byte-nonce-or-key-hash") info = client.info() # app_id, tcb_info (RTMRs, event log), app compose ``` - **Only `GetQuote`, `Info` and `Version` work.** Key-derivation calls return 403; bring your own keys. - **Put your key hash or a nonce in `report_data`** (up to 64 bytes) so the quote is bound to your session. - **The measurements cover the node, not your image.** **Verify the quote** Use the dstack verifier or any Intel DCAP quote verifier. [Private models and datasets](./private-models#4-verify-the-quote-and-release-the-key) has the full flow. --- # API Keys An API key lets the **CLI**, the **SDK**, an **AI agent** or your own scripts use Lium as you. To just rent a GPU and SSH in, use the dashboard ([Quickstart](./quickstart)). Anyone with your key can rent pods billed to your account. Treat it like a password, and never put it in a public repo or a non-CVM pod. ## Create a key **Open API Keys** In the sidebar, open **Access**, then **API Keys**. **Add a key** Click **ADD NEW +**, give it a **Name** (e.g. `cli-laptop`, `claude-agent`) and click **ADD**. Copy the key. ![Access page → API Keys tab](./assets/api-keys-list.png) ## Use the key Send it in the `X-API-Key` header: ```bash export LIUM_API_KEY=sk_yjujqGP...full-key curl https://lium.io/api/pods \ -H "X-API-Key: $LIUM_API_KEY" ``` For the CLI: ```bash pip install lium.io # or: curl https://lium.io/install.sh | sh lium init # guided login (or set LIUM_API_KEY in your env) lium ps # list your pods ``` For the [SDK](/developers/sdk), set `LIUM_API_KEY` in the environment. See [API Authentication](/developers/authentication). ## Scopes {#scopes} Scopes limit what a key can do. They are set when you create the key and can't be changed later. | Scope | Lets the key | |---|---| | `read` | see all pods, nodes, templates, volumes and spend | | `rent` | create pods, templates and volumes | | `manage` | reboot, reset GPUs, edit or delete pods it did not rent; change or delete the account's volumes, templates, SSH keys and registry logins (with `account` pod visibility) | | `billing` | move money: top-ups, card payments, credit transfers to another account and Auto Top Up settings | A key made without choosing gets `read`, `rent` and `manage`, never `billing`. In the dashboard, ticking a scope also ticks the ones above it in the list (`billing` ticks `read`, `rent` and `manage`); untick any of them if the key should not have it. Every key can always manage the pods it rented itself, and edit or delete the templates it created. Create a scoped key from a signed-in session with `POST /keys`: ```json {"name": "claude-agent", "scopes": ["read", "rent"]} ``` `GET /keys/scopes` lists every scope and what it allows. ### The `billing` scope {#the-billing-scope} A key needs `billing` to pay or move money. It is never on by default. Pick it next to `read`, `rent` or `manage` for one key that both rents and pays, or alone for a key that can't see or rent pods. A key with `billing` is shown only once, when you create it. Its top-ups and credit transfers count toward its [budgets](#budgets), so they can stop it from renting more. Its pods are deleted on their own charges plus its credit transfers, never because of a top-up. A key with `billing` can: - **Top up by card**: `POST /payments/topup` charges a saved card, or `POST /stripe/create-checkout-session` opens a checkout. - **Set Auto Top Up**: `PUT /users/me/auto-top-up` with `threshold` and `amount_to_top_up`. Only a key without a budget can set it. - **Turn Auto Top Up off**: `DELETE /users/me/auto-top-up`. ## Pod visibility Set `"pod_visibility": "own"` when you create a key and it sees only the pods it created. With `"account"` it sees every pod on the account. ## Budgets {#budgets} A key can have a **daily**, **monthly** and **lifetime** budget in USD (at least $1 each): - **A key at a budget can't rent a pod or create a volume** (`402`). A rental is also refused when the budget has no room left for the pod's first 15 minutes. - **When spend reaches a budget, that key's running pods are deleted.** Billing of running pods stops at the budget, but time already used is still charged: a pod on an image that is not the node's default is charged from the deploy request, so a long start can take the key past its budget. Data outside a volume or backup is lost. - **A volume the key created counts too**: its storage and downloads are the key's spend. Set budgets with `POST /keys`, or change them later with `PATCH /keys/{id}` from a signed-in session: ```bash API=https://lium.io/api # at creation: $20 a day, $300 a month, $2000 over the key's life curl -X POST $API/keys -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \ -d '{"name": "agent-1", "scopes": ["read", "rent"], "daily_budget_usd": 20, "monthly_budget_usd": 300, "max_budget_usd": 2000}' # later: raise the daily budget curl -X PATCH $API/keys/$KEY_ID -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \ -d '{"daily_budget_usd": 40}' ``` ## Delete a key On the **Access → API Keys** row, click 🗑️ **Delete**. The key stops working at once. To rotate, delete it and create a new one. ## Who did what on the account {#who-did-what-on-the-account} Every pod event (created, rebooted, deleted, failed) is logged with the key that caused it. Read it with `lium audit` or: ```bash curl -s https://lium.io/api/users/me/events -H "X-API-Key: $LIUM_API_KEY" \ | jq -r '.[] | "\(.created_at) \(.event_type) \(.event)"' ``` ## Key hygiene {#key-hygiene} - **One key per agent or integration**, so you can revoke one without the others. - **Give agents `own` visibility and a budget.** - **No `billing`** unless the key's job is to pay. - **Set an expiry** for short-lived keys. - **Never bake keys into images or templates**, or store them in a non-CVM pod ([Pod security](./security)). --- # Developers Use Lium from code: the REST API, the CLI, the Python SDK, MCP and llms.txt. The URLs below are stable. Short on time? [Quickstart by task](/developers/quickstart-by-task) has a few-command path for each common job (quick experiment, training, vLLM, rent by spec, clusters, spend control), and [What's live on lium.io](/developers/availability) lists every live capability by surface. ## For AI agents Start at **[AI Agents](/developers/agents)**, then read [Scripting for agents](/developers/agent-scripting) for non-interactive use. - [`https://docs.lium.io/mcp`](/developers/mcp): docs MCP server, with live GPUs and prices - [`https://docs.lium.io/llms-full.txt`](/developers/llms-txt): all docs as one markdown file - [`https://lium.io/api/openapi.json`](/developers/api): live OpenAPI spec - [`curl -fsSL https://lium.io/install.sh | bash`](/developers/cli/overview): the CLI ## For developers One package, `lium.io`, ships the CLI and the Python SDK. Both use the key in `~/.lium/config.ini`. **1. Install** `pip install lium.io` or `curl -fsSL https://lium.io/install.sh | bash`. See [CLI installation](/developers/cli/installation). **2. Sign in** `lium signup` (new account) or `lium init` (existing account). See [`lium signup`](/developers/cli/reference/signup) and [`lium init`](/developers/cli/reference/init). **3. Rent and use a pod from the shell** `lium ls` → `lium up` → `lium ssh` / `lium exec` → `lium rm`. See the [CLI quickstart](/developers/cli/quickstart). **4. Do the same in Python** Use `Lium()`. See the [SDK](/developers/sdk) and the [pod lifecycle example](/developers/sdk/examples/pod-lifecycle). **5. Run one function on a GPU** Use `@lium.machine`. See [SDK → `@lium.machine`](/developers/sdk#liummachine-decorator) and the [remote inference example](/developers/sdk/examples/machine-inference). **6. Call the REST API** Send your key in `X-API-Key`. See the [Developer quickstart](/developers/quickstart) and [API](/developers/api). The live Swagger UI is at [lium.io/documents](https://lium.io/documents). ## Community clients Built and maintained by the community, not by Lium. Review the code before you give it your API key. - [gpu402](https://github.com/GPU402/gpu402/tree/7293884dc278e2a2ec25d1df5240a4f6fb6810c7) (TypeScript): typed Lium client generated from the OpenAPI spec, with rent-cheapest, wait-until-ready, SSH exec, stop and budget helpers. `npm install --save-exact gpu402@0.2.0` (the reviewed version) --- # Give Claude Code a GPU in 60 seconds Claude Code already runs shell commands, so the `lium` CLI is all it needs to rent a GPU, run code on it, bring results back and remove the pod. Setup takes three things from you: an API key with narrow scopes and a budget, one `pip install`, and a short instruction for the agent. In the run this page was written from (15 Oct 2026, CLI 0.16.1), `lium up` returned a ready RTX 5070 Ti pod on the default PyTorch template in **26 seconds**, and the first `lium exec` output arrived **30 seconds** after `lium up` started. The whole test cost $0.006: billing is per second with no minimum. ## 1. Create a key for the agent Give the agent its own key, not your account's default key. This one can list nodes and rent pods (`read`, `rent`), sees only the pods it created, and may spend at most $5 per UTC day. Sign in for a session token, then create the key with it. The session token is a secret too; keep it in a variable and do not hand it to the agent. ```bash API=https://lium.io/api JWT=$(curl -s $API/users/login -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "password": "…"}' | jq -r .token) RESP=$(curl -s $API/keys -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \ -d '{"name": "claude-code-20261015", "scopes": ["read", "rent"], "pod_visibility": "own", "daily_budget_usd": 5}') export LIUM_API_KEY=$(jq -r .key <<<"$RESP") # the agent's new key; the next step hands it to the CLI ``` `$RESP` carries the key and its budget (trimmed, key redacted): ```json { "id": "e9140f46-…", "name": "claude-code-20261015", "key": "sk_…", "masked_key": "sk_9ON3vu0T********", "scopes": ["read", "rent"], "daily_budget_usd": 5.0, "monthly_budget_usd": null, "max_budget_usd": null, "pod_visibility": "own", "spent_today_usd": 0.0 } ``` You can also add a monthly (`monthly_budget_usd`) or lifetime (`max_budget_usd`) budget, or `"pod_visibility": "own"` so the agent sees only the pods it rented. See [API keys](../pod-users/api-keys.md#budgets). ## 2. Install the CLI and hand it the key ```bash pip install lium.io lium config set api.api_key "$LIUM_API_KEY" # or just export LIUM_API_KEY; the CLI reads it ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519 # only if you have no SSH key yet; lium uses it to reach the pod lium whoami ``` ```text API key sk_9ON…q8U8 (config:~/.lium/config.ini [api] api_key) Account 076ed099-… Balance $176.10 API https://lium.io/api reachable, 1713 ms CLI lium 0.16.1 ``` ## 3. Tell Claude Code how to use it Paste this into your project's `CLAUDE.md` (or give it as the first instruction): ```markdown ## GPU compute (Lium) You can rent GPUs with the `lium` CLI. The API key is already configured (LIUM_API_KEY / ~/.lium/config.ini); never print it. Rules: - Pick a node with `lium ls --count 1 --format json` (cheapest first) unless I ask for a specific GPU. - Always rent with a name and a deadline: `lium up --name --ttl 1h -y --json`. Never rent without `--ttl` (or `--until`). - Run work with `lium exec ""`; use `lium exec -d ""` for anything long. - Bring results back with `lium scp -d`. - When the work is done, or anything fails, run `lium rm -y`, then `lium ps` to confirm it is gone. - Check spend with `lium spend`. If a rent is refused with API_KEY_BUDGET_EXCEEDED, stop and tell me. ``` ## 4. What the agent runs These are the exact commands from the test run, with their output. **Pick the cheapest single-GPU node:** ```bash NODE=$(lium ls --count 1 --format json | jq -r '.[0].huid') # gentle-eagle-11, 1×RTX 5070 Ti, $0.40/h ``` `--count 1` keeps to nodes that rent as one GPU. The bare `lium up --gpu A4000` at the time of the test matched only a 6-GPU node that does not split, and exited 1 with `node_selection_failed` and no pod created, so filtering in `lium ls` first is the reliable path. **Rent it with auto-removal after one hour:** ```bash lium up "$NODE" --name cc-demo --ttl 1h -y --json ``` Progress goes to stderr, the ready pod as JSON to stdout: ```text Est. deploy time: ~1m 0s (image: ~4.9 GB, download: 315 Mbps) renting gentle-eagle-11… pod cc-demo (id: 37943de0-…) created; waiting for it to become ready removal of pod cc-demo scheduled for 2026-10-15 04:04 UTC (in 1.0h), whether or not it becomes ready waiting for noble-comet-c6… PENDING (4 s) · est. ready any moment now (phase: mounting encrypted volume) waiting for noble-comet-c6… RUNNING (6 s) Pod noble-comet-c6 (name: cc-demo, id: 37943de0-…) ready ``` ```json { "pod": { "huid": "noble-comet-c6", "name": "cc-demo", "status": "RUNNING", "gpu_type": "RTX5070", "template": "Pytorch (Cuda + DinD)", "price_per_hour": 0.4, "removal_scheduled_at": "2026-10-15T04:04:47.189699", "api_key_name": "claude-code-20261015" }, "termination_time": "2026-10-15T04:04:47.189699+00:00" } ``` The removal is scheduled as soon as the pod exists, so it holds even if the agent's session ends before cleanup. **Run code on the GPU:** ```bash lium exec cc-demo "nvidia-smi --query-gpu=name,memory.total --format=csv" ``` ```text Executing on noble-comet-c6 name, memory.total [MiB] NVIDIA GeForce RTX 5070 Ti, 16303 MiB ``` The first connection to a pod also prints one line on stderr as the CLI pins the pod's SSH host key. ```bash lium exec cc-demo "python -c 'import torch;print(torch.cuda.is_available())'" ``` ```text Executing on noble-comet-c6 True ``` `lium exec` exits with the remote command's exit code, so the agent can branch on it. **Collect output:** ```bash lium exec cc-demo "mkdir -p /root/out && nvidia-smi --query-gpu=name,memory.total --format=csv > /root/out/gpu.csv \ && python -c 'import torch;print(torch.__version__, torch.cuda.get_device_name(0))' >> /root/out/gpu.csv" lium scp cc-demo /root/out/gpu.csv ./dl/ -d cat dl/gpu.csv ``` ```text name, memory.total [MiB] NVIDIA GeForce RTX 5070 Ti, 16303 MiB 2.12.0+cu130 NVIDIA GeForce RTX 5070 Ti ``` `lium scp` uploads by default; `-d` downloads. For whole directories going up, use `lium rsync`. **Check spend, then clean up:** ```bash lium spend lium rm cc-demo -y lium ps ``` ```text Pod Config $/h Uptime Spent Since (UTC) cc-demo RTX5070 $0.40 1m $0.01 2026-10-15 03:04 Removed 1 pod(s): noble-comet-c6 removed cc-demo: 1m at $0.40/h ≈ $0.01 ``` After `lium rm`, `lium ps` no longer lists `cc-demo`. Billing stopped at removal; the key's `spent_today_usd` read $0.006 for the run. **Delete the key when you are done with it** (from your session, not the agent's): ```bash curl -X DELETE $API/keys/$KEY_ID -H "Authorization: Bearer $JWT" ``` ## Why this is safe to hand to an agent - **Scoped key.** The key carries only `read` and `rent` and sees only its own pods, so it cannot touch other pods on the account. It cannot create other keys or raise its own budget: those need your signed-in session. - **A budget the server enforces.** A key at its daily budget, or without room left for a new pod's first 15 minutes, can't start a pod (`402 API_KEY_BUDGET_EXCEEDED`), and if running pods take the key to its budget, the pods that key created are removed. This happens on Lium's side, whatever the agent does. Details in [API keys → Budgets](../pod-users/api-keys.md#budgets). - **Automatic removal.** `--ttl` schedules the pod's removal on the platform the moment the pod exists, so a crashed or forgotten session still ends with no pod running. A key at its budget cannot push that removal later. See [Scheduled termination](../pod-users/scheduled-termination.md). - **Per-second billing.** A short experiment costs cents; this whole test cost under one cent. For the full agent integration (signup without a browser, self-funding, the agent skill), see [AI Agents](./agents.md) and [Scripting for agents](./agent-scripting.md). --- # Use Lium with SkyPilot (SSH Node Pools) [SkyPilot](https://docs.skypilot.ai/) runs AI jobs from one task file on many kinds of infrastructure. Its [SSH Node Pools](https://docs.skypilot.ai/en/stable/reservations/existing-machines.html) feature runs those jobs on machines you already have. A rented Lium pod can be that machine. This page covers one pod, with the SkyPilot client inside the same pod. Every command below was run in this order on 29 Nov 2026 (SkyPilot 0.14.3, an RTX 5060 Ti pod, Ubuntu 24.04). The last step ran a GPU job that ended with `Job finished (status: SUCCEEDED)`. ## What you need - A pod with more than 1 GiB of RAM. On a pod with 1 GiB, the SkyPilot API server exits on start (`SkyPilot API server process exited unexpectedly`). The pod that worked in the test had 22 GiB. - A GPU template on Ubuntu. The test used the PyTorch (CUDA + DinD) template on Ubuntu 24.04. See [Create a pod](../pod-users/create-pod.md). - An SSH session on the pod as root. See [SSH keys](../pod-users/ssh-keys.md). Run everything below on the pod. ## 1. Install SkyPilot and kubectl ```bash python3 -m venv /root/skyenv /root/skyenv/bin/pip install -q --upgrade pip /root/skyenv/bin/pip install -q "skypilot[kubernetes]==0.14.3" /root/skyenv/bin/sky --version curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v1.31.4/bin/linux/amd64/kubectl chmod +x /usr/local/bin/kubectl ``` ## 2. Let SkyPilot reach the pod over SSH SSH Node Pools connect to each node over SSH. Here the node is the pod itself, so give SkyPilot a key for the `root` user on `127.0.0.1`: ```bash mkdir -p /root/.ssh /root/.sky ssh-keygen -t ed25519 -N "" -f /root/.ssh/selfkey -q cat /root/.ssh/selfkey.pub >> /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys ssh -i /root/.ssh/selfkey -o StrictHostKeyChecking=no -o BatchMode=yes -l root 127.0.0.1 hostname ``` Then describe the pool in `~/.sky/ssh_node_pools.yaml`: ```yaml lium-pool: hosts: - 127.0.0.1 user: root identity_file: /root/.ssh/selfkey ``` ## 3. Run sky ssh up, then start k3s by hand ```bash /root/skyenv/bin/sky ssh up --infra lium-pool ``` The first run installs k3s, the Kubernetes runtime that SSH Node Pools use, and then fails with `Failed to read the k3s join token from the head node`. The k3s installer writes a systemd unit, but a Lium pod does not run systemd, so k3s never starts. Start it by hand and wait for the node to be Ready (86 seconds in the test): ```bash nohup /usr/local/bin/k3s server --write-kubeconfig-mode 644 > /root/k3s-manual.log 2>&1 & sleep 90 /usr/local/bin/k3s kubectl get nodes ``` Copy the k3s kubeconfig to where SkyPilot looks for it, then run `sky ssh up` again: ```bash mkdir -p /root/.kube cp /etc/rancher/k3s/k3s.yaml /root/.kube/config timeout 900 /root/skyenv/bin/sky ssh up --infra lium-pool ``` It prints `SkyPilot runtime is up [lium-pool]` and then waits for the NVIDIA GPU operator, which cannot start until step 4, so the command does not return by itself. Once you see `SkyPilot runtime is up`, press Ctrl+C (or let the `timeout` stop it, as in the test) and go to step 4. ## 4. Install socat and nc, and make the root mount shared The GPU operator pods stay in `Init:CreateContainerError` with `path "/" is mounted on "/" but it is not a shared or slave mount`. `sky check ssh` also needs `socat` and `nc`. Fix both, then restart the GPU operator pods: ```bash DEBIAN_FRONTEND=noninteractive apt-get update -q DEBIAN_FRONTEND=noninteractive apt-get install -y -q socat netcat-openbsd mount --make-rshared / /usr/local/bin/k3s kubectl -n gpu-operator delete pods --all --wait=false sleep 180 /usr/local/bin/k3s kubectl get pods -A ``` Every `gpu-operator` pod should be Running (the validator shows Completed). The node then lists one allocatable `nvidia.com/gpu`. ## 5. Check the pool and find the GPU name ```bash /root/skyenv/bin/sky check ssh /root/skyenv/bin/sky gpus list --infra ssh/lium-pool ``` `sky check ssh` should show `lium-pool: enabled`. Use the GPU name exactly as `sky gpus list` prints it. In the test that was `RTX5060-TI`; `RTX5060Ti` gave `No resource satisfying`. ## 6. Launch a job ```bash cat > /root/task.yaml <<'YAML' run: nvidia-smi YAML /root/skyenv/bin/sky launch -y -c t3 --infra ssh/lium-pool --gpus RTX5060-TI:1 /root/task.yaml /root/skyenv/bin/sky status /root/skyenv/bin/sky down -y t3 ``` In the test, SkyPilot considered `SSH (lium-pool) 4 vCPU 16 GB RTX5060-TI:1` and the job ended with `Job finished (status: SUCCEEDED)`. Replace `RTX5060-TI` with the name your pod shows. When you are done, copy off anything you want to keep first: deleting the pod deletes everything on it, including `/root` (the SkyPilot install, the pool file and your task files). Only a [Volume](../pod-users/volumes.md) mounted at `/mnt` keeps its data after the pod is deleted. Then delete the pod on Lium. Charging stops when you delete the pod, not when the SkyPilot job ends (see [Billing](../pod-users/billing.md)). ## What this page does not cover - **Several pods in one pool.** Tested on one pod only, with the client inside it. Ordinary pods expose TCP port maps, and a second k3s node would need ports a pod does not expose. For multi-machine jobs, see [Multi-node clusters](../pod-users/clusters.md). - **A pod restart.** Not tested: whether k3s has to be started by hand again after the pod restarts. - **A SkyPilot client on your own computer.** Not tested: running `sky` off the pod against a pool on it. --- # Quickstart by task Pick the job you have; each path is a handful of commands, with a link to the full page. Every command works with the current CLI and SDK (`pip install lium.io`, 0.16.1). Authenticate once with `lium signup` (new account) or `lium init` (existing key), or set `LIUM_API_KEY`. Billing is per second with no minimum, so a short run costs only the seconds it uses. ## Give my AI agent a GPU An agent with a shell can sign up, rent, run and release a GPU on its own. - Claude Code: [Give Claude Code a GPU](/developers/claude-code-gpu) - Any agent: [AI Agents](/developers/agents) for the no-account-to-running-pod path, then [Scripting for agents](/developers/agent-scripting) for JSON output, exit codes and teardown - Give each agent its own key with a budget: [API keys → Budgets](/pod-users/api-keys#budgets) ## Run a quick experiment ```bash lium up --gpu RTX4090 --name exp --ttl 1h -y --json # rent, wait, remove itself after 1 hour lium exec exp "nvidia-smi" # exits with the remote command's exit code lium scp exp ./experiment.py # upload to ~/experiment.py lium exec exp "python experiment.py" lium rm exp -y # done early? release it now ``` More: [CLI quickstart](/developers/cli/quickstart) · [`lium up`](/developers/cli/reference/up) · [`lium exec`](/developers/cli/reference/exec) ## Train a model Keep data on a volume (mounted at `/mnt`, survives the pod), back up checkpoints on a schedule, and run the job detached so your shell is free. ```bash lium up --gpu H100 --name train --volume new:name=train-data --ttl 2d -y --json lium bk set train --path /root/checkpoints --every 1h --keep 7d -y lium exec train -d --log /root/train.log "python train.py --data /mnt --out /root/checkpoints" lium exec train "tail -n 50 /root/train.log" # check progress any time lium scp train /root/checkpoints/final.pt ./ -d # pull the result back ``` More: [Volumes](/pod-users/volumes) · [Backups](/pod-users/backups) · [SDK training workflow](/developers/sdk/examples/training-workflow) ## Serve an LLM with vLLM Tested on lium.io (15 Oct 2026, one RTX 4090): Qwen2.5-7B-Instruct served in about 4 minutes from `lium up`, at about 61 tokens/s for one stream. vLLM goes into its own `uv` venv because the default template pins its own torch. ```bash lium up --gpu RTX4090 --name vllm --ttl 2h -y --no-ssh lium exec vllm 'uv venv -q /root/vllm-env && uv pip install -q --python /root/vllm-env vllm' export VLLM_API_KEY=$(openssl rand -hex 16) lium exec vllm -d --log /root/vllm.log -e VLLM_API_KEY=$VLLM_API_KEY \ '/root/vllm-env/bin/vllm serve Qwen/Qwen2.5-7B-Instruct --host 127.0.0.1 --port 8000 --max-model-len 8192' lium exec vllm 'tail -n 5 /root/vllm.log' # wait for "Application startup complete" $(lium describe vllm --json | python3 -c 'import json,sys; print(json.load(sys.stdin)["access"]["ssh_cmd"])') \ -N -L 8000:127.0.0.1:8000 & # tunnel: laptop 127.0.0.1:8000 -> the pod curl http://127.0.0.1:8000/v1/models -H "Authorization: Bearer $VLLM_API_KEY" ``` More: [vLLM server (SDK)](/developers/sdk/examples/vllm) · [Templates](/pod-users/templates) ## Rent the cheapest GPU that fits a spec under a price ceiling One API call picks the cheapest node that meets every constraint and rents it; `dry_run: true` returns the pick and price without renting. A node under a scheduled maintenance or removal notice that starts before the run ends (any notice, without `termination_hours`) is picked only when nothing else matches, so the pick can cost more; `notice_warning` in the answer names a notice on the node picked. ```bash curl -X POST https://lium.io/api/executors/rent-by-spec \ -H "X-API-Key: $LIUM_API_KEY" -H "Content-Type: application/json" \ -d '{"gpu_type": "H100", "gpu_count": 1, "min_vram_gb": 79, "max_price_per_gpu_hour": 2.5, "termination_hours": 4, "pod_name": "spec-pod", "dry_run": true, "user_public_key": "'"$(cat ~/.ssh/id_ed25519.pub)"'"}' ``` The same from Python: `Lium().rent(gpu_type="H100", max_price_per_gpu_hour=2.5, dry_run=True)`. From the shell, `lium ls --gpu H100 --max-price 2.50` shows what fits and `lium up --gpu H100` rents the cheapest match. More: [Rent by spec](/developers/quickstart#rent-by-spec) · [Error codes](/developers/error-codes) ## Multi-node training Rent whole nodes on one InfiniBand or RoCE fabric as a single all-or-nothing cluster, with launcher config printed for you. ```bash lium clusters # fabrics with free nodes lium clusters up 1 --nodes 2 --name job --ttl 12h -y lium clusters show job --hostfile # mpirun / DeepSpeed hostfile lium clusters show job --torchrun 0 # torchrun rendezvous flags for rank 0 lium clusters rm job -y # remove every member ``` More: [Multi-node clusters](/pod-users/clusters) · [`lium clusters`](/developers/cli/reference/clusters) ## Control spend ```bash lium up --gpu H100 --ttl 6h --budget 25 -y # removed after 6 h or at $25, whichever comes first lium spend # hourly burn, spend per pod, runway lium schedules list # every pod with a scheduled removal ``` Give each agent or job its own API key with server-enforced USD budgets (daily, monthly, lifetime); a key at a budget can't start a pod (`402 API_KEY_BUDGET_EXCEEDED`): ```bash curl -X POST https://lium.io/api/keys -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \ -d '{"name": "agent-1", "scopes": ["read", "rent"], "daily_budget_usd": 20, "monthly_budget_usd": 300}' ``` More: [API keys](/pod-users/api-keys) · [Billing](/pod-users/billing) · [Scheduled termination](/pod-users/scheduled-termination) ## Related - [What's live on lium.io](/developers/availability): every capability by surface - [Developer quickstart](/developers/quickstart): the REST API step by step --- # What's live on lium.io As of 2026-10-15. Every row below is live in production today. The CLI and SDK ship together as `pip install lium.io` (current release 0.16.1); a version in the status column is the oldest release that has the capability. **Check programmatically.** `GET https://lium.io/api/version` returns a `features` list of the optional API capabilities this build serves (for example `rent_by_spec`, `rent_idempotency`), so a client can test for one with a single request. `lium --version` prints the installed CLI and SDK version. | Capability | Surface | Status | |------------|---------|--------| | Browse nodes and rent a GPU pod | Dashboard · CLI `lium ls`, `lium up` · SDK `Lium.up()` · API `POST /executors/{id}/rent` | Live | | Rent part of a multi-GPU node (GPU splitting) | Dashboard · CLI `lium up -c N` · API `gpu_count` | Live | | Rent the cheapest node matching a spec under a price ceiling | API `POST /executors/rent-by-spec` (`max_price_per_gpu_hour`) · SDK `Lium.rent()` · CLI `lium up --gpu` | Live (SDK and CLI 0.0.39+) | | Headless signup, no browser | CLI `lium signup` · API | Live | | Run commands on a pod, foreground or detached, with the remote exit code | CLI `lium exec` (`--detach`, `--json`) · SDK `Lium.exec()` | Live | | Non-interactive mode (`--yes`, exit-2 instead of prompts) | CLI | Live (0.0.38+) | | Idempotent rent (`Idempotency-Key`: a retry never rents twice) | API rent, rent-by-spec and cluster rent | Live | | Auto-termination at rent time | Dashboard (Auto-Termination field) · CLI `lium up --ttl` / `--until` · API `termination_hours` | Live (set before the pod is ready since 0.0.42) | | See a node's maintenance or removal notice before renting | Dashboard (badge on the node) · API `GET /nodes` `scheduled_notice`, rent-by-spec dry run `notice_warning` | Live | | Rent-by-spec takes a node under a notice that starts within the run only when nothing else matches; rent answers name the rented node's notice (`notice_warning`) | API `POST /executors/rent-by-spec`, `POST /executors/{id}/rent` | Live | | Reschedule or cancel a pod's removal | CLI `lium rm --in` / `--at`, `lium schedules` · API `POST`/`DELETE /pods/{id}/schedule-removal` | Live | | Per-second billing, no minimum | All surfaces | Live | | API keys with scopes (`read`, `rent`, `manage`, `billing`) and pod visibility (`own`, `account`) | API `POST /keys`, `GET /keys/scopes` · Dashboard **ADD NEW +** (`read`, `rent`, `manage`) | Live | | Per-key USD budgets (daily, monthly, lifetime), enforced by the server | API `POST /keys`, `PATCH /keys/{id}` | Live | | Spend, burn rate and runway | CLI `lium spend`, `lium balance`, `lium billing` · Dashboard **Billing** | Live | | Top up by card, stablecoin or TAO | Dashboard **Billing** · CLI `lium topup`, `lium fund` | Live | | Docker-in-Docker on every pod (root, your own Docker daemon) | Every pod | Live | | Pod volume encrypted at rest by default on the default templates | Dashboard · CLI (`--volume-encryption`, on by default) · SDK · API `enable_volume_encryption` | Live | | Persistent volumes that outlive a pod | Dashboard · CLI `lium volumes`, `lium up --volume` · SDK | Live | | Scheduled backups and restore | Dashboard · CLI `lium bk`, `lium up --restore-backup` | Live | | Custom images and Dockerfile builds | Dashboard templates · CLI `lium up --image` / `--dockerfile`, `lium templates` · SDK `create_template()` | Live | | Run one Python function on a GPU (`@lium.machine`) | SDK | Live (0.0.40+) | | Multi-node clusters on one InfiniBand or RoCE fabric | Dashboard **Clusters** · CLI `lium clusters` · API `POST /executors/cluster/rent` | Live | | Copy files pod-to-pod, or to and from your machine | CLI `lium cp`, `lium scp`, `lium rsync` | Live | | Logs, SSH, port forwarding, Jupyter | CLI `lium logs`, `lium ssh`, `lium port-forward`, `lium up --jupyter` · Dashboard | Live | | Account audit log (who did what, from which key and IP) | CLI `lium audit` · API `GET /account/audit` | Live | | Request a sold-out GPU | Dashboard **Machine Requests** · CLI `lium request` | Live | | Continuous GPU performance scoring of every node | Platform (nodes failing checks are not rentable) | Live | | Permanent ban for providers who access renter workloads | Platform policy | Live (in force since 2026-08-19) | | Docs for agents: every page as markdown, `/llms.txt`, docs search MCP | [docs.lium.io](/developers/agents) | Live | ## Related - [Quickstart by task](/developers/quickstart-by-task): the shortest path for each common job - [AI Agents](/developers/agents): no account to a running pod, headless - [API keys](/pod-users/api-keys): scopes, pod visibility and budgets - [CLI reference](/developers/cli/reference) --- # AI Agents An agent can do everything on Lium with no browser: sign up, fund, rent, connect and remove pods. For script flags and exit codes see [Scripting for agents](./agent-scripting.md). - **Setting up Claude Code or Codex?** See [lium.io/agents](https://lium.io/agents). - **One file with everything:** [`lium.io/llms-full.txt`](https://lium.io/llms-full.txt). ## Get started in 5 min Use the CLI. Use the REST API only where the CLI cannot go. **1. Install the CLI and get an account** ```bash curl -fsSL https://lium.io/install.sh | bash export LIUM_API_KEY=sk_... # you already hold a key: nothing else to set up lium signup --email you@example.com # no account yet lium init --no-browser # account exists, no key; prints a URL a human approves ``` **2. Rent a GPU and connect** ```bash lium ls --format json # browse machines; pass the `id` field to up lium up --yes --no-ssh --ttl 1h --name job-1 # rent, return when ready, self-remove in 1 h lium exec "nvidia-smi" # run without a terminal (lium ssh is interactive) ``` **3. Add the Lium MCP server: live GPU search, prices and docs** ```json { "mcpServers": { "lium": { "url": "https://docs.lium.io/mcp" } } } ``` Or fetch all docs at once: `curl -sSL https://docs.lium.io/llms-full.txt`. **4. Use the REST API for the rest** ```bash curl -sSL https://lium.io/api/openapi.json ``` ## Pick the right surface | Goal | Use this | |------|----------| | Search the docs | [MCP endpoint](./mcp): `https://docs.lium.io/mcp` | | Load all docs at once | [llms.txt / llms-full.txt](./llms-txt) | | Read one page as markdown | Add `.md` to any docs URL | | Quote GPU prices with no account | [Price feed](./pricing-feed): `https://lium.io/pricing.json` | | Facts about Lium | [About page](https://lium.io/about) | | Call an endpoint the CLI does not wrap | [API](./api): `https://lium.io/api/openapi.json` | | Run pods from a shell | [CLI](./cli/overview) | | Get an account with no human | [Fingerprint signup](/pod-users/fingerprint-signup) | | Get an account and key from the terminal | [`lium signup`](./cli/reference/signup.md) | | Teach your agent Lium's commands | [Agent skill](https://github.com/Datura-ai/lium-skill): `npx skills add Datura-ai/lium-skill --skill lium` | | Automate the provider portal | [`lium provider`](./cli/reference/provider.md) | | Write Python | [SDK](./sdk) | ## Stable agent-facing URLs {#stable-agent-facing-urls} Safe to hard-code: ```text https://docs.lium.io/mcp # docs MCP JSON-RPC endpoint https://docs.lium.io/llms.txt # docs index + summaries https://docs.lium.io/llms-full.txt # all docs concatenated https://docs.lium.io/.md # raw markdown for any page https://lium.io/api/openapi.json # live platform OpenAPI 3.1 spec https://lium.io/documents # Swagger UI for the same spec https://lium.io/llms.txt # platform agent index: CLI + skill install https://lium.io/llms-full.txt # full CLI/SDK reference, self-contained https://lium.io/pricing.json # per-model GPU prices, JSON, no key https://lium.io/pricing # pricing hub; Accept: text/markdown for the markdown twin https://lium.io/gpu/ # one page per GPU model, same negotiation https://lium.io/api/public/v1/nodes # per-node inventory feed, no key https://lium.io/about # company facts with sources, HTML only, no key ``` A wrong URL on lium.io returns `404` with links to the sitemap, `llms.txt`, the docs and the API: in markdown for `curl`, in JSON with `Accept: application/json`. ## Start from no account **Fingerprint signup (no human)** ```bash curl -fsS -X POST https://lium.io/api/auth/signup \ -H "Content-Type: application/json" -d '{}' ``` Returns a login fingerprint and usually an API key. The fingerprint is shown once and cannot be reset: store it first. See [Signing up without an email](/pod-users/fingerprint-signup). **E-mail signup** ```bash lium signup --email you@example.com --json ``` Use the user's real e-mail. Confirming it is not needed to rent. **Credit** A new account starts with a zero balance. Top up to rent. **Signup to running pod** Renting needs a balance above 15 minutes of the node's hourly price (`hourly_price / 4`) plus 15 minutes of each open pod. Some older accounts need more. ```bash lium signup --email you@example.com --json # or POST /api/auth/signup for no email at all lium balance --json # must exceed 15 min of the node's hourly price lium ls --format json # pick a node lium up --yes --no-ssh --ttl 15m # rent it, return when ready, auto-terminate after 15m lium exec "nvidia-smi" # run something on it lium rm --yes # hand it back (--yes: without it, no terminal = nothing removed) ``` ## Authentication {#authentication} Send the API key in the **`X-API-Key`** header. The CLI and SDK send it for you. - **Have a key:** `export LIUM_API_KEY=sk_...`. It wins over `~/.lium/config.ini`. - **New account:** [`lium signup`](./cli/reference/signup.md) saves the key. - **Existing account:** [`lium init --no-browser`](./cli/reference/init.md) prints a URL and a session ID. After the user approves, run `lium init --session `. - **Check the key:** `lium balance --json`. (`lium ls` works with any key.) The docs surfaces (MCP, llms.txt, `.md` URLs) need no key. See [API Authentication](./authentication). ```bash export LIUM_API_KEY=your_api_key_here curl https://lium.io/api/pods -H "X-API-Key: $LIUM_API_KEY" ``` ## Self-funding (top up your own balance) **With crypto** ```bash # 1. Create a $20 USDT (TRON) invoice; capture the address + exact amount INVOICE=$(lium topup create -a 20 -c USDT -n tron --json) ADDRESS=$(echo "$INVOICE" | jq -r .deposit_address) AMOUNT=$(echo "$INVOICE" | jq -r .crypto_amount) # 2. Send exactly $AMOUNT USDT on TRON to $ADDRESS from your own wallet. # 3. Poll until the credit lands lium balance --json ``` See [`lium topup`](./cli/reference/topup.md). **With a saved card** Needs a card saved on the Billing page and an API key with the `billing` scope: ```bash curl -X POST https://lium.io/api/payments/topup -H "X-API-Key: " \ -H 'Content-Type: application/json' -d '{"amount_usd": 20, "idempotency_key": "run-42"}' ``` With a key that has a spending budget, only a card's first top-up asks for 3-D Secure; later top-ups charge it without asking. A key without a budget is also asked after several top-ups in a day. Lium asks again if it cannot confirm the card's earlier check, and the bank can always ask. When 3-D Secure is needed, the answer is `402 CARD_AUTHENTICATION_REQUIRED` with a `next_action_url`. Give it to the cardholder. See [Error codes](./error-codes). **With USDC on Base, in the request (x402)** Needs only a wallet holding USDC on Base and an API key (the signup key works). Being rolled out: until it is on, the call answers `403`. ```bash # 1. Ask: 402 with the payment requirements in the PAYMENT-REQUIRED header curl -i -X POST "https://lium.io/api/x402/topup?amount_usd=20" -H "X-API-Key: $LIUM_API_KEY" # 2. Repeat it with the signed payment; any x402 client (x402-fetch, x402-axios, x402 Python) does both steps curl -X POST "https://lium.io/api/x402/topup?amount_usd=20" -H "X-API-Key: $LIUM_API_KEY" \ -H "PAYMENT-SIGNATURE: " ``` - **200:** credited. The `PAYMENT-RESPONSE` header has the transaction hash. - **202 `processing`:** paid, not yet seen on chain. Repeat the same request. - Scheme `exact` (EIP-3009), x402 version 2, 1 USDC = $1, from the top-up minimum to $500. - The same signature never credits twice. ## Recommended agent loop 1. Install the CLI and sign in. 2. Run `lium` commands and read JSON output. 3. Use the REST API only where the CLI has no command. 4. Use MCP `search` or `llms-full.txt` to explain or troubleshoot. ## Related - [MCP endpoint](./mcp) - [llms.txt](./llms-txt) - [API](./api) - [CLI overview](./cli/overview) - [SDK](./sdk) --- # Scripting for agents Rent a GPU from a script, run a command, remove it. No prompts, billed per second: ```bash lium up "$NODE_ID" --yes --no-ssh --ttl 1h --name job # returns when the pod is ready; the platform removes it after 1 h even if the script dies lium exec job "nvidia-smi" # exits with the remote command's exit code lium rm job --yes ``` No account yet? Start at [AI Agents](./agents.md). ## 1. Put the key in the environment ```bash export LIUM_API_KEY=sk_... lium balance --json # proves the key works ``` - Every `lium` command and the SDK read `LIUM_API_KEY`. An SSH key is created on first use if you have none. - Don't run plain `lium init` from a script. With the key exported you don't need it. - `lium ls` works with any key, so it proves nothing. Use `lium balance --json`. ## 2. Make sure nothing prompts | Command | Pass | Why | |---------|------|-----| | `lium up …` | `--yes --no-ssh` | No confirmation question; returns when the pod is ready | | `lium up …` | `--ttl 15m` (or `--until`) | The pod is removed on time even if your script dies | | `lium rm ` | `--yes` | Without a terminal and without `--yes`, exits 2 (`confirmation_required`) and removes nothing; the pod keeps billing | | `lium rm --all` | `--yes` | Removes **every** pod on the key | | `lium exec "cmd"` | nothing | Runs over SSH, no terminal needed | | `lium ssh ` | avoid | Interactive; use `lium exec` | Pass the node's **`id`** to `lium up`, not its `huid`. ## 3. Read JSON output | Command | Flag | Returns | |---------|------|---------| | `lium ls` | `--format json` | Nodes: `id`, `huid`, `gpu_type`, `gpu_count`, `price_per_hour`, `country` … | | `lium ps` | `--format json` | Pods: `id`, `huid`, `name`, `status`, `price_per_hour`, `spent_usd`, `ssh_command` … | | `lium describe ` | `--json` | Full pod details | | `lium exec "cmd"` | `--json` | `{"ok": bool, "results": [{"pod", "exit_code", "stdout", "stderr", "error"}]}` | | `lium balance` | `--json` | `{"balance": 12.34, "balance_usd": 12.34, "currency": "USD"}` | | `lium templates` | `--format json` | Templates with their ids | `lium up` and `lium rm` have no JSON; read the pod back with `lium ps --format json`. On failure, `--json` commands print `{"ok": false, "error": {"code", "message", "hint", "exit_code"}}` to stderr. ## 4. Branch on exit codes `0` success · `1` general error · `2` configuration (bad arguments, no key) · `3` API error · `4` SSH · `5` pod not found · `6` permission denied (including low balance). `lium exec` exits with the remote command's code. See [Exit codes](./cli/reference/index.md#exit-codes). ## 5. Make retries safe **Name the pod** with a name only this job uses, and **look for it before renting**. Always set `--ttl`. ```bash set -euo pipefail NAME="job-$RUN_ID" # unique per job, stable across retries POD=$(lium ps --format json | jq -r --arg n "$NAME" '.[] | select(.name==$n) | .huid' | head -1) if [ -z "$POD" ]; then NODE=$(lium ls --gpu RTX4090 --format json \ | jq -r '[.[] | select(.gpu_count==1)] | sort_by(.price_per_hour) | .[0].id') lium up "$NODE" --yes --no-ssh --ttl 2h --name "$NAME" # returns when RUNNING with SSH up POD=$(lium ps --format json | jq -r --arg n "$NAME" '.[] | select(.name==$n) | .huid') fi ``` Never pick "my pod" by position (`.[0]`) on a shared key. ## 6. Wait for the pod `lium up` waits for the pod and prints progress. - `--timeout SECONDS` (default 900) limits the whole rent. If it runs out, the command exits 1 and the pod stays: it is charged as [billing](/pod-users/billing#when-a-pod-is-charged) describes (from **RUNNING** at the latest) until `--ttl` removes it. - A pod that fails to start exits 3. - In the SDK: `lium.wait_ready(pod, timeout=600)`. ## 7. Run, copy, observe ```bash lium exec "$POD" "nvidia-smi --query-gpu=name,memory.total --format=csv,noheader" lium scp "$POD" ./payload.txt # lands in /root/ on the pod lium exec "$POD" --json "python train.py; exit \$?" | jq '.results[0].exit_code' lium logs "$POD" --tail 50 # the pod's container log lium ps --format json | jq -r --arg h "$POD" '.[] | select(.huid==$h) | .spent_usd' ``` ## 8. Remove the pod ```bash lium rm "$POD" --yes lium ps --format json | jq -e --arg h "$POD" 'map(select(.huid==$h)) | length == 0' >/dev/null ``` Billing stops at removal. To remove later: `lium rm "$POD" --in 30m --yes`. ## 9. The whole loop, headless {#9-the-whole-loop-headless} ```bash #!/usr/bin/env bash set -euo pipefail # LIUM_API_KEY exported by the caller NAME="job-$RUN_ID" trap 'lium rm "$NAME" --yes || true' EXIT # before the rent, keyed on the name: a rent that times out # (pod_not_ready, exit 1) is removed now, not at its TTL POD=$(lium ps --format json | jq -r --arg n "$NAME" '.[] | select(.name==$n) | .huid' | head -1) # §5: a retry finds its pod if [ -z "$POD" ]; then NODE=$(lium ls --gpu RTX4090 --format json | jq -r '[.[] | select(.gpu_count==1)] | sort_by(.price_per_hour) | .[0].id') lium up "$NODE" --yes --no-ssh --ttl 1h --name "$NAME" --timeout 600 POD=$(lium ps --format json | jq -r --arg n "$NAME" '.[] | select(.name==$n) | .huid') fi lium scp "$POD" ./job.py lium exec "$POD" "cd /root && python job.py > out.txt 2>&1" lium exec "$POD" "cat /root/out.txt" ``` ## Related - [AI Agents](./agents.md) - [API Authentication](./authentication.md) - [CLI reference](./cli/reference/index.md) - [`lium up`](./cli/reference/up.md) · [`lium rm`](./cli/reference/rm.md) · [`lium exec`](./cli/reference/exec.md) - [SDK](./sdk.md) - [Low balance webhook](../pod-users/balance-warnings.md#low-balance-webhook): top up before your pods stop --- # Developer Quickstart Rent, use and release a pod with the REST API in about 5 minutes. ## Get started in 5 min **1. Get an API key** 1. Log in to [lium.io](https://lium.io). 2. Open **Access → API Keys** ([lium.io/api-keys](https://lium.io/api-keys)). 3. Click **ADD NEW** and copy the key. No browser? [`lium signup`](./cli/reference/signup.md) or [`lium init --no-browser`](./cli/reference/init.md) gets a key from the terminal. **2. Make your first request** List your pods: ```bash export LIUM_API_KEY=your_api_key_here curl https://lium.io/api/pods \ -H "X-API-Key: $LIUM_API_KEY" ``` **3. Pick a node and a template** Prices are per GPU per hour, in `price_per_gpu`: ```bash curl https://lium.io/api/executors \ -H "X-API-Key: $LIUM_API_KEY" \ | jq 'sort_by(.price_per_gpu) | .[0] | {id, machine_name, gpu_count, price_per_gpu}' ``` To skip nodes that keep failing to start rents, add `?reliable_only=true`. The template decides the image the pod boots: ```bash curl https://lium.io/api/templates \ -H "X-API-Key: $LIUM_API_KEY" \ | jq '.[] | select(.name | contains("Pytorch")) | {id, name}' ``` **4. Rent the node** ```bash curl -X POST https://lium.io/api/executors//rent \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "pod_name": "my-first-pod", "user_public_key": "'"$(cat ~/.ssh/id_ed25519.pub 2>/dev/null || cat ~/.ssh/id_rsa.pub)"'", "template_id": "", "termination_hours": 1 }' ``` - `pod_name` and `user_public_key` are required, plus exactly one of `template_id` or `dockerfile_content`. - `termination_hours` (1–720) ends the pod after that many hours from when it starts. An end you set with `POST /pods/{id}/schedule-removal` before the pod starts replaces it. - Renting needs a balance above 15 minutes of the node's price (`price_per_gpu × gpu_count / 4`) plus 15 minutes of each open pod. Some older accounts need more. - To pay no more than the price you saw, add `"expected_price_per_gpu_hour"`. If the node now asks over one cent more, you get `409 price_changed` and nothing is rented. - To retry safely, send an `Idempotency-Key` header and reuse it on the retry. See [Error codes](/developers/error-codes). The response is `{"success": true, "pod_id": ""}`. ### Or rent by spec {#rent-by-spec} Let the API pick the cheapest node that matches and rent it in one call. A node whose provider has scheduled maintenance or removal before your `termination_hours` run ends (any time, without `termination_hours`) is picked only when nothing else matches, and the answer's `notice_warning` names that notice: ```bash curl -X POST https://lium.io/api/executors/rent-by-spec \ -H "X-API-Key: $LIUM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "gpu_type": "H100", "gpu_count": 1, "max_price_per_gpu_hour": 2.5, "pod_name": "my-first-pod", "user_public_key": "'"$(cat ~/.ssh/id_ed25519.pub 2>/dev/null || cat ~/.ssh/id_rsa.pub)"'", "termination_hours": 1, "dry_run": true }' ``` | Field | Meaning | |-------|---------| | `gpu_type` | Required. `H100`, `RTX 4090`, `NVIDIA H200` … | | `gpu_count` | GPUs to rent (default `1`) | | `min_vram_gb`, `min_download_mbps`, `min_ports` | Minimums for the host | | `min_cpus`, `min_ram_gb`, `min_disk_gb` | Minimums for the pod | | `max_price_per_gpu_hour` | Price ceiling per GPU-hour, checked again on the node right before the rent (`expected_price_per_gpu_hour` is for renting a named node, not here) | | `country` | ISO country code | | `docker_in_docker` | Only Docker-in-Docker (Sysbox) nodes | | `ncu_profiling` | Only nodes where `ncu` works ([GPU profiling](../pod-users/gpu-profiling.md)); rented whole, so `gpu_count` is the node's GPU count | | `template_id` | Optional: defaults to the recommended template for the node | | `dry_run` | `true` picks and prices but rents nothing | The body also takes the other rent fields (`volume_id`, `initial_port_count`, `dockerfile_content` …). With `dry_run: false` the response carries the `pod_id`. When nothing matches, the answer is `409` naming the constraint that ruled out every node. **5. Wait, then connect** ```bash curl https://lium.io/api/pods/ \ -H "X-API-Key: $LIUM_API_KEY" \ | jq '{status, ssh_connect_cmd}' ``` When `status` is `RUNNING`, `ssh_connect_cmd` is the command to reach the pod. **6. Terminate it** You pay per second until you stop it. Charging begins once the pod turns RUNNING: on the node's default image (**Fast deploy**) from that moment, so setup is free; on any other image from the deploy request, starting time included ([billing](/pod-users/billing#when-a-pod-is-charged)): ```bash curl -X DELETE https://lium.io/api/pods/ \ -H "X-API-Key: $LIUM_API_KEY" ``` ## Next steps - [CLI installation](./cli/installation): `curl -fsSL https://lium.io/install.sh | bash` or `pip install lium.io` - [API](./api): endpoints and auth - [SDK](./sdk): Python client - [AI Agents](./agents): MCP, llms.txt, OpenAPI and CLI --- # API Authentication Calls to `https://lium.io/api/...` that touch your account send an **API key** in the `X-API-Key` header. To create keys see [API Keys](/pod-users/api-keys). ## The header ```bash curl https://lium.io/api/pods -H "X-API-Key: $LIUM_API_KEY" ``` - Send the key as copied from **Access → API Keys**. No `Bearer` prefix. - Everything the key rents is billed to its account. - A default key holds `read`, `rent` and `manage`. Payments need a separate `billing` key. See [scopes](/pod-users/api-keys#scopes). - Some account operations need a signed-in session, not a key. See [API → Authentication](./api#authentication). ## Where the key comes from The CLI and the SDK read the same key. The environment variable wins: | Order | Source | Set by | |------:|--------|--------| | 1 | `LIUM_API_KEY` environment variable | `export LIUM_API_KEY=...` | | 2 | `~/.lium/config.ini`, `[api]` section, `api_key` | `lium init`, `lium signup`, `lium config set api.api_key` | `lium config get api.api_key` shows the start and end of the key the CLI uses. In Python you can also pass it directly: `Lium(Config(api_key="..."))`. ## Verify a key before you rent `GET /executors` and `GET /templates` work without a key, so use an account call: ```bash # REST curl -sS https://lium.io/api/users/me -H "X-API-Key: $LIUM_API_KEY" # CLI lium balance --json ``` ```python from lium.sdk import Lium, LiumAuthError try: balance = Lium().balance() # GET /users/me except LiumAuthError as exc: raise SystemExit(f"API key rejected: {exc}") ``` An API key on an account with no balance (in a workspace, the billing owner's) can read, delete what the account holds (including removing SSH keys from a pod, `POST /pods/{id}/remove-ssh-keys`, deleting backups, `POST /backup-logs/bulk-delete`, cancelling a running backup, `POST /backup-logs/{id}/cancel`, and cancelling a running restore, `POST /restore-logs/{id}/cancel`), and top up and add an SSH key where its scopes and workspace allow (below); a move whose new pod is already running still finishes deleting the old one, and `POST /pods/{id}/schedule-removal` may bring a pod's end forward or give an open-ended pod one (not move it later). Any other write answers `402` `account_unfunded` (to `lium` 0.46.10 and older, or a caller that sends no `X-Lium-Client-Version`: `403` `insufficient_balance`, the form those versions already handle). Its calls fall under the same rate limits as any other key. A browser session is not limited this way. Scopes and workspace limits still apply. A card top-up (`POST /payments/topup`) needs a key with the `billing` scope, which a default key does not have; a crypto top-up such as `lium fund` works with the key the CLI logs in with. A team key (one created in a shared workspace, or by another member) cannot add an SSH key or top up at all, since those act on the account itself: the billing owner tops up from a browser session. Renting also needs a balance above about 15 minutes of the node's hourly price plus 15 minutes of each open pod. Some older accounts need more. ## Error responses {#error-responses} Errors use one JSON envelope. Read `error.code`, show `error.hint`, and quote `error.request_id` when you ask for help: ```json { "success": false, "error": { "code": "unauthorized", "message": "API key not found", "hint": "Send a valid key in X-API-Key (lium.io/api-keys) or sign in again; `lium config get api.api_key` shows the key the CLI uses.", "request_id": "2510eff403c14e4e9ff4bf744bb05df6" }, "message": "API key not found", "status_code": 401, "request_id": "2510eff403c14e4e9ff4bf744bb05df6" } ``` | Status | Meaning | What to do | |-------:|---------|------------| | `401` | Key missing or unknown | Send the header; check the key on **Access → API Keys** | | `403` | Key is valid but the account may not do this, often a low balance | Top up with `lium topup` | | `402` | `GET /pods` by a key that can rent, on an account with no balance and no pods (a read-only key gets `[]`) | Top up with `lium topup` | | `402` `account_unfunded` | A write by an API key on an account with no balance | Top up with `lium topup`, then retry | | `403` `insufficient_balance` | The same write from `lium` 0.46.10 or older, or without `X-Lium-Client-Version` | Top up with `lium topup`, then retry | | `429` | Too many requests | Back off and retry | The CLI exits `3` on API errors, `6` on permission errors and `2` when no key is set. The SDK raises `LiumAuthError` (401), `LiumPermissionError` (403), `LiumNotFoundError` (404), `LiumInsufficientBalanceError` (`402` `account_unfunded`, or `403` `insufficient_balance` up to 0.46.10) and `LiumRateLimitError` (429), all subclasses of `LiumError`. ## Two-factor authentication {#two-factor} An account can turn on an authenticator app (TOTP) for signing in. It is off until the account turns it on. On an account whose e-mail address was confirmed from its inbox (a link we mailed to it), `POST /auth/totp/enable` with `{"code": "123456", "confirm_link": true}` and a correct code mails a confirmation link and answers `{"recovery_codes": null, "confirmation_sent_to": "t***@example.org"}`. Without `"confirm_link": true` it mails the same link and answers `409` with `{"totp": "We sent a confirmation link to t***@example.org. Open it ..."}`, so a client that does not know the link still tells the user to open it. Two-factor turns on, and the recovery codes are returned once, only when the same signed-in session posts the link's token to `POST /auth/totp/enable/confirm`. The link works for 1 hour. An address marked verified without an inbox check (a validator signup or a GitHub sign-in) gets the codes straight from `POST /auth/totp/enable`. Turning it on ends every other signed-in session of the account; the browser that turned it on stays signed in. API keys are not touched: delete and recreate any key you think someone else has. **API keys and the CLI** - Calls with `X-API-Key` never ask for a code. Your scripts, the SDK and `lium` commands that use a key keep working. - `lium init` creates its key through the browser approval page, so you sign in there with your code as usual. **Signing in through the API** A sign-in that checks a password (`POST /users/login`), a fingerprint (`POST /auth/login`) or Google/GitHub answers `200` without a `token` when two-factor is on. `lium workspaces login` uses `POST /users/login`, so it gets this answer too. ```json {"user": {...}, "mfa_required": true, "mfa_token": ""} ``` Send the `mfa_token` with a 6-digit code from the app, or with one of your recovery codes: ```bash curl -sS -X POST https://lium.io/api/auth/login-totp \ -H "Content-Type: application/json" \ -d '{"mfa_token": "'"$MFA_TOKEN"'", "code": "123456"}' ``` The answer is the normal sign-in answer with `token`. A wrong code gets `401`. After several wrong codes the account is locked for a while (`429`). A code works only once, and so does each recovery code. **Second step in a browser** A script without the code, or an account with passkeys only, can hand the second step to a browser. This is what `lium workspaces login --no-browser` does without `--totp-code`: ```bash curl -sS -X POST https://lium.io/api/cli-auth/init \ -H "Content-Type: application/json" \ -d '{"mfa_token": "'"$MFA_TOKEN"'", "device_name": "laptop"}' ``` The answer has `session_id`, `browser_url`, `expires_in_seconds` (the `mfa_token`'s remaining life, at most 5 minutes) and `match_code`, 6 characters. Show `browser_url` and `match_code` to the person. The page shows the same code and asks for a passkey or an authenticator code; the browser itself gets no session. An `mfa_token` that is not live gets `401`. Poll `GET https://lium.io/api/cli-auth/poll/{session_id}` every few seconds. It answers `{"status": "pending"}` until the step is confirmed, then `{"status": "approved", "session_token": "..."}` once. Use `session_token` as `Authorization: Bearer ...`. Every later poll answers `expired`, as does a request whose time ran out: start the sign-in again. This is `lium workspaces login --no-browser`. A program on the same computer as the browser can skip the code comparison ([RFC 8252](https://www.rfc-editor.org/rfc/rfc8252) loopback with [PKCE](https://www.rfc-editor.org/rfc/rfc7636), what `lium workspaces login` does by default). Listen on `http://127.0.0.1:/callback`, make a random `code_verifier` (43 to 128 characters of `A-Z a-z 0-9 - . _ ~`) and a random `state`, and add three fields to `init`: ```bash curl -sS -X POST https://lium.io/api/cli-auth/init \ -H "Content-Type: application/json" \ -d '{"mfa_token": "'"$MFA_TOKEN"'", "device_name": "laptop", "redirect_port": 53682, "code_challenge": "'"$CODE_CHALLENGE"'", "state": "'"$STATE"'"}' ``` `code_challenge` is the unpadded base64url SHA-256 of `code_verifier` (`S256`). The answer has no `match_code`, and the poll never hands over this session. Open `browser_url`. `redirect_port` is the port you listen on. Once the person confirms, the browser goes to `http://127.0.0.1:/callback?code=...&state=...`. Check `state`, then trade the code within 60 seconds: ```bash curl -sS -X POST https://lium.io/api/cli-auth/token \ -H "Content-Type: application/json" \ -d '{"code": "'"$CODE"'", "code_verifier": "'"$CODE_VERIFIER"'"}' ``` The answer is `{"session_token": "..."}`. A code works once: a wrong `code_verifier` spends it too, and gets `400`. **Lost the authenticator and the recovery codes** Support cannot turn two-factor off. Keep your recovery codes safe; API keys keep working without a code. ## Keep the key safe - Keep the key out of pods, images and templates. Pass it as an environment variable. See [Pod security](/pod-users/security). - Use one key per integration, so you can revoke it alone. - Log only the key's prefix. ## Related - [API Keys](/pod-users/api-keys) - [Developer Quickstart](./quickstart) - [API](./api) - [AI Agents](./agents) --- # API The Lium platform API publishes a live [OpenAPI 3.1](https://spec.openapis.org/oas/v3.1.0) schema. It always matches the live deployment. | Resource | URL | |----------|-----| | Raw JSON spec | [`https://lium.io/api/openapi.json`](https://lium.io/api/openapi.json) | | Swagger UI | [`https://lium.io/documents`](https://lium.io/documents) | ## Fetch the spec ```bash curl -sSL https://lium.io/api/openapi.json -o lium-openapi.json ``` ```python import httpx spec = httpx.get("https://lium.io/api/openapi.json").json() print(spec["info"]["title"], spec["info"]["version"]) ``` ## Use it from an AI agent **Give the spec to Claude** Pass the spec as cached context and let the model pick the endpoint: ```python import json, httpx, anthropic spec_text = httpx.get("https://lium.io/api/openapi.json").text client = anthropic.Anthropic() resp = client.messages.create( model="claude-sonnet-4-5", max_tokens=1024, system=[ {"type": "text", "text": "You manage Lium GPU pods. Use the OpenAPI spec to choose the right endpoint."}, {"type": "text", "text": f"\n{spec_text}\n", "cache_control": {"type": "ephemeral"}}, ], messages=[{"role": "user", "content": "List my running pods."}], ) print(resp.content[0].text) ``` For tool calling, turn each operation in `spec["paths"]` into one [tool definition](https://docs.anthropic.com/en/docs/build-with-claude/tool-use). **MCP agents** Use the [docs MCP endpoint](./mcp) for questions and this OpenAPI URL for API calls. **Generate a client** ```bash # TypeScript / fetch npx openapi-typescript https://lium.io/api/openapi.json -o lium.d.ts # Python (httpx) pip install openapi-python-client openapi-python-client generate --url https://lium.io/api/openapi.json ``` ## Authentication {#authentication} Send your API key in the **`X-API-Key`** header. Get a key from **Access → API Keys** on lium.io. ```bash export LIUM_API_KEY=your_api_key_here curl https://lium.io/api/pods -H "X-API-Key: $LIUM_API_KEY" ``` - **Default key:** holds `read`, `rent` and `manage`. It reaches pods, templates, volumes, SSH keys and backups. - **Payments:** card checkout, saved cards and the payment ledger need a key with the `billing` scope (alone or next to the other scopes). See [API key scopes](/pod-users/api-keys#scopes). - **Session only:** managing API keys, payouts, referrals, workspaces, two-factor authentication and most account settings need a signed-in session. A key alone gets `401`. See [Two-factor authentication](./authentication#two-factor). - **Public:** `GET /executors` and `GET /templates` work without a key. A missing or unknown key gets `401`. See [API Authentication](./authentication) for details. ## Reading a volume cost row `GET /volumes/costs?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD` returns one row per volume per day. `GET /volumes/cost-summary` totals the same range, and `GET /volumes/{id}/current-stats` gives a volume's size now. All three take a key with `read`. A key with `own` pod visibility gets no volume costs. | field | meaning | |---|---| | `storage_cost`, `egress_cost`, `requests_cost`, `other_costs`, `total_cost` | What AWS billed for the bucket that day, in USD | | `custom_storage_cost` | Stored bytes at Lium's storage rate ($0.00005 per GB-hour) | | `chargeable_cost` | What was taken from your balance: `custom_storage_cost` + `egress_cost` | See [Volumes → Billing](/pod-users/volumes#billing). ## Reset a pod's GPUs `POST /pods/{id}/reset-gpu` starts a reset: it stops the pod's container, resets its GPUs and starts it again. Every process in the pod stops; files are kept. A reset takes 1 to 2 minutes, so the call does not wait for it. - **Body:** `{"gpu_indices": [0, 2]}` picks GPUs by the index `nvidia-smi` shows inside the pod; omit it (or send `null`) to reset all of them. - **202:** `{"pod_id", "request_id", "status": "running", "ok": null, "container_restarted": null, "gpus": [], "error": null}`. - **Errors:** `error.code` names the reason (see [error responses](./authentication#error-responses)): `400` `invalid_gpu_index` or `pod_not_running`; `409` when the reset is refused (for example `operation_in_progress` or `reset_not_supported`); `503` `gpu_reset_unavailable` when the request could not be sent. `GET /pods/{id}/reset-gpu/{request_id}` reads the reset. Poll it every few seconds until `status` is no longer `running`: - `done`: `ok` is `true`, `gpus` is `[{"index", "uuid", "result", "detail"}]`, where each `result` is `reset` or `latch_cleared`. `latch_cleared` means only the stuck state was cleared; the GPU was not reset. - `failed`: `ok` is `false`, `error` is `{"code", "message"}` (for example `mig_enabled` or `gpu_in_use_outside_pod`), with `container_restarted` and `gpus`. When the driver refuses the reset, `error.code` can be `reset_not_supported`, with each `result` `latch_cleared` or `failed`. When the GPUs are gone from the host driver, `error.code` is `gpus_lost_on_host` (`reset_not_supported` from a validator that predates it, with `message` saying so): the provider has to reboot the host before they work again, so a reset or a pod reboot will not help. When every GPU was reset but the pod's container did not start again, `error.code` is `container_not_restarted`, with `container_restarted` `false` and each `result` `reset`: a second reset can start the container again if it still exists and the reset's checks pass, and that start can fail too. - `timeout`: no answer in 5 minutes, `error.code` is `gpu_reset_unavailable`. The reset may still finish, so check the pod before you reset again. - `404` `gpu_reset_not_found`: no such reset for this pod. Results are kept for 1 hour. ## Related - [API Authentication](./authentication) - [Developer Quickstart](./quickstart) - [SDK](./sdk) - [MCP endpoint](./mcp) - [llms.txt](./llms-txt) --- # Public Nodes Feed Every rentable GPU node on Lium in one JSON call. No key, no signup. | Resource | URL | |----------|-----| | Live feed | [`https://lium.io/api/public/v1/nodes`](https://lium.io/api/public/v1/nodes) | | OpenAPI schema | [`https://lium.io/api/openapi.json`](https://lium.io/api/openapi.json) | | Per-model prices | [`https://lium.io/pricing.json`](https://lium.io/pricing.json) ([Pricing Pages and Price Feed](./pricing-feed.md)) | | Network stats (the data behind lium.io/stats) | [`https://lium.io/api/public/v1/stats`](https://lium.io/api/public/v1/stats) ([Public Stats Feed](./public-stats-feed.md)) | ```bash curl -sSL https://lium.io/api/public/v1/nodes ``` Add `?include_rented=true` to also list nodes that are rented right now, with their ask. On those rows `available_now` is `false` and `available_gpu_count` is `0`. - **Refresh:** at most once a minute. Poll once a minute. - **Rate limit:** 60 requests per minute per IP. ## Response ```json { "generated_at": "2026-08-17T09:14:03.117Z", "count": 95, "nodes": [ { "id": "ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3", "gpu_model": "RTX 5090", "gpu_count": 8, "available_gpu_count": 8, "available_now": true, "price_per_gpu_hour": 0.55, "price_per_node_hour": 4.4, "min_rentable_gpu_count": 8, "gpu_memory_gb": 32, "cpu_count": 384, "ram_gb": 283, "disk_gb": 2460, "cpu_model": "AMD EPYC 9654 96-Core Processor", "network_upload_mbps": 1057.7, "network_download_mbps": 2535.7, "uptime_minutes": 4815, "reliability_score": 97.5, "disk_type": "nvme", "tier": "secure", "country": "Japan", "country_code": "JP", "region": "13", "city": "Tokyo", "rent_url": "https://lium.io/browse-pods/ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3", "disk_free_gb": 1435, "gpu_driver": "570.133.20", "cuda_driver": "12.8", "gpu_interconnect": "nvlink", "region_name": "Tokyo", "timezone": "Asia/Tokyo", "last_verified_at": "2026-10-10T08:15:00Z" } ] } ``` ### Fields | Field | Notes | |-------|-------| | `generated_at` | When this snapshot was built | | `id` | Stable node id; use it as your key | | `gpu_model` | Short name, e.g. `RTX 5090` | | `gpu_count`, `available_gpu_count` | GPUs on the node, and free now | | `available_now` | `true` if you can rent the node now; `false` only on `include_rented=true` rows | | `price_per_gpu_hour`, `price_per_node_hour` | USD per hour | | `min_rentable_gpu_count` | Smallest order accepted on this node | | `gpu_memory_gb` | VRAM per GPU | | `cpu_count` | CPUs a whole-node rental gets (the node keeps one core for itself); a partial rental gets its share | | `ram_gb`, `disk_gb`, `disk_free_gb` | Whole node; a partial rental gets its share | | `cpu_model`, `disk_type` | As the host reports them | | `network_upload_mbps`, `network_download_mbps` | Measured speed | | `uptime_minutes` | Total minutes Lium has seen the node online | | `reliability_score` | Provider reliability, 0–100, over the last 14 days; `null` means no score yet | | `provider_rating` | Deprecated; always `null`. Ratings are no longer shown. | | `provider_notes` | list of strings: notes the provider picked for this node from a fixed list, such as `May reboot occasionally`; empty when none | | `provider_spot_avg_uptime_hours` | Spot nodes only: how long this provider's Spot nodes stay up on average, over the provider's whole Spot history; `null` under 24 h of history | | `last_verified_at` | When Lium's validator last passed the node, ISO 8601 UTC; `null` if never | | `tier` | `secure` or `spot`. A spot node may be reclaimed by its provider at any time | | `country`, `country_code`, `region`, `region_name`, `city`, `timezone` | Location of the machine itself, city level at most. For some countries, `country` is only the part of the world (`Europe` or `Asia`), `country_code` is an empty string and the other fields are `null` | | `gpu_driver`, `cuda_driver` | Driver and highest supported CUDA version | | `gpu_interconnect` | The confirmed [`nvlink` verdict](/developers/executor-interconnect): `nvlink` or `pcie`; `null` on single-GPU nodes | | `rent_url` | Link to rent this node | Only `id` and `rent_url` are always set. Treat every other field as optional. ## Compatibility promise - Fields are only added, never removed or renamed. - A field's meaning never changes. - Breaking changes ship as `/public/v2`. - A retired version keeps working for six months after notice. ## Listing Lium on your site Ingest this feed to list Lium with live prices, availability and a rent link. For a partnership or a higher rate limit, see [Partners](./partners.md). --- # Public Stats Feed The figures on [lium.io/stats](https://lium.io/stats) as one unauthenticated JSON call. Aggregates only: nothing per node, per provider or per renter. | Resource | URL | |----------|-----| | Live feed | [`https://lium.io/api/public/v1/stats`](https://lium.io/api/public/v1/stats) | | Page | [`https://lium.io/stats`](https://lium.io/stats) | | OpenAPI schema | [`https://lium.io/api/openapi.json`](https://lium.io/api/openapi.json) | ```bash curl -sSL https://lium.io/api/public/v1/stats ``` The feed refreshes every 5 minutes; the 30-day figures (`utilisation_30d`, `median_price_30d`) update daily. Each IP may call it 60 times a minute. Fields are only ever added. A breaking change ships as `/public/v2`. ## Response ```json { "generated_at": "2026-10-15T07:00:00Z", "fleet": { "gpus_listed": 1240, "gpus_rented": 870, "gpu_models": 24, "countries": 18, "providers": 95, "utilisation_30d": 0.71 }, "models": [ { "gpu_model": "H200", "gpus_listed": 320, "gpus_rented": 280, "from_price": 2.95, "utilisation_30d": 0.86, "median_price_30d": 3.4 } ], "countries": [{ "country": "United States", "nodes": 60 }, { "country": "Other", "nodes": 9 }], "reliability": { "scored_nodes": 150, "median_score": 97.5, "share_at_least_95": 0.81 }, "utilisation_daily": [{ "day": "2026-10-14", "utilisation": 0.89 }, { "day": "2026-10-15", "utilisation": 0.91 }], "throughput": { "days": 30, "gmv_usd": 1560000, "gpu_hours": 897000, "rentals": 18100, "daily": [{ "day": "2026-10-14", "gmv_usd": 67125, "gpu_hours": 34742, "rentals": 688 }] } } ``` The numbers above are an example. Read the live feed for current values. ## Fields | Field | Meaning | |-------|---------| | `fleet.gpus_listed` | GPUs on verified, active nodes that take new rentals. | | `fleet.gpus_rented` | The listed GPUs that are inside a running pod right now. | | `fleet.countries`, `fleet.providers` | Countries and providers with at least one listed node, rented or not. | | `fleet.utilisation_30d` | Share of the GPU-hours offered over 30 days that were rented, from 0 to 1. It covers only the models that have a `utilisation_30d`. | | `models[].from_price` | Lowest asking price per GPU-hour, in USD, among the nodes that can be rented now. | | `models[].utilisation_30d` | The model's 30-day rented share. `null` until the model has had one GPU-month (720 GPU-hours) on offer. | | `models[].median_price_30d` | Median price per GPU-hour that renters paid over 30 days, weighted by GPU-hours. `null` below 10 rentals. | | `countries` | Listed nodes, rented or not, by country: the top 10, with every country of fewer than 3 distinct providers folded into `Other`, so no row is one provider's fleet. | | `utilisation_daily` | One row per UTC day for the last 30 days, oldest first: the share of the fleet's offered GPU-hours rented that day, 0 to 1. Today's row covers the hours so far. As with `utilisation_30d`, the fleet is the set of nodes listed now. | | `throughput` | The last `days` complete UTC days, ending yesterday. `gmv_usd` is the USD billed to renters for pods and volumes. `gpu_hours` is the GPU time rented inside each day. `rentals` counts rentals started, excluding pods that failed to start. `daily` holds the same three figures per day, oldest first. `null` when nothing was billed in the window. | | `reliability` | Each provider has a score over a rolling 14-day window, from 0 to 100; it is described under `reliability_score` in the [Public Nodes Feed](./public-nodes-feed.md). This object gives the median score over the listed nodes (rented or not) that have one, and the share of those nodes that score 95 or more. | ## Related - [Public Nodes Feed](./public-nodes-feed.md): one row per node that can be rented, with its price, location and deploy link. - [Pricing Pages and Price Feed](./pricing-feed.md): one row per GPU model, with its price range. --- # Interconnect and download speed on `GET /executors` A multi-GPU job is only as fast as the link between the GPUs and the node's download speed. You can see both in the listing and filter on them before you rent. To check by hand on a running pod, see [Before you rent 8 GPUs](/pod-users/multi-gpu-checks). ## Fields on every node `GET /executors`, and the `executor` object of each pod in `GET /pods`, carry: | Field | Meaning | |-------|---------| | `nvlink` | `true` when every GPU pair is joined by NVLink and the validator's P2P and link-state readings confirm it, `false` when not, `null` when unknown or single-GPU. Filter on this field | | `interconnect` | How the GPUs are wired, from `nvidia-smi topo`; `null` until reported | Main keys of `interconnect`: | Key | Meaning | |-----|---------| | `gpu_count`, `gpu_pairs` | GPUs and GPU pairs | | `nvlink` | The `nvidia-smi topo -m` wiring alone, so it can differ from the top-level `nvlink` | | `nvlink_pairs`, `nvlink_active_links` | Pairs on NVLink, and links that are up | | `pcie_class` | Worst PCIe link among non-NVLink pairs: `SYS`, `NODE`, `PHB`, `PXB` or `PIX` (worst to best) | | `p2p` | `true` when every pair passed the peer-to-peer check | | `matrix` | The `nvidia-smi topo -m` table | The [public nodes feed](/developers/public-nodes-feed) carries `nvlink` too. ## Filters | Query parameter | Effect | |-----------------|--------| | `nvlink=true` | Only nodes where `nvlink` is `true` | | `min_download_mbps=2000` | Only nodes measured at or above this download speed | ```bash curl -s "https://lium.io/api/executors?nvlink=true&min_download_mbps=2000" \ | jq '.[] | {id, nvlink, p2p: .interconnect.p2p, nvlink_active_links: .interconnect.nvlink_active_links}' ``` Both filters combine with the others (`machine_names`, `price_lte`, `gpu_count_gte` …). `lium ls --nvlink` does the same from the CLI. --- # Partners List Lium's GPUs, send visitors with a link that names you, and earn on the top-ups of the accounts you refer. No agreement or key needed. ## How to start **1. Sign up** [Create a Lium account](https://lium.io/register). **2. Copy your code** Open [Refer & Earn](https://lium.io/refer-earn) and copy your referral code. **3. Link to Lium** Your code works on any Lium page. The first code a visitor's browser sees is kept for 90 days, so a visitor who signs up later (register form, Google or GitHub) is still your referral. A code in the register link wins over a stored one: ```text https://lium.io/register?ref=YOURCODE&utm_source=your-site&utm_medium=referral&utm_campaign=gpu-listing ``` Tag every other link with UTMs so your traffic is counted: ```text https://lium.io/gpu/h200?utm_source=your-site&utm_medium=referral&utm_campaign=gpu-listing ``` ## What you earn - **5% for 3 months, then 2.5% for 3 months** of each referred account's top-ups. - Only first-time accounts count. - Withdraw from your [Refer & Earn](https://lium.io/refer-earn) page to your Lium balance or a crypto wallet. - Commission is held 7 days from each payment. A move to your Lium balance pays at once; a crypto cash-out pays only commission past its hold. - Programs and rates may change at any time ([Terms of Service](https://lium.io/terms), section 9). ## What you can list | Feed | One row per | Link to | |------|-------------|---------| | [`https://lium.io/pricing.json`](https://lium.io/pricing.json) | GPU model, with live price range and availability | the `url` field, `https://lium.io/gpu/` | | [`https://lium.io/api/public/v1/nodes`](https://lium.io/api/public/v1/nodes) | rentable node | the `rent_url` field ([Public Nodes Feed](./public-nodes-feed.md)) | For a hand-written listing, use [lium.io/pricing](https://lium.io/pricing). ## Named partner links Partners we work with directly can get a named link that works on any page: ```text https://lium.io/?ref=compute.exchange https://lium.io/gpu/h200?ref=CEX ``` Attached to your Lium account, it pays the same as your own code. Write to support@lium.io to get one. ## Resell through the API If your platform rents Lium GPUs for its own users, tag each rental with your end customer: - **One key per customer:** set `customer_ref` on the key. - **One key, many customers:** send an `X-Customer-Ref` header on each rent call. Use a customer id (1–64 letters, digits, `.`, `_`, `:` or `-`), not a name or e-mail. **Create a key for one customer** Needs a signed-in session token: ```bash API=https://lium.io/api curl -sS $API/keys -H "Authorization: Bearer $SESSION_TOKEN" -H "Content-Type: application/json" \ -d '{"name": "acme-eu", "scopes": ["rent"], "customer_ref": "acme:eu-1"}' ``` Change or clear it later: ```bash API=https://lium.io/api curl -sS -X PATCH $API/keys/$KEY_ID -H "Authorization: Bearer $SESSION_TOKEN" -H "Content-Type: application/json" \ -d '{"customer_ref": "acme:eu-2"}' # set curl -sS -X PATCH $API/keys/$KEY_ID -H "Authorization: Bearer $SESSION_TOKEN" -H "Content-Type: application/json" \ -d '{"customer_ref": null}' # clear ``` **Tag one rental** ```bash API=https://lium.io/api curl -sS $API/executors/$EXECUTOR_ID/rent -H "X-API-Key: $LIUM_API_KEY" \ -H "X-Customer-Ref: acme:eu-7" -H "Content-Type: application/json" \ -d '{"pod_name": "acme-eu-7", "template_id": "'$TEMPLATE_ID'", "user_public_key": ["ssh-ed25519 AAAA…"]}' ``` ## Your rentals report `GET /partners/me/rentals` totals your rentals, GPU-hours and USD billed, by day, GPU model or end customer. A `read` key is enough. A key with `own` pod visibility sees only the pods it created. ```bash curl -sS "https://lium.io/api/partners/me/rentals?since=2026-09-01&until=2026-09-30&group_by=customer_ref" \ -H "X-API-Key: $LIUM_API_KEY" ``` ```json { "since": "2026-09-01", "until": "2026-09-30", "group_by": "customer_ref", "rows": [ {"bucket": "acme:eu-1", "rentals": 14, "gpu_hours": 611.5, "usd_billed": 1284.15, "fault_closes": 1}, {"bucket": "acme:eu-7", "rentals": 3, "gpu_hours": 48.0, "usd_billed": 100.8, "fault_closes": 0}, {"bucket": "untagged", "rentals": 1, "gpu_hours": 2.0, "usd_billed": 4.2, "fault_closes": 0} ] } ``` | Parameter | Meaning | Default | |-----------|---------|---------| | `since` | First UTC day, inclusive | 30 days before `until` | | `until` | Last UTC day, inclusive | today | | `group_by` | `day`, `gpu` or `customer_ref` | `day` | The window can be up to 366 days. Untagged rentals are under `untagged`. `fault_closes` counts rentals ended by a provider or platform fault. ## Contact [support@lium.io](mailto:support@lium.io) --- # Pricing Pages and Price Feed GPU prices on Lium are public. No account or key needed. | Surface | URL | For | |---------|-----|-----| | Pricing hub: every GPU model with its live price range | [`https://lium.io/pricing`](https://lium.io/pricing) | people, search engines, agents | | One page per GPU model | `https://lium.io/gpu/`, e.g. [`/gpu/h100`](https://lium.io/gpu/h100), [`/gpu/h200`](https://lium.io/gpu/h200) | the same, per model | | Price feed, JSON | [`https://lium.io/pricing.json`](https://lium.io/pricing.json) | aggregators, comparison sites, agents | | Price feed, CSV | [`https://lium.io/pricing.csv`](https://lium.io/pricing.csv) ([Price Feed CSV](./pricing-csv.md)) | spreadsheets, data warehouses | All three use the same data and are cached for up to an hour. Per-node rows are in the [Public Nodes Feed](./public-nodes-feed.md). ## `/pricing.json` ```bash curl -sSL https://lium.io/pricing.json ``` ```json { "generated_at": "2026-09-07T09:32:29.120Z", "age_budget_seconds": 900, "stale": false, "unit": "USD per GPU-hour", "nodes_url": "https://lium.io/api/public/v1/nodes", "count": 91, "fleet": { "generated_at": "2026-09-07T09:32:29.120Z", "listed_gpus": 1480, "rented_gpus": 1234, "idle_gpus": 246, "available_gpus": 209, "available_nodes": 98 }, "models": [ { "model": "NVIDIA H100 80GB HBM3", "gpu_model": "H100 80GB HBM3", "name": "H100 80GB HBM3", "slug": "h100-80gb-hbm3", "url": "https://lium.io/gpu/h100", "gpu_class": "datacenter", "reference_price_usd_per_gpu_hour": 1.49, "min_price_usd_per_gpu_hour": 1.2, "max_price_usd_per_gpu_hour": 2.75, "available_nodes": 20, "available_gpus": 56, "vram_gb": 80, "architecture": "hopper", "browse_url": "https://lium.io/?gpu=NVIDIA%20H100%2080GB%20HBM3", "updated_at": "2026-09-07T09:32:29.120Z", "listed_gpus": 120, "rented_gpus": 98, "idle_gpus": 22 } ] } ``` | Field | Meaning | |-------|---------| | `generated_at` | When the prices were read | | `age_budget_seconds` | `900`: after this age, availability is not confirmed | | `stale` | `true` when `generated_at` is older than `age_budget_seconds` (last good numbers while the backend is down) | | `unit` | Always `USD per GPU-hour` | | `nodes_url` | The [Public Nodes Feed](./public-nodes-feed.md) | | `fleet` | Marketplace totals: listed, rented, idle and available GPUs | | `models[].model` | Full machine name | | `models[].gpu_model` | Join key with the nodes feed's `gpu_model` | | `models[].slug`, `url` | The model's page | | `models[].gpu_class` | `datacenter`, `professional` or `consumer` | | `models[].reference_price_usd_per_gpu_hour` | Lium's reference price for the model | | `models[].min_price_usd_per_gpu_hour`, `max_price_usd_per_gpu_hour` | Cheapest and dearest live price now. When `available_nodes` is 0, both equal the reference price: no live offer, so show the model as unavailable | | `models[].available_nodes`, `available_gpus` | Rentable now | | `models[].browse_url` | Rent-now link on lium.io | Fields are only ever added, never renamed or removed. `/pricing.json` is a snapshot up to 15 minutes old, so a node that just appeared or left can be in one feed and not the other. Compare by `generated_at`, or build per-model prices from the nodes feed alone. ## `/pricing` and `/gpu/` The hub lists every model with its price range and links to its page. `` is `models[].slug` from the feed. Short names redirect to the main model page, for example `/gpu/a100` → `/gpu/a100-sxm4-80gb`. Link the feed's `url` to skip the redirect. Each page shows when its prices were read ("as of HH:MM UTC"); after 15 minutes it says availability is not confirmed. ## Markdown for agents `/`, `/pricing` and every `/gpu/` page answer in markdown with `Accept: text/markdown`: ```bash curl -sSL -H 'Accept: text/markdown' https://lium.io/pricing curl -sSL -H 'Accept: text/markdown' https://lium.io/gpu/h200 ``` ```text # Lium: GPU rental marketplace ... ## Prices right now ### Data center | GPU | $ / GPU / hour | Rentable now | | --- | --- | --- | | [B200](https://lium.io/?gpu=NVIDIA%20B200) | $5.50 – $6.53 | 5 pods · 19 GPUs | | [H200](https://lium.io/?gpu=NVIDIA%20H200) | $2.75 – $4.23 | 10 pods · 29 GPUs | ``` `https://lium.io/llms.txt` has the same fleet totals as plain text. ## Related - [Public Nodes Feed](./public-nodes-feed.md) - [Executor availability WebSocket](./executor-availability-websocket.md) - [AI Agents](./agents.md) --- # Price Feed CSV The [price feed](./pricing-feed.md) as CSV, for spreadsheets and data warehouses. No account or key needed. ## **Download the file** ```bash curl -sSL https://lium.io/pricing.csv -o lium-pricing.csv ``` One row per GPU model. Prices are in USD per GPU-hour. No node or provider is named. ## **Read the columns** | Column | Meaning | |--------|---------| | `generated_at` | When the snapshot was built (UTC) | | `gpu_model`, `gpu_class` | GPU model and its class | | `reference_price_usd_per_gpu_hour` | The model's reference price | | `min_price_usd_per_gpu_hour`, `max_price_usd_per_gpu_hour` | Lowest and highest listed price. When `available_nodes` is 0, both equal the reference price: no live offer, so show the model as unavailable | | `available_nodes`, `available_gpus` | Nodes and GPUs free now | | `listed_gpus`, `rented_gpus`, `idle_gpus` | Fleet counts; empty when they did not load | ## **Pull it on a schedule** The file is refreshed at most every 15 minutes. Pull it once an hour. ## Related - [Pricing Pages and Price Feed](./pricing-feed.md) - [Public Nodes Feed](./public-nodes-feed.md) --- # Executor availability WebSocket A public WebSocket that keeps you up to date on which executors are rentable now. Use it instead of polling `GET /executors`. No API key needed. ```text wss://lium.io/api/executors/ws ``` The server sends JSON frames. Clients send nothing. **Send a `User-Agent` header** Requests without one get `403`. Browsers, `curl`, Python `websockets` and Go `gorilla/websocket` set it for you. Others need it added: | Client | Add the header | | --- | --- | | websocat | `websocat -t -H='User-Agent: my-app/1.0' -B 2000000 wss://lium.io/api/executors/ws` | | Node `ws` | `new WebSocket(url, { headers: { 'User-Agent': 'my-app/1.0' } })` | | Rust `tungstenite` | Give `connect` a request from `http::Request::builder().header("User-Agent", "my-app/1.0")` | ## Keep a local executor map The first frame is always a full `snapshot`. Replace your state with it, then apply each `upsert` or `delete` by `executor_id`. ```ts const executors = new Map() const socket = new WebSocket('wss://lium.io/api/executors/ws') socket.onmessage = ({ data }) => { const frame = JSON.parse(data) switch (frame.type) { case 'snapshot': executors.clear() for (const executor of frame.executors) executors.set(executor.id, executor) break case 'upsert': executors.set(frame.executor_id, frame.executor) break case 'delete': executors.delete(frame.executor_id) break case 'heartbeat': break } } ``` ## Frames | Field | Meaning | | --- | --- | | `type` | `snapshot`, `upsert`, `delete` or `heartbeat` | | `schema_version` | Protocol version, now `1` | | `seq` | Sequence number within this connection | | `ts` | Server time, Unix seconds | ### Snapshot ```json { "type": "snapshot", "schema_version": 1, "seq": 42, "ts": 1787572800.5, "executors": [ { "id": "ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3", "machine_name": "NVIDIA H200", "price_per_gpu": 2.5, "gpu_count": 8, "available_gpu_count": 8, "uptime_in_minutes": 4815, "specs": { "gpu": { "count": 8, "details": [] } } } ] } ``` ### Upsert and delete `upsert` adds or replaces an executor. `delete` removes it. ```json { "type": "upsert", "schema_version": 1, "seq": 43, "ts": 1787572801.0, "executor_id": "ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3", "executor": { "id": "ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3", "available_gpu_count": 4 } } ``` ```json { "type": "delete", "schema_version": 1, "seq": 44, "ts": 1787572802.0, "executor_id": "ad83de56-8a04-4ab1-ac5a-4ab007b4e2b3" } ``` `heartbeat` only confirms the connection is alive. ## Fetch a snapshot without a socket A plain `GET` on the same URL returns one `snapshot` and closes. The data is at most about 30 seconds old. ```bash curl -fsS https://lium.io/api/executors/ws | jq '.executors | length' ``` Limit: 60 requests per minute per IP. ## Reconnects On every reconnect, wait for the next `snapshot` and start from it. If the server closes with code `1013`, retry with exponential backoff. --- # Workspaces API What a workspace is and its roles: see [Workspaces](../pod-users/workspaces.md). This page is the API. ## Which workspace a request acts in - **Session:** your personal workspace. Send `X-Lium-Workspace-Id: ` to act in a team you belong to. - **API key:** always the workspace it was created in. To act in a team from a script, create a key in that team. - **Team key:** paid by the team's billing owner. It reaches only `/pods`, `/clusters`, `/executors`, `/volumes`, `/templates`, `/backup-configs`, `/workspaces`, the account audit log (`/account/audit`) and `GET /users/me`. - A team key stops working when the member who created it leaves the team. ## Endpoints All take a signed-in session. The four `GET`s also take a key, for the key's own workspace. | Method and path | Who | What it does | |---|---|---| | `GET /workspaces` | any member | Your workspaces, with your role | | `POST /workspaces` | any account | Create one; you become owner and billing owner | | `GET /workspaces/{workspace_id}` | members | One workspace | | `PATCH /workspaces/{workspace_id}` | owners, admins | Rename | | `DELETE /workspaces/{workspace_id}` | owners | Delete (not while it has running pods or volumes) | | `GET /workspaces/{workspace_id}/members` | members | Members and roles | | `POST /workspaces/{workspace_id}/members` | owners, admins | Invite an e-mail address (same as `POST .../invitations`); it joins only when that account accepts | | `PATCH /workspaces/{workspace_id}/members/{member_user_id}` | owners, admins | Change a role; 409 for `owner`, which a member gets only by accepting an owner invitation | | `DELETE /workspaces/{workspace_id}/members/{member_user_id}` | owners, admins; anyone for themselves | Remove a member, or leave | | `POST /workspaces/{workspace_id}/billing-owner/transfer` | billing owner | Hand billing to another member; 409 on your personal workspace | | `POST /workspaces/{workspace_id}/billing-owner/accept` | the member asked | Accept billing | | `DELETE /workspaces/{workspace_id}/billing-owner/transfer` | billing owner or the member asked | Cancel a pending transfer | | `GET /workspaces/{workspace_id}/events` | members | The workspace audit log, newest first | Nobody is added to a workspace without accepting. Invitations, accepting and declining (`POST /workspace-invitations/{token}/accept` or `/decline`): see [Invitations](../pod-users/workspaces.md#invitations). ## The account event log `GET /users/me/events` (session or API key) lists pod rents, reboots and deletions, and key, template and workspace changes, each with who made it. Filter with `since`, `pod_id` and `api_key_id`. ## Keys and scopes - `read`: see every pod in the workspace. - `rent`: create pods. - `manage`: reboot, edit and delete pods the key did not create. A key created without scopes gets all three. Only owners and admins manage a workspace's keys. See [API keys](../pod-users/api-keys.md) and [`lium keys`](./cli/reference/workspaces.md). --- # Account audit log One entry for each request that changed something on your account: a pod created or deleted, an API key created or revoked, a login, a top-up, a setting. Each entry shows the action, the key or session that made it, the client, the IP and the request id. - Refused requests and failed logins are recorded too. - Entries are kept for 90 days. - It is different from `GET /users/me/events` (`lium audit`), which is the pod event log. In the CLI: `lium audit --account`. In the SDK: `Lium.audit_log(...)`. In the portal: **Activity** in the account menu, with filters for time, API key and pod, and a **Pod events** tab. ## Read it An API key needs the `read` scope: ```bash curl -H "X-API-Key: $LIUM_API_KEY" "https://lium.io/api/account/audit?action=pod.&limit=50" ``` ```json { "items": [ { "id": "ee2a0782-dbf1-4bf6-82d9-ca1227b3632e", "created_at": "2026-09-08T23:59:22.069873", "action": "pod.delete", "source": "cli", "actor": { "auth": "api_key", "user_id": "c7ad12ec-8fc5-407a-876d-c759e5b5260a", "api_key_id": "323d3f8e-0150-44cb-ae1f-ba11071b2539", "api_key_name": "ci-runner" }, "workspace_id": null, "ip": "203.0.113.9", "user_agent": "lium-cli/0.0.37", "request_id": "86943ca082d14405bacf58bc895e3a67", "method": "DELETE", "route": "/pods/{id}", "status_code": 200, "resource_type": "pod", "resource_id": "dc4919ac-b6aa-4890-b480-4633cdbf8114", "summary": { "path": { "id": "dc4919ac-b6aa-4890-b480-4633cdbf8114" } } } ], "next_cursor": null } ``` Entries are newest first. `created_at` is UTC. **Filters** | Parameter | What it selects | | --- | --- | | `action` | A prefix: `pod.` is every pod action, `pod.delete` one. Others: `key.`, `volume.`, `login`, `balance.` … | | `source` | `portal`, `cli`, `sdk`, `mcp`, `admin` or `api` | | `since`, `until` | ISO timestamps (UTC) | | `api_key_id` | One key's requests | | `resource_id` | A pod, volume or key id | | `limit` | 1–500, default 100 | | `cursor` | The previous page's `next_cursor` | ## Export as CSV ```bash curl -H "X-API-Key: $LIUM_API_KEY" "https://lium.io/api/account/audit/export?action=pod." -o account-audit.csv ``` Takes the same filters, up to 10,000 rows. --- # Error codes An error from `https://lium.io/api` looks like this: ```json { "success": false, "error": { "code": "node_unavailable", "message": "Node is not available.", "hint": "The node was rented or went offline between listing and renting; pick another (`lium ls`) or retry in a minute.", "request_id": "0fd17bdf43884d48af88bca99c884936" }, "message": "Node is not available.", "status_code": 400, "request_id": "0fd17bdf43884d48af88bca99c884936" } ``` - **`error.code`** is stable. Branch on it, not on the message. - **`error.hint`** says what to do next. - **`error.request_id`** is also in the `X-Request-Id` header. Quote it to support (`support@lium.io`, Discord `#support`). ## The codes | `error.code` | HTTP | When | What to do | |---|---|---|---| | `unauthorized` | 401 | Key missing or unknown, or the route needs a signed-in session | Send a valid key in `X-API-Key` ([API keys](/pod-users/api-keys)) | | `api_key_inactive` | 401 | Key deactivated or expired | Create a new key | | `insufficient_balance` | 403 | Balance too low (renting needs more than 15 minutes of the node's price plus 15 minutes of each open pod; some older accounts need more) | Top up at [lium.io/billing](https://lium.io/billing) | | `transfer_hold` | 403 | Credit transfer of a card top-up less than 14 days old, on an account whose first payment is under 30 days old | Send at most the amount the message names, or wait for the date it gives; renting is not held | | `account_unfunded` | 402 | An API key whose paying account (the workspace's billing owner, or you) has no balance tried a write other than a top-up, a delete, `POST /ssh-keys`, `POST /pods/{id}/remove-ssh-keys`, `POST /backup-logs/bulk-delete`, `POST /backup-logs/{id}/cancel` or `POST /restore-logs/{id}/cancel` or a `POST /pods/{id}/schedule-removal` that brings a pod's end forward or gives an open-ended pod one (clearing a pod's scheduled removal, or moving it later, counts as a write). `lium` 0.46.10 and older, and callers without `X-Lium-Client-Version`, get `403` `insufficient_balance` instead | Top up at [lium.io/billing](https://lium.io/billing), then retry | | `volume_funding_required` | 402 | `POST /volumes` on an account that has never completed a top-up (signup, referral or admin credit alone does not count) | Top up at [lium.io/billing](https://lium.io/billing) | | `backup_funding_required` | 402 | Creating the account's first backup storage without a completed top-up (credit alone does not count) | Top up at [lium.io/billing](https://lium.io/billing) | | `account_balance_invalid` | 403 | Balance could not be read | Contact support with the `request_id` | | `email_not_verified` | 403 | E-mail not verified | Verify it, then retry | | `forbidden` | 403 | Not your resource, or the key may not do this | Check the key with `lium config get api.api_key` | | `pod_not_found` | 404 | No such pod on this account | `lium ps` | | `node_not_found` | 404 | Node left the marketplace or wrong id (rent and hardware-utilization requests using a listed node's provider Node ID name the node's `id` in the message) | Pick another from `lium ls` | | `template_not_found` | 404 | No such template; a one-time template is deleted with its pod | `lium templates` | | `not_found` | 404 | Anything else | Check the id | | `node_rent_in_progress` | 400/409 | Another rental is starting on this node | Retry in ~30 s or pick another node | | `own_rent_in_progress` | 400 | Your own earlier rent request on this node is still being processed | Wait for its result and check `lium ps` before retrying | | `node_not_verified` | 400 | Node not verified yet | Pick a node from `lium ls` | | `node_unavailable` | 400/409 | Node rented or offline since you listed it | Pick another node | | `node_paused_by_provider` | 409 | Provider paused new rentals | Pick another node | | `provider_banned` | 409 | Provider is banned | Pick another provider's node | | `node_below_bandwidth_floor` | 409 | Node is under the 100 Mbps download/upload floor | Pick another node | | `price_changed` | 409 | Rent sent `expected_price_per_gpu_hour` and the node now asks over one cent more | Rent again with the live price at `message.price_per_gpu_hour`, or pick another node | | `gpu_count_invalid` | 400 | GPU count not available on this node | `lium ls --format json` shows `gpu_count` | | `gpu_split_not_allowed` | 400 | Node cannot be split | Rent all its GPUs or pick another node | | `cluster_member_not_eligible` | 400 | A cluster node is open for GPU splitting | List clusters again (`lium clusters`) and rent one offered there | | `template_invalid` | 400 | Template not yours, or a one-time template reused | Use your own or an official template | | `ttl_invalid` | 400 | Termination outside 1–720 hours | Fix the value | | `invoice_details_required` | 409 | A card payment's invoice needs saved invoice details, or Stripe has not accepted them yet | Save them on the Billing page, then ask for the invoice again | | `pod_state_conflict` | 400 | Pod is not in a state that allows this | Check `lium ps`; wait or delete it | | `bad_request` | 400 | See `message` | Fix the input | | `referral_first_time_accounts_only` | 400 | Referral sign-up for an e-mail still held by an account | Sign in to that account ([Partners](/developers/partners)); for a deleted account, contact support | | `validation_error` | 422 | A field failed validation | Fix the fields in `validation_errors` | | `idempotency_key_invalid` | 422 | Bad `Idempotency-Key` header | Send a UUID or omit the header | | `idempotency_key_reused` | 422 | Same key, different body, within 24 h (a year after a successful rent); a corrected body after a refused rent, or the rent after a dry run, runs instead | Use a new key | | `idempotency_in_progress` | 409 | First request with this key still running | Retry after `Retry-After` with the same key | | `idempotency_outcome_unknown` | 409 | Earlier request with this key may have gone through (a rent or a credit transfer) | Find out first: `lium ps` for a rent, transfer history on the Billing page for a transfer. Retry with a new key only if it did not happen; if you cannot tell, contact support | | `conflict` | 409 | Resource changed under you | Re-read and retry | | `image_reference_invalid` | 400 | Template image is not a valid reference | Fix the image reference | | `image_not_found` | 400 | Image or tag does not exist (on a rent, a move or a template switch; the pod is left as it was) | Fix the image name or tag | | `image_needs_registry_credentials` | 400 | Registry needs a login | Add it under Access → Docker Credentials | | `image_registry_credentials_refused` | 400 | Registry refused the saved login | Update the login under Access → Docker Credentials | | `image_no_linux_amd64` | 400 | Image has no linux/amd64 build | Push a linux/amd64 build | | `no_executor_matches_spec` | 409 | Rent-by-spec found no matching node | Relax the named constraint | | `method_not_allowed` | 405 | Wrong HTTP method for this path | See `GET /api/openapi.json` | | `rate_limited` | 429 | Too many requests, or too many template creations (private: 5 per 5 s, 30 a minute, 300 an hour; public, including making one public: 1 per 5 s, 5 a minute, 20 an hour) | Retry after the `Retry-After` seconds | | `client_error` | other 4xx | See `message` | Fix the request | | `upstream_unavailable` | 502–504 | A dependency did not answer | Retry in a minute | | `internal_error` | 500 | Unhandled error | Retry once; quote the `request_id` | | `BALANCE_REQUIRED` | 402 | `GET /pods` by a key that can rent, with no balance and no pods (a read-only key gets `[]`) | Top up (`lium topup`) | | `CARD_AUTHENTICATION_REQUIRED` | 402 | Top-up needs 3-D Secure; body has `next_action_url` | Open `next_action_url`; retry with the **same** `idempotency_key` | | `CARD_AUTHENTICATION_NOT_COMPLETED` | 402 | 3-D Secure failed or abandoned; nothing charged | Retry with a new `idempotency_key` | | `CARD_AUTHENTICATION_UNAVAILABLE` | 402 | 3-D Secure could not run for this card | Top up on the Billing page | | `CARD_AUTHENTICATION_EXPIRED` | 402 | Not confirmed within 7 days; nothing charged | Retry with a new `idempotency_key` | | `WALLET_NOT_SUPPORTED` | 402 | Saved method is a wallet, not a card | Pass a saved card's `payment_method_id` | | `CARD_DECLINED` | 402 | Bank declined the card | Use another card; retry with a new `idempotency_key` | | `NO_SAVED_CARD` | 402 | No card saved | Add a card on the Billing page | | `NO_DEFAULT_CARD` | 402 | Several cards, none default | Pass `payment_method_id` or set a default | | `API_KEY_BUDGET_EXCEEDED` | 402 | Key is at its budget | Raise the budget or use another key | | `PAYMENT_METHOD_NOT_FOUND` | 404 | No saved card with that id | `GET /stripe/payments/payment-methods` | | `AMOUNT_BELOW_MINIMUM` | 422 | Below the $10 card minimum | Send at least `minimum_usd` | | `STRIPE_UNAVAILABLE` | 502 | Stripe did not answer; nothing charged | Retry with the same `idempotency_key` | | `STRIPE_REFUSED` | 502 | Stripe refused; nothing charged | Retry with the same `idempotency_key` | | `PAYMENT_NOT_COMPLETED` | 502 | Payment did not complete | Check `GET /transactions`, then retry with a new key (the same key returns this error again) | The `/bookmark` and `/machine-requests` routes, and the `/volumes` routes other than `POST /volumes` and the cost and stats endpoints, still answer the older body `{"success": false, "message": "…"}`. Use the HTTP status there. ## In the SDK and the CLI SDK exceptions carry `code`, `hint` and `request_id`: ```python from lium.sdk import Lium, LiumError try: Lium().up(executor_id="…") except LiumError as e: if e.code == "insufficient_balance": ... # top up and retry elif e.code in ("node_unavailable", "node_rent_in_progress"): ... # pick another node else: raise # e.hint says what to do; e.request_id is what to quote ``` The CLI prints the hint and the request id under the error and exits non-zero: ``` $ lium up brave-wolf-26 Node brave-wolf-26 could not be rented: API error 400: Node is not available. Run 'lium ps' to check whether a pod was created. Run 'lium ls --format json' for the nodes rentable now. The node was rented or went offline between listing and renting; pick another (`lium ls`) or retry in a minute. request_id: 0fd17bdf43884d48af88bca99c884936 ``` --- # Lium SDK Rent GPUs from Python with an API key. The `lium.io` package ships the Python SDK and the [CLI](./cli/overview). Pods are billed per second. :::info SDK Reference Signatures, models and exceptions: **[Open SDK Reference](./sdk/reference)** ::: ## Set up **Install** ```bash pip install lium.io ``` **Sign in** ```bash lium init ``` This saves your API key to `~/.lium/config.ini`. Then `Lium()` signs in by itself: ```python from lium.sdk import Lium lium = Lium() ``` In CI, set `LIUM_API_KEY` instead. It wins over the config file: ```bash export LIUM_API_KEY="sk_..." ``` ## Two ways to run work - **`@lium.machine`:** run one Python function on a GPU. - **`Lium()`:** manage pods yourself. ### `@lium.machine` decorator {#liummachine-decorator} Call the function like any other. The SDK rents the cheapest matching node, runs the function there, returns the result and removes the pod (or keeps it warm). ```python import lium @lium.machine(machine="RTX4090", requirements=["transformers", "accelerate"], keep_warm=300) def infer(prompt: str) -> str: import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "HuggingFaceTB/SmolLM2-135M-Instruct" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="cuda") text = tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=False, add_generation_prompt=True) inputs = tokenizer(text, return_tensors="pt").to("cuda") out = model.generate(**inputs, max_new_tokens=64, do_sample=False, pad_token_id=tokenizer.eos_token_id) return tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True).strip() print(infer("Who discovered penicillin?")) # cold: rent + boot + install, ~1-2 min print(infer("And who first mass-produced it?")) # warm pod, cached environment: ~20 s infer.close() # remove the warm pod (otherwise: 300 s + 2 min later) ``` - `machine` is `"x"` or `""`, for example `"1xH200"` or `"RTX4090"`. - Import inside the function and pass everything else as arguments. See [what can travel](./sdk/examples/machine-functions#what-can-and-cannot-travel). - `timeout` defaults to 1 hour. - `f.map(items)` runs a batch on one pod. `f.local(...)` runs on your machine. Full guide: [Serverless functions with `@lium.machine`](./sdk/examples/machine-functions). ### `Lium()` client {#lium-client} List nodes, start a pod, wait for it, run a command, remove it: ```python from lium.sdk import Lium lium = Lium() ready = None try: executor = lium.ls(gpu_type="A100", gpu_count=1)[0] pod = lium.up(executor_id=executor.id, name="demo") ready = lium.wait_ready(pod, timeout=600) if ready is None: raise RuntimeError("Pod did not become ready before the timeout") print(lium.exec(ready, command="nvidia-smi")["stdout"]) finally: if ready is not None: lium.down(ready) ``` `wait_ready` returns `None` if the pod is still starting at the timeout. It raises `PodStartError` if the pod failed. Full guide: [Pod Lifecycle with `Lium()`](./sdk/examples/pod-lifecycle). ## The account event log {#the-account-event-log-since-0037} `Lium.events()` lists what happened on the account, newest first: rents, reboots, deletions and key changes, with who did it. ```python from datetime import datetime, timedelta, timezone from lium.sdk import Lium lium = Lium() for e in lium.events(since=datetime.now(timezone.utc) - timedelta(hours=24)): actor = e.get("actor") or {} by = actor.get("api_key_name") or actor.get("auth") or "platform" # key name · "session" · the platform itself print(e["created_at"], e.get("pod_name"), e.get("sub_event_type"), by) ``` The CLI equivalent is [`lium audit`](./cli/reference/audit). ## Related - [SDK Reference](./sdk/reference) - [SDK Examples](./sdk/examples) - [CLI Installation](./cli/installation) - [CLI Quickstart](./cli/quickstart) --- # SDK Examples These examples show runnable SDK workflows. ## Available Examples | Example | What it shows | | --- | --- | | [Pod lifecycle with `Lium()`](/developers/sdk/examples/pod-lifecycle) | Create a pod, wait for readiness, run commands, transfer files, and clean up. | | [Train a model on a pod](/developers/sdk/examples/training-workflow) | Sync a training project, stream the training run, download a checkpoint, and stop the pod. | | [Custom Docker template](/developers/sdk/examples/custom-template) | Create a private template with a Docker image, startup command, ports, environment, and volume paths. | | [Serverless functions with `@lium.machine`](/developers/sdk/examples/machine-functions) | How a decorated function runs on a pod, what it costs, three examples (GPU op, transformers inference, warm batch), what can travel. | | [Remote inference with `@lium.machine`](/developers/sdk/examples/machine-inference) | Offload a Python function to a GPU pod and run a small instruct model. | | [Run a vLLM server](/developers/sdk/examples/vllm) | Create a vLLM template, start a GPU pod, and expose the OpenAI-compatible API. | Use the [SDK reference](/developers/sdk/reference) when you need exact signatures, return types, and model fields. --- # Pod Lifecycle with `Lium()` Choose a GPU, create a pod, wait for it, run a command, move a file and stop the pod, all from Python. ```python #!/usr/bin/env python3 """Create a Lium pod, run a command, transfer a file, and clean up.""" from pathlib import Path from lium.sdk import Lium GPU_TYPE = "A100" GPU_COUNT = 1 POD_NAME = "sdk-lifecycle-demo" LOCAL_NOTE = Path("lium-sdk-note.txt") DOWNLOADED_NOTE = Path("lium-sdk-note.remote.txt") REMOTE_NOTE = "/root/lium-sdk-note.txt" def require_success(result: dict, label: str) -> None: """Raise a useful local error when a remote command fails.""" if result["success"]: return stderr = result.get("stderr", "").strip() stdout = result.get("stdout", "").strip() details = stderr or stdout or f"exit code {result.get('exit_code')}" raise RuntimeError(f"{label} failed: {details}") lium = Lium() created_pod_id = None ready_pod = None try: # 1. Find a matching GPU executor. executors = lium.ls(gpu_type=GPU_TYPE, gpu_count=GPU_COUNT) if not executors: raise RuntimeError(f"No available {GPU_COUNT}x {GPU_TYPE} executors") # Pick the lowest listed hourly price for this small demo. executor = min(executors, key=lambda item: item.price_per_hour) print( f"Using {executor.machine_name} at ${executor.price_per_hour:.2f}/hr " f"({executor.huid})" ) # 2. Create the pod. pod = lium.up( executor_id=executor.id, name=POD_NAME, ports=1, ) created_pod_id = pod["id"] print(f"Created pod {pod.get('name', POD_NAME)} ({created_pod_id})") # 3. Wait until the pod is running and has SSH metadata. ready_pod = lium.wait_ready(pod, timeout=600) if ready_pod is None: raise RuntimeError("Pod did not become ready before the timeout") print(f"Ready: {ready_pod.name} ({ready_pod.huid})") print(lium.ssh(ready_pod)) # 4. Inspect active pods, like `lium ps`. print("Active pods:") for active in lium.ps(): print(f"- {active.name}: {active.status} ({active.huid})") # 5. Run a command over SSH, like `lium exec`. gpu_info = lium.exec(ready_pod, command="nvidia-smi") require_success(gpu_info, "nvidia-smi") print(gpu_info["stdout"]) # 6. Upload and download a file, like `lium scp`. LOCAL_NOTE.write_text("hello from the local machine\n", encoding="utf-8") lium.upload(ready_pod, local=str(LOCAL_NOTE), remote=REMOTE_NOTE) cat_note = lium.exec(ready_pod, command=f"cat {REMOTE_NOTE}") require_success(cat_note, "cat uploaded note") print(cat_note["stdout"].strip()) lium.download(ready_pod, remote=REMOTE_NOTE, local=str(DOWNLOADED_NOTE)) print(f"Downloaded: {DOWNLOADED_NOTE.read_text(encoding='utf-8').strip()}") finally: # Always stop temporary pods so they do not keep accruing charges. pod_to_stop = ready_pod if pod_to_stop is None and created_pod_id: pod_to_stop = next((p for p in lium.ps() if p.id == created_pod_id), None) if pod_to_stop is not None: lium.down(pod_to_stop) print(f"Stopped pod {pod_to_stop.name} ({pod_to_stop.huid})") ``` ## Notes - Call `wait_ready()` before `exec`, `upload`, `download`, `rsync`, or `ssh`; those operations need SSH connection metadata. - Use `try` / `finally` around temporary pods so failures do not leave a pod running. - Use `stream_exec()` for long-running jobs where you want incremental output. - `rsync()` needs `rsync` in the image. See the [training workflow](./training-workflow). --- # Train a Model on a Pod Run a local training project on a GPU pod: start a pod, sync code and data, train, download the checkpoint, stop the pod. The script assumes this local project layout: ```text . |-- requirements.txt |-- src/ | `-- train.py `-- data/ ``` `src/train.py` should accept `--data-dir` and `--output-dir`, then write the checkpoint to `checkpoints/best_model.pt`. Run the orchestration script from the project root: ```python #!/usr/bin/env python3 """Run a local training project on a Lium GPU pod.""" from pathlib import Path from lium.sdk import Lium GPU_TYPE = "A100" GPU_COUNT = 1 MAX_PRICE_PER_HOUR = 1.50 MIN_CUDA_VERSION = 12.4 POD_NAME = "sdk-training-demo" PROJECT_ROOT = Path.cwd() LOCAL_REQUIREMENTS = PROJECT_ROOT / "requirements.txt" LOCAL_SRC = PROJECT_ROOT / "src" LOCAL_DATA = PROJECT_ROOT / "data" LOCAL_CHECKPOINT = PROJECT_ROOT / "checkpoints" / "best_model.pt" REMOTE_WORKSPACE = "/workspace" REMOTE_REQUIREMENTS = f"{REMOTE_WORKSPACE}/requirements.txt" REMOTE_SRC = f"{REMOTE_WORKSPACE}/src" REMOTE_DATA = f"{REMOTE_WORKSPACE}/data" REMOTE_CHECKPOINTS = f"{REMOTE_WORKSPACE}/checkpoints" REMOTE_BEST_MODEL = f"{REMOTE_CHECKPOINTS}/best_model.pt" def require_local_inputs() -> None: missing = [ str(path) for path in (LOCAL_REQUIREMENTS, LOCAL_SRC, LOCAL_DATA) if not path.exists() ] if missing: raise RuntimeError(f"Missing local training inputs: {', '.join(missing)}") def require_success(result: dict, label: str) -> None: if result["success"]: return stderr = result.get("stderr", "").strip() stdout = result.get("stdout", "").strip() details = stderr or stdout or f"exit code {result.get('exit_code')}" raise RuntimeError(f"{label} failed: {details}") def ensure_rsync(lium: Lium, pod) -> None: check = lium.exec(pod, command="which rsync") if check["success"]: return install = lium.exec( pod, command="apt-get update -qq && apt-get install -y rsync -qq", ) require_success(install, "install rsync") def select_executor(lium: Lium): executors = lium.ls( gpu_type=GPU_TYPE, gpu_count=GPU_COUNT, min_cuda_version=MIN_CUDA_VERSION, ) executors = [ executor for executor in executors if executor.price_per_hour <= MAX_PRICE_PER_HOUR ] if not executors: raise RuntimeError( f"No {GPU_COUNT}x {GPU_TYPE} executor under " f"${MAX_PRICE_PER_HOUR:.2f}/hr with CUDA >= {MIN_CUDA_VERSION}" ) return min(executors, key=lambda executor: executor.price_per_hour) def select_pytorch_template(lium: Lium): # CREATED/UPDATED templates are saved and deployable; only VERIFY_FAILED is unusable usable = [ template for template in lium.templates(filter="pytorch") if template.status.upper() != "VERIFY_FAILED" ] if not usable: raise RuntimeError("No PyTorch template is available") return usable[0] require_local_inputs() lium = Lium() created_pod_id = None ready_pod = None try: executor = select_executor(lium) template = select_pytorch_template(lium) print( f"Using {executor.machine_name} at ${executor.price_per_hour:.2f}/hr " f"with template {template.name}" ) pod = lium.up( executor_id=executor.id, name=POD_NAME, template_id=template.id, ) created_pod_id = pod["id"] ready_pod = lium.wait_ready(pod, timeout=600) if ready_pod is None: raise RuntimeError("Pod did not become ready before the timeout") mkdir = lium.exec( ready_pod, command=f"mkdir -p {REMOTE_SRC} {REMOTE_DATA} {REMOTE_CHECKPOINTS}", ) require_success(mkdir, "create remote workspace") lium.upload( ready_pod, local=str(LOCAL_REQUIREMENTS), remote=REMOTE_REQUIREMENTS, ) ensure_rsync(lium, ready_pod) lium.rsync(ready_pod, local=f"{LOCAL_SRC}/", remote=f"{REMOTE_SRC}/") lium.rsync(ready_pod, local=f"{LOCAL_DATA}/", remote=f"{REMOTE_DATA}/") install = lium.exec( ready_pod, command=f"cd {REMOTE_WORKSPACE} && python -m pip install -r requirements.txt", ) require_success(install, "install dependencies") train_command = ( f"cd {REMOTE_WORKSPACE} && " "PYTHONUNBUFFERED=1 python src/train.py " "--data-dir data " "--output-dir checkpoints" ) # A for loop drops the generator's return value, which is the remote exit status stream = lium.stream_exec(ready_pod, command=train_command) while True: try: print(next(stream)["data"], end="") except StopIteration as done: exit_code = done.value break if exit_code != 0: raise RuntimeError(f"training failed with exit code {exit_code}") LOCAL_CHECKPOINT.parent.mkdir(parents=True, exist_ok=True) lium.download( ready_pod, remote=REMOTE_BEST_MODEL, local=str(LOCAL_CHECKPOINT), ) print(f"Downloaded checkpoint to {LOCAL_CHECKPOINT}") finally: pod_to_stop = ready_pod if pod_to_stop is None and created_pod_id: pod_to_stop = next((p for p in lium.ps() if p.id == created_pod_id), None) if pod_to_stop is not None: lium.down(pod_to_stop) print(f"Stopped pod {pod_to_stop.name} ({pod_to_stop.huid})") ``` ## Adapting the Workflow - Change `GPU_TYPE`, `GPU_COUNT`, `MAX_PRICE_PER_HOUR` and `MIN_CUDA_VERSION` to fit your job. - Change `train_command` if your script uses other flags or paths. - For several output files, `tar` them on the pod and download the archive. ## Minimal `train.py` No training script yet? Use this one to test the workflow. With the PyTorch template, `requirements.txt` can be empty. ```python title="src/train.py" #!/usr/bin/env python3 import argparse from pathlib import Path import torch parser = argparse.ArgumentParser() parser.add_argument("--data-dir", required=True) parser.add_argument("--output-dir", required=True) args = parser.parse_args() device = torch.device("cuda" if torch.cuda.is_available() else "cpu") data_dir = Path(args.data_dir) output_dir = Path(args.output_dir) records = sorted(path.name for path in data_dir.iterdir()) print(f"input files: {records}", flush=True) print(f"torch: {torch.__version__}", flush=True) print(f"device: {device}", flush=True) torch.manual_seed(7) x = torch.linspace(-1, 1, 256, device=device).unsqueeze(1) y = 2.0 * x + 0.3 model = torch.nn.Linear(1, 1).to(device) optimizer = torch.optim.SGD(model.parameters(), lr=0.2) loss_fn = torch.nn.MSELoss() for step in range(1, 31): optimizer.zero_grad() loss = loss_fn(model(x), y) loss.backward() optimizer.step() if step % 10 == 0: print(f"step {step:02d} loss={loss.item():.6f}", flush=True) output_dir.mkdir(parents=True, exist_ok=True) torch.save( { "state_dict": model.state_dict(), "final_loss": loss.item(), "device": str(device), "input_files": records, }, output_dir / "best_model.pt", ) print("checkpoint written", flush=True) ``` --- # Custom Docker Template A template sets the Docker image, ports, environment, volumes and startup command a pod starts with. This example creates a private template, starts a pod from it, prints the public URL and stops the pod. ```python #!/usr/bin/env python3 """Create a custom template, launch a pod from it, and inspect runtime settings.""" from datetime import datetime, timezone from lium.sdk import Lium lium = Lium() ready_pod = None created_pod_id = None template_name = "sdk-custom-template-" + datetime.now(timezone.utc).strftime("%Y%m%d%H%M%S") try: template = lium.create_template( name=template_name, docker_image="daturaai/pytorch", docker_image_tag="2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04", ports=[22, 8000], start_command="python -m http.server 8000 --bind 0.0.0.0 --directory /workspace", environment={ "LIUM_EXAMPLE_MODE": "custom-template", }, volumes=["/workspace"], description="Private SDK example template", is_private=True, ) template = lium.wait_template_ready(template.id, timeout=600) if template is None: raise RuntimeError("Template did not verify before the timeout") executors = lium.ls( gpu_type="A100", gpu_count=1, min_cuda_version=12.4, ) if not executors: raise RuntimeError("No matching executor is currently available") executor = min(executors, key=lambda item: item.price_per_hour) pod = lium.up( executor_id=executor.id, template_id=template.id, name="sdk-custom-template-demo", ports=2, ) created_pod_id = pod["id"] ready_pod = lium.wait_ready(pod, timeout=600) if ready_pod is None: raise RuntimeError("Pod did not become ready before the timeout") details = lium.pod(ready_pod.id) ports_mapping = details["ports_mapping"] app_port = ports_mapping.get("8000") if app_port is None: raise RuntimeError(f"Port 8000 was not exposed: {ports_mapping}") result = lium.exec(ready_pod, command="printenv LIUM_EXAMPLE_MODE") if not result["success"]: raise RuntimeError(result["stderr"] or result["stdout"]) print(result["stdout"].strip()) print(f"Open http://{ready_pod.host}:{app_port}/") finally: pod_to_stop = ready_pod if pod_to_stop is None and created_pod_id: pod_to_stop = next((p for p in lium.ps() if p.id == created_pod_id), None) if pod_to_stop is not None: lium.down(pod_to_stop) print(f"Stopped pod {pod_to_stop.name} ({pod_to_stop.huid})") ``` ## What Each Field Does - `docker_image` and `docker_image_tag` choose the container image for the template. - `ports` are the container ports to expose. Include `22` for SSH. - `start_command` runs when the container starts. - `environment` sets container environment variables. - `volumes` declares mount paths inside the container. - `is_private=True` keeps the template scoped to your account. Request enough ports when you create the pod. `lium.pod(...)["ports_mapping"]` shows the public port for each. --- # Serverless functions with `@lium.machine` `@lium.machine` runs a Python function on a rented GPU pod and removes the pod after. You call it like any other function. ```python import lium @lium.machine(machine="RTX4090") def matmul(n: int) -> float: import torch a = torch.randn(n, n, device="cuda") return float((a @ a).sum()) print(matmul(4096)) ``` ```text [lium] matmul: renting 1xRTX4090 $0.30/h (swift-fox-c8, Romania), removal in 1.2h [lium] matmul: pod ready in 38s [lium] matmul: running [lium] matmul: done in 71s (~$0.0059) [lium] matmul: pod removed -1342.5 ``` Sign in once with `lium init` (or set `LIUM_API_KEY`). ## How a call works 1. **Pick a node.** `machine` is `"x"` or `""`, for example `"1xH200"` or `"RTX4090"`. The cheapest node with exactly that many GPUs is rented. 2. **Cap the cost.** The pod is scheduled for removal at `timeout + 15 min` (`timeout` defaults to one hour). 3. **Ship the function.** Only the function's own `def` is sent. Arguments go with it. 4. **Install requirements.** `requirements` are installed once per pod, on top of the image's torch. 5. **Run.** Everything the function prints shows in your terminal. 6. **Return or raise.** You get the result, or the same exception type the function raised. 7. **Remove the pod.** Or keep it for the next call with `keep_warm`. ## What a call costs Measured on a 1×RTX 4090 node at $0.30/h: | | wall time | cost | |---|---|---| | cold call (rent, boot, run) | ~70 s | ~$0.006 | | call on a warm pod | ~19 s | ~$0.002 | A warm pod bills while it waits. Set `keep_warm` to the gap between your calls, and call `close()` when you are done. ## Example 1: a GPU operation on the image's torch {#example-1--a-gpu-operation-on-the-images-torch} No `requirements`: the default template already has torch with CUDA. ```python import lium @lium.machine(machine="RTX4090") def bench(n: int) -> dict: import time import torch a = torch.randn(n, n, device="cuda", dtype=torch.float16) torch.cuda.synchronize() t = time.perf_counter() for _ in range(10): a @ a torch.cuda.synchronize() ms = (time.perf_counter() - t) * 100 tflops = 2 * n ** 3 / (ms / 1000) / 1e12 print(f"{torch.cuda.get_device_name(0)}: {ms:.1f} ms per {n}x{n} fp16 matmul") return {"device": torch.cuda.get_device_name(0), "ms": round(ms, 1), "tflops": round(tflops, 1)} print(bench(8192)) ``` Return plain Python types. Turn tensors into `.tolist()` or `.cpu().numpy()`. ## Example 2: transformers inference, with `requirements` {#example-2--transformers-inference-with-requirements} Torch comes from the image. `transformers` and `accelerate` are installed once per pod. ```python import lium @lium.machine(machine="RTX4090", requirements=["transformers", "accelerate"], timeout=600) def generate(prompt: str, max_new_tokens: int = 64) -> str: import torch from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "HuggingFaceTB/SmolLM2-135M-Instruct" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="cuda") messages = [{"role": "user", "content": prompt}] text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = tokenizer(text, return_tensors="pt").to("cuda") out = model.generate(**inputs, max_new_tokens=max_new_tokens, do_sample=False, pad_token_id=tokenizer.eos_token_id) return tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True).strip() try: print(generate("In one sentence, who discovered penicillin?")) except lium.RemoteExecutionError as e: # a timeout, a killed process, or a non-builtin remote exception print(e, e.remote_traceback) except Exception as e: # a builtin remote exception, e.g. OSError for a bad model id print(type(e).__name__, e) if isinstance(e.__cause__, lium.RemoteExecutionError): print(e.__cause__.remote_traceback) # what happened on the pod ``` ## Example 3: a warm pod, a batch, and a local escape hatch {#example-3--a-warm-pod-a-batch-and-a-local-escape-hatch} `keep_warm=600` keeps the pod ten minutes after each call. `.map()` runs every item on one pod. `.close()` removes the pod. ```python import lium @lium.machine(machine="RTX4090", requirements=["sentence-transformers"], keep_warm=600) def embed(texts: list[str]) -> list[list[float]]: from sentence_transformers import SentenceTransformer model = SentenceTransformer("all-MiniLM-L6-v2", device="cuda") return model.encode(texts, normalize_embeddings=True).tolist() batches = [["a red apple", "a green pear"], ["a fast car"], ["an old boat", "a new ship"]] vectors = embed.map(batches) # one pod, three calls print(len(vectors), len(vectors[0][0])) # 3 384 embed.close() # remove the warm pod now ``` For tests, `embed.local(texts)` runs the function on your machine. ## What can and cannot travel {#what-can-and-cannot-travel} - **Arguments:** anything that can be pickled. - **Results:** plain Python types (`None`, `bool`, `int`, `float`, `str`, `bytes`, lists, tuples, sets, dicts), `datetime` types, `Decimal`, `Path`, `UUID`, and numpy arrays. Anything else raises `lium.ResultEncodingError`. - **Code:** only the function's `def` travels. Import inside the function and pass other values as arguments. - **Errors:** a builtin exception (`ValueError`, `OSError` …) comes back with its own type. Anything else, or a timeout, raises `lium.RemoteExecutionError`. - **Ctrl-C** removes the pod. ## Parameters {#parameters} | parameter | default | meaning | |---|---|---| | `machine` | - | `"x"` or `""`; cheapest matching node | | `requirements` | `None` | pip packages, installed once per pod | | `template_id` | node default | Docker template to rent with | | `timeout` | `3600` | seconds the function may run; `None` for no limit | | `keep_warm` | `0` | seconds the pod stays after a call, **billed while idle** | | `cleanup` | `True` | `False` leaves the pod running after the call (remove it with `lium rm`). The removal scheduled at rent time still stands: cancel it with [`lium schedules rm`](/developers/cli/reference/schedules) if the pod must outlive it | | `local` | `False` | run in this process; `LIUM_MACHINE_LOCAL=1` does it for every function | | `quiet` | `False` | no `[lium]` progress lines on stderr | Methods on the decorated function: `f.remote(*args)` (same as `f(*args)`), `f.local(*args)`, `f.map(iterable)`, `f.close()`. --- # Remote Inference with `@lium.machine` Run a small model on a GPU pod with one decorated function. The pod is removed after the call. For options and costs see [Serverless functions with `@lium.machine`](./machine-functions). Authenticate before running the script: ```bash lium init ``` In CI, set `LIUM_API_KEY` instead. ```python #!/usr/bin/env python3 """Run a small instruct model on a remote Lium GPU.""" import lium @lium.machine(machine="RTX4090", requirements=["transformers", "accelerate"]) # cheapest node with one RTX 4090; torch comes with the image def infer(prompt: str) -> str: from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "HuggingFaceTB/SmolLM2-135M-Instruct" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, dtype="auto", device_map="cuda", ) messages = [{"role": "user", "content": prompt}] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, ) inputs = tokenizer(text, return_tensors="pt").to(model.device) outputs = model.generate( **inputs, max_new_tokens=64, do_sample=False, pad_token_id=tokenizer.eos_token_id, ) response_tokens = outputs[0][inputs["input_ids"].shape[-1]:] return tokenizer.decode(response_tokens, skip_special_tokens=True).strip() print(infer("In one sentence, who discovered penicillin?")) ``` The answer should name Alexander Fleming. --- # Run a vLLM Server This example creates a reusable vLLM template, starts a GPU pod, and prints the OpenAI-compatible `/v1/models` endpoint. Authenticate before running the script: ```bash lium init ``` For CI, scripts, or temporary overrides, set `LIUM_API_KEY` instead. For gated Hugging Face models, also set `HF_TOKEN`. ```python #!/usr/bin/env python3 """Run vLLM on a Lium GPU pod.""" import os from lium.sdk import Lium lium = Lium() GPU_TYPE = "A100" # Volume paths cache Hugging Face models between pods. template = lium.create_template( name="vllm-smollm", docker_image="vllm/vllm-openai", ports=[22, 8000], environment={ "HF_HOME": "/root/.cache/huggingface", "HF_TOKEN": os.environ.get("HF_TOKEN", ""), }, # The vllm/vllm-openai image expects API-server args, not a shell command. start_command="--model HuggingFaceTB/SmolLM-135M --host 0.0.0.0 --port 8000", volumes=["/workspace", "/root/.cache/huggingface"], ) executors = lium.ls(gpu_type=GPU_TYPE) if not executors: raise RuntimeError(f"No {GPU_TYPE} executors are currently available") first = executors[0] pod = lium.up(executor_id=first.id, template_id=template.id) ready_pod = lium.wait_ready(pod["id"], timeout=600) if not ready_pod: raise RuntimeError("Pod did not become ready before the timeout") pod = lium.pod(pod_id=pod["id"]) if "8000" in pod["ports_mapping"]: port = pod["ports_mapping"]["8000"] host = pod["executor"]["executor_ip_address"] print("vLLM is loading. Check the model endpoint:") print(f"http://{host}:{port}/v1/models") ``` Once vLLM finishes loading, check the endpoint printed by the script: ```bash curl http://:/v1/models ``` You can later change the model name: ```python lium.edit( pod["id"], startup_commands="--model meta-llama/Llama-3.2-1B-Instruct --host 0.0.0.0 --port 8000", environment={ "HF_HOME": "/root/.cache/huggingface", "HF_TOKEN": os.environ.get("HF_TOKEN", ""), }, ) ``` Stop it when you are done: ```python lium.down(ready_pod) ``` --- # SDK Reference Reference documentation for the public `lium.sdk` Python API. Install the SDK with: ```bash pip install lium.io ``` ## Client - [Lium](/developers/sdk/reference/client/lium) - Clean Unix-style SDK for Lium. - [AlphaQuote](/developers/sdk/reference/client/alpha-quote) - USD -> alpha quote from GET /balance/convert/alpha. - [AlphaSubnet](/developers/sdk/reference/client/alpha-subnet) - One subnet whose alpha Lium accepts as payment (GET /balance/alpha/subnets). - [AlphaSubnets](/developers/sdk/reference/client/alpha-subnets) - The accepted-subnet set from GET /balance/alpha/subnets. - [pod_ssh_command](/developers/sdk/reference/client/pod-ssh-command) - The pod's ssh command for a shell, with the host-key options and without a key. ## Models - [ExecutorInfo](/developers/sdk/reference/models/executor-info) - [PodInfo](/developers/sdk/reference/models/pod-info) - [Template](/developers/sdk/reference/models/template) - Template information. - [BackupConfig](/developers/sdk/reference/models/backup-config) - Backup configuration information. - [BackupLog](/developers/sdk/reference/models/backup-log) - Backup log information. - [RestoreLog](/developers/sdk/reference/models/restore-log) - Restore log information. - [VolumeInfo](/developers/sdk/reference/models/volume-info) - Volume information. - [SSHKey](/developers/sdk/reference/models/ssh-key) - Public SSH key registered for the current user. - [GpuStats](/developers/sdk/reference/models/gpu-stats) - One GPU's utilization as reported by nvidia-smi on the pod. - [ApiKeyScope](/developers/sdk/reference/models/api-key-scope) - One row of GET /keys/scopes: what a scope lets a key do, in the server's words. - [ApiKeyInfo](/developers/sdk/reference/models/api-key-info) - An API key row as GET /keys / POST /keys describe it. - [ApiKeyRefusal](/developers/sdk/reference/models/api-key-refusal) - One row of GET /keys/\{id\}/refusals: a request the key's budget. - [JobQuote](/developers/sdk/reference/models/job-quote) - What Lium.quote() returns: a job's cost on a node, line by line. - [JobQuoteLine](/developers/sdk/reference/models/job-quote-line) - One charge of a JobQuote; rate_usd and amount_usd are None for egress (billed at AWS cost). - [RentResult](/developers/sdk/reference/models/rent-result) - What Lium.rent() chose and, unless it was a dry run, rented. - [Cluster](/developers/sdk/reference/models/cluster) - The pods of one multi-node rental, in node-rank order. - [ClusterOffer](/developers/sdk/reference/models/cluster-offer) - A group of free nodes on one RDMA fabric that can be rented as a single multi-node job. - [GpuClockOutcome](/developers/sdk/reference/models/gpu-clock-outcome) - One GPU's result of Lium.lock_gpu_clocks() / Lium.reset_gpu_clocks(). - [GpuClockResult](/developers/sdk/reference/models/gpu-clock-result) - What Lium.lock_gpu_clocks() / Lium.reset_gpu_clocks() return when every GPU succeeded. - [GpuResetOutcome](/developers/sdk/reference/models/gpu-reset-outcome) - One GPU's result of Lium.reset_gpu(): result is reset, latch_cleared or failed. - [GpuResetResult](/developers/sdk/reference/models/gpu-reset-result) - What Lium.reset_gpu() returns when every GPU was reset. ## Api Keys - [ApiKeysClient](/developers/sdk/reference/api_keys/api-keys-client) ## Configuration - [Config](/developers/sdk/reference/config) ## Jobs - [Job](/developers/sdk/reference/jobs/job) - A command started in the background on a pod. ## Bounded Job - [JobResult](/developers/sdk/reference/bounded_job/job-result) - What Lium.run_job() did. to_dict() is JSON-ready. ## Exceptions - [LiumError](/developers/sdk/reference/exceptions/lium-error) - Base exception for Lium SDK. - [LiumAuthError](/developers/sdk/reference/exceptions/lium-auth-error) - Authentication error. - [LiumRateLimitError](/developers/sdk/reference/exceptions/lium-rate-limit-error) - Rate limit exceeded. retry_after is the response's Retry-After in seconds, None when absent. - [LiumServerError](/developers/sdk/reference/exceptions/lium-server-error) - Server error. - [LiumNotFoundError](/developers/sdk/reference/exceptions/lium-not-found-error) - Resource not found (404). - [LiumPermissionError](/developers/sdk/reference/exceptions/lium-permission-error) - The account is not allowed to do this (403). - [PodStartError](/developers/sdk/reference/exceptions/pod-start-error) - A pod reached a state from which it will never become ready. - [LiumHostKeyError](/developers/sdk/reference/exceptions/lium-host-key-error) - A pod presented an SSH host key that differs from the pinned one. - [LiumInsufficientBalanceError](/developers/sdk/reference/exceptions/lium-insufficient-balance-error) - The account cannot pay for this: a 403 with a balance reason, or a 402 balance refusal. - [LiumScopeError](/developers/sdk/reference/exceptions/lium-scope-error) - The API key lacks the scope the route needs (403 API key '<name>' does not have the '<scope>' scope). - [LiumBudgetExceededError](/developers/sdk/reference/exceptions/lium-budget-exceeded-error) - The API key's budget refused the request (402, error.code API_KEY_BUDGET_EXCEEDED). - [RemoteExecutionError](/developers/sdk/reference/exceptions/remote-execution-error) - A function offloaded with @lium.machine did not return a result from the pod,. - [LiumRentOutcomeUnknownError](/developers/sdk/reference/exceptions/lium-rent-outcome-unknown-error) - Lium.up() could not confirm a rent's result; check ps() before renting again, a pod may be billing. - [LiumTransferInterruptedError](/developers/sdk/reference/exceptions/lium-transfer-interrupted-error) - Ctrl-C ended Lium.transfer_credits() after its POST: the transfer may have happened. - [ClusterNotListedError](/developers/sdk/reference/exceptions/cluster-not-listed-error) - The cluster rent may have gone through, but the pod listing did not show a whole. - [LiumSSHError](/developers/sdk/reference/exceptions/lium-ssh-error) - SSH could not connect to a pod (refused, timed out, login rejected). - [LiumGpuOperationError](/developers/sdk/reference/exceptions/lium-gpu-operation-error) - A GPU reset or clock change ran on the node and failed (a reset's status failed, or a. - [LiumSessionError](/developers/sdk/reference/exceptions/lium-session-error) - A browser session (lium workspaces login / LIUM_SESSION_TOKEN) is missing or refused. - [LiumTwoFactorRequired](/developers/sdk/reference/exceptions/lium-two-factor-required) - [OutputLimitExceeded](/developers/sdk/reference/exceptions/output-limit-exceeded) - A command run with Lium.exec produced more than max_output_bytes bytes of output. ## Result Codec - [ResultEncodingError](/developers/sdk/reference/result_codec/result-encoding-error) - The function's result holds a value that does not travel back from the pod. ## Decorators - [machine](/developers/sdk/reference/decorators/machine) - Decorator to execute a function on a remote Lium machine. --- # CLI Overview The Lium CLI manages GPU pods from your terminal. It is built on the [Python SDK](../sdk) and ships in the same `lium.io` package. ## What it does - **Find GPUs:** list nodes with live prices. - **Run pods:** create, list and remove pods. - **Work on pods:** SSH in, run commands, copy and sync files. - **Use templates:** pick the image a pod boots. - **Provider tasks:** do what the [provider portal](/providers/portal/overview) does, scriptable with `--json`. See [`lium provider`](./reference/provider.md). ## Get started 1. **[Installation](./installation)**: install and sign in. 2. **[Quick Start](./quickstart)**: your first pod. 3. **[Reference](./reference/)**: every command. ## Related - [API](../api) - [SDK](../sdk) - [AI Agents](../agents) --- # Installation Install the Lium CLI and sign in. ## Requirements - Linux or macOS (`amd64` or `arm64`). On Windows, use WSL or the Python package. - An SSH client (`ssh`, `scp`, `rsync`). - Python 3.10 to 3.14, only if you install with `pip`. ## Install **Binary install (recommended)** No Python needed: ```bash curl -fsSL https://lium.io/install.sh | bash ``` Then restart your shell and check: ```bash exec $SHELL -l # or: source ~/.bashrc / ~/.zshrc lium --version ``` To pin a version: ```bash curl -fsSL https://lium.io/install.sh | LIUM_VERSION=0.0.7 bash ``` To upgrade, run the install command again. **Python package** Also gives you the Python SDK: ```bash pip install lium.io ``` Upgrade with `pip install --upgrade lium.io` (installed with `uv tool install lium.io`: `uv tool upgrade lium.io`; `pip` does not upgrade a uv tool copy, it installs a second one). Run `lium --version` afterwards: the version it shows is the copy your shell runs. Provider commands (`lium fund`, `lium provider`) need the extra: ```bash pip install "lium.io[provider]" ``` **From source** ```bash git clone https://github.com/Datura-ai/lium.git cd lium pip install -e . ``` ## Sign in **No account yet** ```bash lium signup --email you@example.com ``` This creates the account, saves the API key and sets up an SSH key. See [`lium signup`](./reference/signup). **Existing account** ```bash lium init ``` The wizard asks for your API key and SSH key. **Without the wizard** Edit `~/.lium/config.ini`: ```ini [api] api_key = your-api-key-here [ssh] key_path = /path/to/your/ssh/key ``` Or use environment variables, for example in CI: ```bash export LIUM_API_KEY=your-api-key-here # api.api_key export LIUM_SSH_KEY_PATH=/path/to/ssh/key # ssh.key_path ``` ## Check it works ```bash lium --version # confirm install lium config show # confirm config lium ls # list available nodes ``` ## Next steps - [Quick Start Guide](./quickstart) - [CLI Reference](./reference/) --- # Quick Start Guide Rent your first pod with the Lium CLI. Install it first: see [Installation](./installation). **1. Find a GPU** ```bash lium ls lium ls --gpu H100 # Show only H100 GPUs ``` Nodes marked ★ give the best price for their performance. **2. Create a pod** ```bash lium up 1 # Uses node #1 from the list ``` You pick a template when asked. Or let the CLI choose a node: ```bash lium up --gpu H200 --country FR lium up --gpu A6000 -c 2 # 2 GPUs ``` Set a deadline so a forgotten pod stops on its own: ```bash lium up 1 --name my-pod --ttl 2h ``` **3. Check your pods** ```bash lium ps ``` Shows each pod's status, cost and SSH details. **4. Connect** ```bash lium ssh my-pod lium exec my-pod "nvidia-smi" ``` **5. Copy files** ```bash lium scp my-pod ./script.py lium rsync my-pod ./data /root/datasets/ lium scp my-pod /root/models/best_model.pt ./ -d # download ``` **6. Remove the pod** You pay until you remove it: ```bash lium rm my-pod ``` ## Fund your account {#fund-your-account} With TAO: ```bash lium fund -w my-wallet -a 10.0 # Fund 10 TAO ``` With a stablecoin (prints a deposit address): ```bash lium topup create -a 20 -c USDT -n tron # $20 invoice; prints deposit address ``` See [`lium topup`](./reference/topup.md). ## Example: a training run ```bash lium up --gpu A100 --country US --name ml-training lium scp ml-training ./train.py lium rsync ml-training ./data /root/datasets/ lium exec ml-training "pip install -r requirements.txt" lium exec ml-training "python train.py --epochs 100" lium scp ml-training /root/models/best_model.pt ./ -d lium rm ml-training ``` ## Next Steps - [CLI Reference](./reference/) - [Installation Guide](./installation) --- # CLI Reference Every `lium` command, grouped by task. Each page has the same parts: what the command does, **Usage**, a flags table and one example. This reference matches lium 0.33.0. Update with `pip install -U lium.io`. New here? Start with the [Quickstart](../quickstart.md). ## Global flags | Flag | What it does | |------|--------------| | `--help` | Show help for any command | | `--version` | Print the CLI version (on `lium` itself) | ## Pods | Command | What it does | |---------|--------------| | [`lium ls`](./ls.md) | List GPU nodes you can rent | | [`lium up`](./up.md) | Rent a pod | | [`lium ps`](./ps.md) | List your pods | | [`lium describe`](./describe.md) | Show one pod in full | | [`lium ssh`](./ssh.md) | Open a shell on a pod | | [`lium exec`](./exec.md) | Run a command on pods | | [`lium scp`](./scp.md) | Copy files to or from pods | | [`lium rsync`](./rsync.md) | Sync a folder to pods | | [`lium cp`](./cp.md) | Copy files from one pod to another | | [`lium logs`](./logs.md) | Show pod logs | | [`lium update`](./update.md) | Add Jupyter to a running pod | | [`lium port-forward`](./port-forward.md) | Forward a local port to a pod port | | [`lium reboot`](./reboot.md) | Reboot pods | | [`lium reset-gpu`](./reset-gpu.md) | Reset a pod's hung GPUs | | [`lium rm`](./rm.md) | Remove pods, now or on a schedule | | [`lium schedules`](./schedules.md) | List or cancel scheduled removals | | [`lium audit`](./audit.md) | Show who did what to your pods | | [`lium request`](/pod-users/machine-requests) | Ask providers for a sold-out GPU type | ## Clusters, storage and templates | Command | What it does | |---------|--------------| | [`lium clusters`](./clusters.md) | Rent several nodes on one fabric as a cluster | | [`lium volumes`](./volumes.md) | Create, list and delete volumes | | [`lium bk`](./bk.md) | Set up, run and restore pod backups | | [`lium templates`](./templates.md) | List Docker templates and images | ## Account and settings | Command | What it does | |---------|--------------| | [`lium signup`](./signup.md) | Create an account | | [`lium init`](./init.md) | Log in and save your API key | | [`lium whoami`](./whoami.md) | Show the key, account and balance in use | | [`lium balance`](./balance.md) | Show your balance | | [`lium spend`](./spend.md) | Show hourly burn and runway | | [`lium billing`](./billing.md) | Show what each pod was charged | | [`lium topup`](./topup.md) | Add funds with a stablecoin or a card | | [`lium fund`](./fund.md) | Add funds with TAO, alpha or SN51 gamma | | [`lium ssh-keys`](./ssh-keys.md) | List or sync your SSH keys | | [`lium workspaces`](./workspaces.md) | Team workspaces: list, switch, invite; `lium keys` mints a key for a team | | [`lium config`](./config.md) | Read and write CLI settings | | [`lium theme`](./theme.md) | Set the color theme | | [`lium completion`](./completion.md) | Turn on tab completion | ## Providers | Command | What it does | |---------|--------------| | [`lium mine`](./mine.md) | Set up this host as a provider node | | [`lium gpu-splitting`](./gpu-splitting.md) | Prepare Docker storage for GPU splitting | | [`lium provider`](./provider.md) | Manage your provider account and nodes | ## Picking pods Commands that act on pods take a pod name, huid or id, a row number from your last `lium ps`, a comma-separated list (`1,2,3`) or `all`. In scripts, use the name or huid. Row numbers expire after 10 minutes. ## Scripts and agents {#scripts-and-agents-non-interactive-use} **Set your key** ```bash export LIUM_API_KEY=sk_... ``` **Skip prompts** Pass `--yes` (`-y`). Without a terminal, or with `LIUM_NONINTERACTIVE=1`, a command that would ask fails with exit code `2` instead of waiting. **Read JSON** Most commands take `--json` (or `--format json`). The result goes to stdout. A failure prints `{"ok": false, "error": {...}}` on stderr. ```bash lium up --gpu H100 -y --ttl 2h --json ``` ## Exit codes {#exit-codes} | Code | Meaning | |------|---------| | `0` | Success | | `1` | General error | | `2` | Bad arguments or configuration, or a prompt that could not be shown | | `3` | The API refused or failed the call | | `4` | SSH error | | `5` | Pod not found | | `6` | Permission denied | `lium exec` exits with the remote command's exit code. `lium provider` uses [its own exit codes](./provider.md#exit-codes--errors). --- # `lium ls` List the GPU nodes you can rent, cheapest per GPU-hour first. **Usage** ```bash lium ls [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--gpu TYPE` | Only this GPU type, e.g. `H100` | | `--count N` | Only nodes with exactly N GPUs | | `--min-vram GB` | Minimum memory per GPU, e.g. `80` | | `--max-price USD` | Maximum price per GPU-hour, e.g. `2.50` | | `--tier spot\|secure` | Only spot (can be reclaimed) or secure nodes | | `--country CODE` | Only these countries, e.g. `US,NL` (repeatable) | | `--min-cuda VERSION` | Minimum CUDA version, e.g. `12.4` | | `--min-cpus N` | Minimum CPU threads | | `--nvlink` | Only nodes whose GPUs are all joined by NVLink | | `--reliable` | Hide nodes whose rents often fail to start | | `--min-download MBPS` | Minimum download speed | | `--lat`, `--lon`, `--max-distance MILES` | Only nodes within this distance of a point | | `--sort FIELD` | Sort by `price_gpu` (default), `price_total`, `download`, `upload`, `loc`, `id` or `gpu` | | `--limit N` | Show at most N rows | | `--format table\|json`, `--json` | Output format | **Example** ```bash lium ls --gpu H100 --count 8 --max-price 2.50 ``` --- # `lium up` Rent a pod. With no node given, it picks the best match for your filters and asks once before renting. **Usage** ```bash lium up [NODE] [OPTIONS] ``` `NODE` is a node huid or id, or a row number from your last `lium ls`. **Flags** ### Pick a node | Flag | What it does | |------|--------------| | `--gpu TYPE` | GPU type, e.g. `H200` | | `-c`, `--count N` | Number of GPUs | | `--country CODE` | ISO country code, e.g. `US` | | `--min-cpus N` | Minimum CPU threads | | `-p`, `--ports N` | Minimum number of free ports | | `-y`, `--yes` | Rent without asking | ### Set up the pod | Flag | What it does | |------|--------------| | `-n`, `--name NAME` | Pod name | | `-t`, `--template_id ID` | Template to use (see [`lium templates`](./templates.md)) | | `--image IMAGE` | Docker image to run instead of a template | | `--dockerfile PATH` | Build the image on the node from a Dockerfile. When its `COPY`/`ADD` lines read local files, the folder that holds the Dockerfile is uploaded as the build context, without what its `.dockerignore` (or `.dockerignore` next to it) leaves out. A symlinked Dockerfile is followed first: the context and the ignore file come from the folder of the file it points to. From CLI v0.47.1, `.env*` files (except `.env.example`, `.env.sample` and `.env.template`), `.git`, `.ssh`, `.aws`, `*.pem`, `*.key`, SSH private keys (`id_rsa*`, `id_ed25519*`, `id_ecdsa*`, `id_dsa*`), `.netrc` and `.npmrc` are left out at any depth unless the ignore file re-includes them with `!`; an older CLI uploads them unless `.dockerignore` lists them, so upgrade (`lium --version` shows yours) or list them there. The build must finish within 20 minutes; on a timeout the error shows the last build lines | | `-e`, `--env KEY=VALUE` | Environment variable (repeatable) | | `--internal-ports LIST` | Ports to expose, e.g. `22,8000` | | `--entrypoint CMD` | Container entrypoint | | `--cmd CMD` | Command that keeps the container running | | `--jupyter` | Install Jupyter | | `--ssh-name NAME` | Name for a newly registered SSH key | | `--no-ssh` | Return when the pod is ready instead of opening SSH | | `--json` | Print the ready pod as JSON (implies `--no-ssh`) | ### Storage | Flag | What it does | |------|--------------| | `-v`, `--volume SPEC` | Attach `id:` or create `new:name=[,desc=]` | | `--volume-encryption` / `--no-volume-encryption` | Encrypt the local volume (on by default) | | `--restore-backup ID` | Restore this backup after the pod starts | | `--restore-to PATH` | Empty folder to restore into (use with `--restore-backup`) | | `--no-backup` | Do not back up the pod's volume (backups are on by default) | ### Stop automatically | Flag | What it does | |------|--------------| | `--ttl DURATION` | Remove the pod after this long, e.g. `6h` | | `--until TIME` | Remove the pod at this local time, e.g. `"tomorrow 09:00"` | | `--budget USD` | Remove the pod once it has spent this much | ### Wait for the pod {#waiting} | Flag | What it does | |------|--------------| | `--timeout SECONDS` | Time limit for the whole command (default `900`) | | `--ready-timeout SECONDS` | Time limit for the pod to become ready | | `--verify-gpus` | Check the GPU count with `nvidia-smi` inside the pod | | `--strict-gpus` | Remove the pod if its GPU count is wrong | A pod that is still starting when time runs out keeps starting. It is charged once it turns **RUNNING**, as [billing](/pod-users/billing#when-a-pod-is-charged) describes. Remove it with [`lium rm`](./rm.md). **Example** ```bash lium up --gpu H100 --count 8 --ttl 6h -y ``` --- # `lium ps` List your pods. **Usage** ```bash lium ps [POD] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Show only this pod (name, huid or id) | | `--sort FIELD` | Sort by `created`, `name`, `status`, `price`, `spent`, `gpu` or `uptime` | | `-r`, `--reverse` | Reverse the sort | | `--filter KEY=VALUE` | Keep pods whose field starts with VALUE (repeatable) | | `--key KEY` | Only pods rented through this API key | | `-w`, `--watch SECONDS` | Refresh every N seconds | | `--wide` | Show every column | | `--format table\|json`, `--json` | Output format | The row number (`#`) is what other commands accept as a pod target, for 10 minutes. **Example** ```bash lium ps --sort price -r ``` --- # `lium describe` Show everything about one pod: ports, GPU, template, SSH and cost. **Usage** ```bash lium describe POD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name, huid or id | | `--json` | Print the full record as JSON | **Example** ```bash lium describe my-pod ``` --- # `lium audit` Show who did what to your pods, and when: every rent, reboot, edit and removal, with the API key or session behind it. **Usage** ```bash lium audit [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--pod POD` | Only this pod (a removed pod by its full id) | | `--since WHEN` | Only events after `24h`, `7d` or an ISO time | | `--key ID` | Only actions made with this API key id | | `--limit N` | Newest events to fetch, `1`–`1000` (default `200`) | | `--account` | Show the account log instead: every change to pods, keys, logins, balance and settings | | `--action NAME` | With `--account`: only this action, e.g. `pod.delete` | | `--source NAME` | With `--account`: only `portal`, `cli`, `sdk`, `mcp`, `admin` or `api` | | `--cursor CURSOR` | With `--account`: show the next, older page | | `--json` | Print events as JSON | **Example** ```bash lium audit --since 24h ``` --- # `lium ssh` Open a shell on a pod. **Usage** ```bash lium ssh POD ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name, huid, id or row number from `lium ps` | **Example** ```bash lium ssh my-pod ``` --- # `lium exec` Run a command on one or more pods. It exits with the command's own exit code. **Usage** ```bash lium exec PODS [COMMAND] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `PODS` | Pod name, row number, comma-separated list or `all` | | `COMMAND` | The command to run | | `-s`, `--script PATH` | Run a local script instead of `COMMAND` | | `-e`, `--env KEY=VALUE` | Environment variable (repeatable) | | `-d`, `--detach` | Start in the background and return at once; prints the PID and log path | | `--log PATH` | Log file for `--detach` | | `--max-output-bytes N` | Fail once the output passes N bytes | | `--json` | Print stdout, stderr and exit code as JSON | **Example** ```bash lium exec my-pod "nvidia-smi" ``` --- # `lium scp` Copy a file from your machine to pods, or back with `--download`. **Usage** ```bash lium scp PODS SOURCE [DESTINATION] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `PODS` | Pod name, row number, comma-separated list or `all` | | `SOURCE` | Local file, or the pod path with `--download` | | `DESTINATION` | Pod path (default `/root/`), or the local path with `--download` | | `-d`, `--download` | Copy from the pod to your machine | **Example** ```bash lium scp my-pod ./train.py ``` --- # `lium rsync` Sync a local folder to pods. **Usage** ```bash lium rsync PODS LOCAL_PATH [REMOTE_PATH] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `PODS` | Pod name, row number, comma-separated list or `all` | | `LOCAL_PATH` | Local folder to sync | | `REMOTE_PATH` | Where to put it on the pod | | `--exclude PATTERN` | Skip matching paths (repeatable) | | `--delete` | Remove pod files that are not in the local folder | | `--bwlimit KIB_PER_S` | Limit the transfer rate | | `--progress` | Show progress | **Example** ```bash lium rsync my-pod ./project /root/project --exclude .git ``` --- # `lium cp` Copy files from one pod to another over SSH. The data does not pass through your machine. Both pods need `rsync`. **Usage** ```bash lium cp SOURCE_POD:PATH DEST_POD:PATH [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `SOURCE_POD:PATH` | Pod and path to copy from | | `DEST_POD:PATH` | Pod and path to copy to | | `--exclude PATTERN` | Skip matching paths (repeatable) | | `--delete` | Remove destination files that are not in the source | | `--bwlimit KIB_PER_S` | Limit the transfer rate | | `--json` | Print the result as JSON | **Example** ```bash lium cp dev-pod:/workspace/data/ train-pod:/workspace/data/ ``` --- # `lium rm` Remove pods, now or on a schedule. Removal cannot be undone. **Usage** ```bash lium rm [PODS] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `PODS` | Pod name, row number, comma-separated list or `all` | | `-a`, `--all` | Remove every pod | | `-y`, `--yes` | Remove without asking (needed in scripts) | | `--in DURATION` | Remove after this long, e.g. `6h` | | `--at TIME` | Remove at this local time, e.g. `"tomorrow 09:00"` | | `--name-only` | Never read `PODS` as row numbers | | `--rating 1-5` | Rate the node | | `--feedback TEXT` | Tell Lium how the node went | | `--format table\|json`, `--json` | Output format | **Example** ```bash lium rm my-pod -y ``` --- # `lium reboot` Reboot pods. **Usage** ```bash lium reboot [PODS] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `PODS` | Pod name, row number or comma-separated list | | `-a`, `--all` | Reboot every pod | | `--volume-id HUID` | Attach this volume on reboot | **Example** ```bash lium reboot my-pod ``` --- # `lium reset-gpu` Reset a pod's hung GPUs without removing the pod. Every process in the pod stops, even when you name one GPU; files are kept. A reset takes 1 to 2 minutes. **Usage** ```bash lium reset-gpu POD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name, HUID or row number (one pod) | | `--gpu N` | GPU index as `nvidia-smi` shows it in the pod; repeat for more (default: all) | | `-y`, `--yes` | Reset without asking | | `--json` | Print the result as JSON | If the reset times out, it may still finish. Check `lium exec POD nvidia-smi` before you reset again. The API is [`POST /pods/{id}/reset-gpu`](../../api.md#reset-a-pods-gpus). **Example** ```bash lium reset-gpu my-pod --gpu 0 --yes ``` --- # `lium logs` Show a pod's logs. **Usage** ```bash lium logs POD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name or row number | | `-n`, `--tail N` | Lines from the end (default `100`) | | `-f`, `--follow` | Keep streaming new lines | **Example** ```bash lium logs my-pod -f ``` --- # `lium update` Install Jupyter on a running pod. **Usage** ```bash lium update POD --jupyter PORT ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name or row number | | `--jupyter PORT` | Install Jupyter on this internal port | **Example** ```bash lium update my-pod --jupyter 8888 ``` --- # `lium port-forward` Forward a local port to a port the pod exposes. The connection is plain TCP, not SSH. Stop it with `Ctrl-C`. **Usage** ```bash lium port-forward POD PORT [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `POD` | Pod name, huid or row number | | `PORT` | Internal pod port (see [`lium describe`](./describe.md)) | | `-l`, `--local-port PORT` | Local port to use (default: same as `PORT`) | **Example** ```bash lium port-forward my-pod 8888 ``` --- # `lium schedules` List or cancel scheduled pod removals. Create one with `lium up --ttl` or `lium rm --in`. ## `lium schedules list` List scheduled removals. Plain `lium schedules` does the same. **Usage** ```bash lium schedules list ``` **Example** ```bash lium schedules ``` ## `lium schedules rm` Cancel scheduled removals. **Usage** ```bash lium schedules rm INDICES ``` **Flags** | Flag | What it does | |------|--------------| | `INDICES` | Row numbers from `lium schedules list`, e.g. `1,2` | **Example** ```bash lium schedules rm 1 ``` --- # `lium clusters` Rent several whole nodes on one InfiniBand, RoCE or AWS EFA fabric as one cluster. See [Multi-node clusters](/pod-users/clusters) for how to run a job on it. Every subcommand takes `--format table|json` (or `--json`). ## `lium clusters list` List fabrics with free nodes. Plain `lium clusters` does the same. **Usage** ```bash lium clusters list [OPTIONS] ``` **Example** ```bash lium clusters ``` ## `lium clusters up` Rent N whole nodes of one fabric, all or nothing. The cluster bills from the moment the rent succeeds. **Usage** ```bash lium clusters up FABRIC --nodes N --name NAME [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `FABRIC` | Row number from `lium clusters`, or a fabric id | | `-N`, `--nodes N` | Number of nodes, at least `2` (required) | | `-n`, `--name NAME` | Pod name for every member (required) | | `-t`, `--template_id ID` | Template (default: the newest cluster template) | | `-p`, `--ports N` | Ports to expose per node | | `--ttl DURATION` | Remove every member after this long, e.g. `12h` | | `--no-backup` | Do not back up the members' volumes (backups are on by default) | | `--wait` / `--no-wait` | Wait until every member is running (default: wait) | | `--timeout SECONDS` | How long to wait (default `900`) | | `-y`, `--yes` | Rent without asking | **Example** ```bash lium clusters up 1 --nodes 2 --name job --ttl 12h ``` ## `lium clusters ps` List your clusters. **Usage** ```bash lium clusters ps [OPTIONS] ``` **Example** ```bash lium clusters ps ``` ## `lium clusters show` Show a cluster's members: rank, overlay IP, GPUs and SSH command. **Usage** ```bash lium clusters show CLUSTER [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `CLUSTER` | Cluster id or the shared pod name | | `--hostfile` | Print only an `mpirun`/DeepSpeed hostfile | | `--torchrun RANK` | Print only the `torchrun` flags for this rank | **Example** ```bash lium clusters show job --hostfile ``` ## `lium clusters rm` Remove every member of a cluster. **Usage** ```bash lium clusters rm CLUSTER [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `CLUSTER` | Cluster id or the shared pod name | | `-y`, `--yes` | Remove without asking | **Example** ```bash lium clusters rm job -y ``` --- # `lium volumes` Create, list and delete volumes that keep data after a pod is removed. Attach one with `lium up --volume`. ## `lium volumes list` List your volumes. Plain `lium volumes` does the same. **Usage** ```bash lium volumes list ``` **Example** ```bash lium volumes ``` ## `lium volumes new` Create a volume. **Usage** ```bash lium volumes new NAME [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `NAME` | Volume name | | `-d`, `--desc TEXT` | Description | **Example** ```bash lium volumes new datasets --desc "ImageNet" ``` ## `lium volumes rm` Delete volumes. Detach a volume before you delete it. **Usage** ```bash lium volumes rm TARGETS [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `TARGETS` | Volume HUIDs or ids, or row numbers from `lium volumes list`, e.g. `1,2` | | `-y`, `--yes` | Delete without asking | **Example** ```bash lium volumes rm 1 lium volumes rm noble-matrix-27 ``` --- # `lium bk` Set up, run and restore pod backups. See [Backups](/pod-users/backups) and [Restores](/pod-users/restores). Backup and restore ids can be the full id or the 8-character id the tables show. ## `lium bk set` Back up a folder of a pod on a schedule. **Usage** ```bash lium bk set POD --path PATH [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--path PATH` | Folder inside the pod volume to back up (required) | | `--every DURATION` | How often, e.g. `6h` | | `--keep DURATION` | How long to keep each backup, e.g. `7d` | | `-y`, `--yes` | Save without asking | **Example** ```bash lium bk set my-pod --path /root/checkpoints --every 6h --keep 7d ``` ## `lium bk now` Back up a pod right now. **Usage** ```bash lium bk now POD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-n`, `--name NAME` | Backup name | | `-d`, `--description TEXT` | Backup description | **Example** ```bash lium bk now my-pod -n pre-release ``` ## `lium bk show` Show a pod's backup settings and recent backups. **Usage** ```bash lium bk show POD ``` **Example** ```bash lium bk show my-pod ``` ## `lium bk logs` Show backup progress and history. **Usage** ```bash lium bk logs [POD] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Show one backup | **Example** ```bash lium bk logs my-pod ``` ## `lium bk restore` Restore a backup into a pod. It runs in the background; check it with `lium bk restore-logs`. **Usage** ```bash lium bk restore POD --id ID [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Backup to restore (required) | | `--to PATH` | New or empty folder to restore into (default `/restored`) | | `-y`, `--yes` | Restore without asking | **Example** ```bash lium bk restore my-pod --id 8fbb30f6 ``` ## `lium bk restore-logs` Show restore progress. **Usage** ```bash lium bk restore-logs [POD] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Show one restore | **Example** ```bash lium bk restore-logs my-pod ``` ## `lium bk cancel` Stop a running backup. **Usage** ```bash lium bk cancel --id ID [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Running backup (required) | | `-y`, `--yes` | Cancel without asking | **Example** ```bash lium bk cancel --id 8fbb30f6 ``` ## `lium bk restore-cancel` Stop a running restore. **Usage** ```bash lium bk restore-cancel --id ID [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Running restore (required) | | `-y`, `--yes` | Cancel without asking | **Example** ```bash lium bk restore-cancel --id 9b6c8d90 ``` ## `lium bk delete` Delete the stored data of a finished backup. **Usage** ```bash lium bk delete --id ID [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--id ID` | Finished backup (required) | | `-y`, `--yes` | Delete without asking | **Example** ```bash lium bk delete --id 8fbb30f6 ``` ## `lium bk rm` Remove a pod's backup schedule. Finished backups stay. **Usage** ```bash lium bk rm POD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-y`, `--yes` | Remove without asking | **Example** ```bash lium bk rm my-pod -y ``` --- # `lium templates` List the Docker templates and images you can start a pod from. Pass a template's id to `lium up --template_id`. **Usage** ```bash lium templates [SEARCH] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `SEARCH` | Show only names that match | | `--arch hopper\|blackwell` | Only templates that run on this GPU generation | | `--format table\|json`, `--json` | Output format | B200, B300, RTX PRO 6000 and RTX 50-series nodes need a `blackwell` template. **Example** ```bash lium templates pytorch --arch blackwell ``` --- # `lium signup` Create a Lium account from the terminal and save its API key. For an account you already have, use [`lium init`](./init.md). **Usage** ```bash lium signup --email ADDRESS [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--email ADDRESS` | Your e-mail; the confirmation link goes there | | `--no-email` | Create an account with no e-mail or password; see [Signing up without an email](/pod-users/fingerprint-signup) | | `--name NAME` | Display name (default: the part of the e-mail before `@`) | | `--password PASSWORD` | Account password (generated if left out; `LIUM_SIGNUP_PASSWORD` also works) | | `--billing-key` | Also create a key that can only top up | | `--json` | Print the result as JSON | The command prints your password once. It is your login at [lium.io](https://lium.io). While many accounts are being created at once, an e-mail signup needs a captcha the terminal cannot show. Sign up at [lium.io/register](https://lium.io/register) instead, or use `--no-email`. If the e-mail already has an account, no new one is made and that address gets an e-mail saying someone tried to sign up with it. The command then cannot sign in with the new password and says so: use [`lium init`](./init.md) with that account's key, or reset its password at [lium.io/request-password](https://lium.io/request-password). **Example** ```bash lium signup --email ada@example.com ``` --- # `lium init` Log in to an existing account and save your API key and SSH key. **Usage** ```bash lium init [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--api-key KEY` | Save this key without a browser | | `--no-browser` | Print a login URL and session id instead of opening a browser | | `--session ID` | Finish a `--no-browser` login and save the key | | `--force` | Log in again and replace the saved key | | `--json` | Print the result as JSON (with `--api-key`) | In scripts you can skip `init`: set `LIUM_API_KEY` instead. **Example** ```bash lium init --api-key sk_... ``` --- # `lium config` Read and change CLI settings, stored in `~/.lium/config.ini`. **Usage** ```bash lium config SUBCOMMAND [ARGS] ``` **Subcommands** | Subcommand | What it does | |------------|--------------| | `show` | Print all settings | | `get KEY` | Print one value | | `set KEY [VALUE]` | Set a value (asks for it when left out) | | `unset KEY` | Remove a value | | `path` | Print the file path | | `edit` | Open the file in your editor | | `reset` | Reset to defaults (`-y` skips the question) | **Example** ```bash lium config get api.api_key ``` --- # `lium theme` Set the CLI color theme. **Usage** ```bash lium theme THEME ``` **Flags** | Flag | What it does | |------|--------------| | `THEME` | `dark` or `light` | **Example** ```bash lium theme light ``` --- # `lium completion` Turn on tab completion for `lium` in bash, zsh or fish. **Usage** ```bash lium completion [SHELL] [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `SHELL` | `bash`, `zsh` or `fish` (default: your current shell) | | `--install` | Add the line to your shell's startup file instead of printing it | Restart the shell after `--install`. **Example** ```bash lium completion --install ``` --- # `lium whoami` Show the API key in use, its account, the balance, the SSH key and the CLI version. Run it first when a command fails unexpectedly. **Usage** ```bash lium whoami [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--json` | Print the result as JSON | **Example** ```bash lium whoami ``` --- # `lium balance` Show your account balance. **Usage** ```bash lium balance [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--format table\|json`, `--json` | Output format | **Example** ```bash lium balance --json ``` --- # `lium spend` Show what your running pods cost per hour, an estimate of what each has spent, and how long your balance lasts. For actual charges, use [`lium billing`](./billing.md). **Usage** ```bash lium spend [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--format table\|json`, `--json` | Output format | **Example** ```bash lium spend ``` --- # `lium billing` Show what each pod was actually charged, including removed pods. ## `lium billing history` **Usage** ```bash lium billing history [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--from YYYY-MM-DD` | First UTC day to include | | `--to YYYY-MM-DD` | Last UTC day to include | | `--key NAME\|ID` | Only pods rented through this API key | | `--format table\|json`, `--json` | Output format | **Example** ```bash lium billing history --from 2026-09-01 --to 2026-09-30 ``` --- # `lium fund` Add funds with TAO, alpha or SN51 gamma from your Bittensor wallet. Run with no flags, `lium fund` prompts for a TAO payment. To pay with gamma interactively, start with `lium fund --gamma`. With `--alpha`, only free alpha moves. Ask for more than you have free and nothing is credited. **Usage** ```bash lium fund [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-w`, `--wallet NAME` | Wallet to pay from | | `-a`, `--amount AMOUNT` | TAO, USD with `--alpha`, or the USD target with `--gamma`: the credit is the gamma actually minted and spent | | `--alpha` | Pay with free alpha instead of TAO | | `--gamma` | Pay with SN51 gamma minted from the wallet's TAO; Lium credits 1 USD per gamma spent | | `-k`, `--hotkey HOTKEY` | Hotkey the alpha is staked under (required with `--alpha`) | | `--netuid N` | Subnet whose alpha pays (with `--alpha`; default: Lium's subnet) | | `-y`, `--yes` | Send without asking | | `--json` | Print the result as JSON | **Example** ```bash lium fund -w default -a 10 ``` ## Pay with gamma `lium fund --gamma -w default -a 25` targets a 25 USD top-up paid with SN51 gamma. Lium credits the gamma actually minted and spent, so the credit depends on the quote and the price at inclusion and can be less than the target. The confirmation prompt names the minimum gamma the mint must give, rounded to two decimals; the chain enforces the unrounded minimum, so a mint can succeed slightly below the figure shown; a mint below the unrounded minimum fails (on runtime 493 and later it also fails, and is reverted, if the spend in the same batch fails). Lium credits gamma that is actually spent. It needs lium.io 0.46.8 or later and the Bittensor chain stack; if the stack is missing, the command names the install command for your setup. `--alpha`, `--hotkey` and `--netuid` do not apply. 1. It quotes how much TAO mints the amount and asks you to confirm. The mint fails, costing only the fee, if it would give more than 2% less gamma than quoted. 2. It links the wallet's coldkey to your Lium account; the coldkey's address serves as the gamma hotkey. The link persists, but every top-up signs a fresh link challenge with the coldkey, so the CLI must be logged in with an API key the account owner created in their **personal workspace**, with the `billing` scope and no spending budget. A key with a budget is refused, and so is any team-workspace key. 3. It mints the gamma from the wallet's TAO with one signature: - On subtensor runtime 493 and later, the same transaction spends the gamma at Lium's service on SN51. If the spend fails, the mint is reverted. The CLI then attempts to spend any gamma the mint gave above the minimum, as a separate signed spend. The first payment stands even if that spend fails or its outcome is unknown. If it failed, the CLI warns "Paid, but the gamma left in the deposit was not spent" (with `--json`: `gamma_rest_spent` and `gamma_rest_pending` are 0); the remainder stays in the deposit. To credit it without minting again, use **Credit the rest of my deposit** under [Billing → Add funds](/pod-users/billing#add-funds); otherwise it is spent along with your next top-up. If its outcome is unknown, the CLI warns "Paid. Spending the … gamma left in the deposit may still land" (with `--json`: `gamma_rest_pending` is that amount); it may still land, so check the wallet's finalized transaction history before doing anything else. Until it has settled, the next `lium fund --gamma` from the same coldkey on the same machine exits without sending. In both cases do not run `lium fund --gamma` again just to recover the difference: that mints and pays a whole new amount. - Before runtime 493, the gamma goes to a deposit Lium is allowed to spend. Lium credits 1 gamma = 1 USD, usually within a few minutes. Before runtime 493, a deposit with a positive daily spend cap is also credited only as far as the cap allows, and the rest as the cap refills. Check with `lium balance`. In 0.46.x, `--json` requires `--yes`. On exit 0 the last line on stdout is the JSON object (a remainder warning can print text before it); `tx.gamma_rest_spent` and `tx.gamma_rest_pending` report the remainder. If you cannot parse it, check `lium balance` and the wallet's transaction history; a parse error is not a reason to pay again. If the answer from the chain is lost, the CLI keeps a note of the payment on this machine. While that transaction is unresolved, the next `lium fund --gamma` from the same coldkey on the same machine exits without sending; another machine has no such note and will sign a new payment. Before paying again, check the wallet's finalized transaction history and `lium balance`; retry only after confirming the first payment failed or expired. Before runtime 493, a mint into a deposit whose daily spend cap is zero can land and get no credit until the cap is raised: the CLI does not check the cap before signing, and Lium skips a deposit with no spendable gamma. --- # `lium topup` Add funds with a stablecoin or a card. The key needs the `billing` scope. ## `lium topup currencies` List the stablecoins and networks you can pay with. **Usage** ```bash lium topup currencies [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--refresh` | Fetch the list again instead of using the cache | | `--json` | Print as JSON | **Example** ```bash lium topup currencies ``` ## `lium topup create` Create a stablecoin invoice. It prints the deposit address and the exact amount to send from your wallet. Send the exact amount, on the network shown, before the invoice expires. **Usage** ```bash lium topup create --amount USD --currency CODE --network NAME [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-a`, `--amount USD` | Amount in USD | | `-c`, `--currency CODE` | Stablecoin, e.g. `USDT` | | `-n`, `--network NAME` | Network, e.g. `tron` | | `--wait SECONDS` | Wait for the funds to arrive | | `--json` | Print as JSON | **Example** ```bash lium topup create -a 20 -c USDT -n tron ``` ## `lium topup link` Create a card payment page for a person to pay. Nothing is charged by this command. **Usage** ```bash lium topup link --amount USD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-a`, `--amount USD` | Amount in USD, at least $10 | | `--wait SECONDS` | Wait for the funds to arrive | | `--json` | Print as JSON | **Example** ```bash lium topup link -a 10 ``` ## `lium topup card` Charge a card saved on the account. **Usage** ```bash lium topup card --amount USD [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `-a`, `--amount USD` | Amount in USD, at least $10 | | `--card PM_ID` | Which saved card (default: the default card) | | `--idempotency-key KEY` | Repeat with the same key and amount to avoid a second charge | | `--wait SECONDS` | Wait for the funds to arrive | | `-y`, `--yes` | Charge without asking | | `--json` | Print as JSON (needs `--yes`) | **Example** ```bash lium topup card -a 50 ``` A 402 with a `next_action_url` is still open: hand the URL to the cardholder and repeat only with the **same** `--idempotency-key`. A new key opens a second payment that can also be charged. ## `lium topup wait` Wait until a payment shows on your balance. **Usage** ```bash lium topup wait [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--above USD` | Wait for the balance to rise above this (default: the balance now) | | `--timeout SECONDS` | Give up after this long (default `600`) | | `--json` | Print as JSON | **Example** ```bash lium topup wait --above 0 --timeout 900 ``` --- # `lium ssh-keys` List or add the SSH keys on your Lium account. ## `lium ssh-keys list` List your registered keys. Plain `lium ssh-keys` does the same. **Usage** ```bash lium ssh-keys list ``` **Example** ```bash lium ssh-keys ``` ## `lium ssh-keys sync` Register every local SSH public key that is not on your account yet. **Usage** ```bash lium ssh-keys sync ``` **Example** ```bash lium ssh-keys sync ``` --- # `lium workspaces` and `lium keys` Work in a team [workspace](/pod-users/workspaces) and create its API keys. Creating, inviting, removing, deleting and every `lium keys` command need `lium workspaces login` first. `WORKSPACE` is a workspace name or id. Left out, it is the one chosen with `use`. ## `lium workspaces` **Usage** ```bash lium workspaces SUBCOMMAND [ARGS] [OPTIONS] ``` | Subcommand | What it does | |------------|--------------| | `list` | List your workspaces (plain `lium workspaces` does the same) | | `use WORKSPACE` | Make it the default for every command | | `login` | Sign in with e-mail and password (`--email`, `--password-stdin`) | | `members [WORKSPACE]` | List members | | `create NAME` | Create a workspace (`--use` also makes it the default) | | `invite EMAIL [WORKSPACE]` | Invite someone (`--role member\|admin\|owner`, default `member`) | | `remove WHO [WORKSPACE]` | Remove a member (`-y` skips the question) | | `transfer-billing WHO [WORKSPACE]` | Move the bill to another member (`-y` skips the question) | | `delete [WORKSPACE]` | Delete a workspace (`-y` skips the question) | `list` and `members` also take `--json`. With [two-factor authentication](/pod-users/two-factor-auth) on, `login` asks for the second step after the password. Give `--totp-code` with a code from your authenticator app, or a recovery code. Without it, in a terminal, `login` asks for the code; press Enter instead to confirm in your browser. Without a terminal, `login` goes straight to the browser. The browser step: 1. `login` opens the page in your browser on this computer (and prints the link in case it cannot). 2. The page shows when and where the request came from. Confirm with your passkey or an authenticator code. You do not need to be signed in on that browser. 3. The browser hands the sign-in back to `login`, which waits on a one-time local address (`127.0.0.1`, a random port), and the terminal is signed in. The link works once, for up to 5 minutes. If it expires, run `login` again. On a machine with no browser (over SSH, say), add `--no-browser`: `login` prints a link and a 6-character code instead. Open the link on any device, check that the page shows the same code, confirm, and `login` picks up the sign-in by itself. The browser step is the only way to sign in with a passkey from the CLI. **Example** ```bash lium workspaces create research --use ``` ## `lium keys` **Usage** ```bash lium keys SUBCOMMAND [ARGS] [OPTIONS] ``` | Subcommand | What it does | |------------|--------------| | `list` | List the workspace's keys | | `create NAME` | Create a key; it is printed once | | `show KEY` | Show one key: scopes, spend and budgets | | `budget KEY` | Set or clear a key's budgets | | `scopes` | Explain each scope | **Flags for `keys create`** | Flag | What it does | |------|--------------| | `--scope SCOPE` | `read`, `rent`, `manage` or `billing` (repeatable; default: all but `billing`) | | `--daily-budget USD` | Most the key's pods may spend per UTC day; at the limit its pods are removed | | `--monthly-budget USD` | The same per UTC month | | `--max-budget USD` | The same over the key's lifetime | | `--pod-visibility own\|account` | See only the key's own pods, or every pod | | `--save` | Keep the key for `lium --workspace NAME` | | `-w`, `--workspace WORKSPACE` | Workspace the key belongs to | | `--json` | Print as JSON | `keys budget` takes the same budget flags, plus `--no-daily-budget`, `--no-monthly-budget` and `--no-max-budget` to clear one. **Example** ```bash lium keys create ci --workspace research --save ``` --- # `lium mine` Set up this host as a Lium provider node: clone the node software, configure it, start it and check it. This is what `https://lium.io/mine.sh` runs. **Usage** ```bash lium mine [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--register TOKEN` | Token from the portal's **Add Node** page: also adds the node to your account and waits until it is listed | | `-k`, `--hotkey SS58` | Your provider hotkey (not needed with `--register`) | | `-a`, `--auto` | No prompts; detect GPU and IP | | `-d`, `--dir PATH` | Install folder (default `compute-subnet`) | | `-b`, `--branch NAME` | Branch to install (default `main`) | | `--ip IPV4` | Public IP to register instead of the detected one | | `--internal-port PORT` | Port the node listens on (default `8080`) | | `--external-port PORT` | Port validators connect to (default: the internal port) | | `--price USD` | Price per GPU-hour (with `--register`; default: the GPU's base price). Required for an NVIDIA model the portal has no price for yet | | `--gpu-type NAME` | Portal GPU name to register under (with `--register`) | | `--wait MINUTES` | How long to wait for the node to be listed (with `--register`; default `45`) | | `--portal-url URL` | Provider portal API (with `--register`) | | `-v`, `--verbose` | Show the plan before running | `lium mine status NODE_ID` shows a node's validation status, like `lium provider node status`. **Example** ```bash lium mine --register ``` --- # `lium gpu-splitting` Prepare a provider host's Docker storage so its GPUs can be rented to several renters. Run it on the host. It uses a separate, non-root disk when the host has one, and an XFS image file on a single-disk host. See [GPU splitting](/providers/nodes/gpu-splitting) and [Docker storage](/providers/nodes/docker-storage#single-disk-hosts). ## `lium gpu-splitting check` Show what `setup` would do. Changes nothing. **Usage** ```bash lium gpu-splitting check [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--device PATH` | Disk to check (default: picked for you) | | `--file PATH` | Check the plan for an XFS image file at this path instead of a disk | | `--size GIB` | Size of the image file in GiB (default: free space minus the system reserve); must pass the free-space and GPU-memory checks in [Single-disk hosts](/providers/nodes/docker-storage#single-disk-hosts) | | `--mine-dir PATH` | Directory passed to `lium mine --dir` (default: `compute-subnet` in the current directory); node images already pulled there are not counted in the free-space check again | **Example** ```bash lium gpu-splitting check ``` ## `lium gpu-splitting setup` Move Docker storage to the disk, or to an XFS image file when the host has no spare disk. It may format the disk as XFS, so run `check` first. **Usage** ```bash sudo lium gpu-splitting setup [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--device PATH` | Disk to use (default: picked for you) | | `--file PATH` | Create the XFS image file at this path instead of formatting a disk | | `--size GIB` | Size of the image file in GiB (default: free space minus the system reserve); must pass the free-space and GPU-memory checks in [Single-disk hosts](/providers/nodes/docker-storage#single-disk-hosts) | | `--mine-dir PATH` | Directory passed to `lium mine --dir` (default: `compute-subnet` in the current directory); node images already pulled there are not counted in the free-space check again | | `--yes` | Run without asking (with `--device`, or for an image file) | **Example** ```bash sudo lium gpu-splitting setup --device /dev/nvme1n1 sudo lium gpu-splitting setup --file /data/lium-docker.xfs --size 500 ``` ## `lium gpu-splitting verify` Check that the host meets the requirements. Exits non-zero if not. **Usage** ```bash lium gpu-splitting verify ``` **Example** ```bash lium gpu-splitting verify ``` --- # `lium provider` Manage your provider account and nodes from the terminal: everything the [provider portal](https://provider.lium.io) does. To install the node software on a host, use [`lium mine`](./mine.md). **Shared flags** Every `lium provider` command takes these. | Flag | What it does | |------|--------------| | `-w`, `--coldkey NAME` | Wallet (coldkey) name; or `LIUM_PROVIDER_COLDKEY` | | `-k`, `--hotkey NAME` | Hotkey name on that wallet; or `LIUM_PROVIDER_HOTKEY` | | `-y`, `--yes` | Confirm changes without asking; or `LIUM_PROVIDER_ACK=1` | | `--json` | Print one JSON result per command | | `--dry-run` | Show what would be sent, send nothing | | `--debug` | Print more detail on errors | | `--portal-url URL` | Use another portal URL | **Save your wallet once** ```bash lium config set provider.coldkey my-wallet lium config set provider.hotkey my-hotkey ``` ## `lium provider portal` Log in to the provider portal with your hotkey. **Usage** ```bash lium provider portal login|logout|whoami ``` **Flags** | Flag | What it does | |------|--------------| | `--force` | On `login`: log in again even with a saved session | | `--email ADDRESS` | On `login`: sign in to an e-mail account (no key); password from `LIUM_PROVIDER_PASSWORD` or asked | | `--totp-code CODE` | On `login` with [two-factor](/providers/portal/authentication#two-factor-authentication) on: the code from your authenticator app, or a recovery code; asked when omitted in a terminal (v0.37.0+). Without it, pressing Enter at the prompt (or running without a terminal) finishes the step in your browser on this computer with a passkey or a code, see [Two-factor authentication](/providers/portal/authentication#two-factor-authentication) | | `--no-browser` | On `login` with two-factor on, for a machine without a browser: print a link and a 6-character code to open and compare on any device, instead of opening the browser here | | `--token` | On `login`: save a portal [API token](/providers/portal/authentication#use-the-cli-with-an-api-token) for an e-mail or Google account; asked, not typed on the command line | **Which account commands act on** (v0.46.16+) The latest `login` decides. After `login --email` or `login --token`, the `lium provider` commands (`status`, `node`, `billing`, `machine-request`, `machine`, `sync` and the `config` read and opt-in commands) act on that account, even with `provider.hotkey` saved; `lium provider status` then reports that account. `config set-email` and `config set-password` sign with a hotkey, so while an e-mail account or token is active they need `--hotkey ` (and change that hotkey's account) or a plain `login` first. The signed-in account changes its e-mail and password in the portal (Account settings). A plain `login` switches back to the hotkey, and `logout` from the e-mail account or token goes back to it too. `--hotkey` or `LIUM_PROVIDER_HOTKEY` always wins. `whoami` shows the active one (`active_identity`). **Example** ```bash lium provider portal login ``` ## `lium provider status` Show your registration, portal session and node count at a glance. **Usage** ```bash lium provider status [OPTIONS] ``` **Flags** | Flag | What it does | |------|--------------| | `--netuid N` | Subnet to check (default `51`) | **Example** ```bash lium provider status ``` ## `lium provider node` Add, change and remove your nodes. **Usage** ```bash lium provider node SUBCOMMAND [ARGS] [OPTIONS] ``` | Subcommand | What it does | |------------|--------------| | `list` | List your nodes (`--page`, `--limit`) | | `get NODE_ID` | Show one node | | `status NODE_ID` | Show which validation step the node is on | | `add` | Add a node (flags below) | | `rm NODE_ID` | Remove a node | | `address NODE_ID IP PORT` | Move a node to a new IP and port, keeping its history | | `update-price NODE_ID --price USD` | Change the price per GPU-hour | | `update-gpu NODE_ID --gpu-type TYPE --gpu-count N` | Change the GPU type or count | | `min-gpu set NODE_ID COUNT` / `min-gpu unset NODE_ID` | Set or clear the minimum GPUs per rental | | `notice-period set NODE_ID` / `notice-period unset NODE_ID` | Tell renters about planned downtime (flags below) | | `pods NODE_ID` | List pods on the node | | `machine-requests NODE_ID` | List renter requests for the node | | `notify-added NODE_ID --request-id ID` | Mark a renter request as fulfilled | **Flags for `node add`** | Flag | What it does | |------|--------------| | `--gpu-type TYPE` | GPU model, e.g. `"NVIDIA H200 NVL"` | | `--gpu-count N` | Number of GPUs (default `1`) | | `--ip IP` | Node IPv4 address | | `--port PORT` | Node port (default `8080`) | | `--price USD` | Price per GPU-hour (default: the GPU's base price) | **Flags for `node status`** | Flag | What it does | |------|--------------| | `--watch` | Refresh until you press `Ctrl-C` | | `--until-clear` | With `--watch`: stop once nothing blocks the node | | `--interval SECONDS` | Time between refreshes (default `5`) | | `--timeout SECONDS` | How long `--until-clear` waits | | `--fail-on-blocked` | Exit `10` while something blocks the node | **Flags for `notice-period set`** | Flag | What it does | |------|--------------| | `--start TIME` | Start time with a UTC offset, e.g. `2026-11-01T09:00:00+00:00`; at least 24 h ahead (48 h with `--permanent`) | | `--minutes N` | Maintenance window, `1`–`60` minutes | | `--permanent` | Remove the node for good at the start time | | `--reason TEXT` | Reason shown to renters | **Example** ```bash lium provider node add --gpu-type "NVIDIA H200 NVL" --gpu-count 8 --ip 203.0.113.42 --yes ``` ## `lium provider config` Change your provider account settings. **Usage** ```bash lium provider config SUBCOMMAND [ARGS] [OPTIONS] ``` | Subcommand | What it does | |------------|--------------| | `show` | Show your account profile | | `connect-discord` | Link your Discord account (`--no-wait` prints the link and returns) | | `set-email EMAIL` | Change your contact e-mail (the old confirmed address is told) | | `set-password` | Set your portal password (`--password`, or asked for) | | `set-subscriptions --gpu TYPE` | Get alerts for renter requests for these GPU types (repeat `--gpu`; none clears) | | `opt-in` / `opt-out` | Use lium.io's central miner server, or your own | Connect Discord to be eligible for extra incentives. **Example** ```bash lium provider config connect-discord ``` ## `lium provider sync` Sync node data between the portal and the central miner server. **Usage** ```bash lium provider sync from-miner-server|to-miner-server ``` **Example** ```bash lium provider sync from-miner-server --yes ``` ## `lium provider billing` List your own earnings, one row per UTC day and kind. Shows the last 30 days by default, at most 90 per call. **Usage** ```bash lium provider billing list [--from YYYY-MM-DD] [--to YYYY-MM-DD] ``` **Example** ```bash lium provider billing list --from 2026-10-01 --to 2026-10-17 ``` ## `lium provider machine-request` List what renters are asking for. You see full details once one of your nodes is verified; before that, only counts. **Usage** ```bash lium provider machine-request list lium provider machine-request get REQUEST_ID ``` **Example** ```bash lium provider machine-request list ``` ## `lium provider machine` List GPU models and estimate rewards for a setup. **Usage** ```bash lium provider machine list lium provider machine estimate --gpu-type TYPE --gpu-count N [--gpu-price USD] ``` **Example** ```bash lium provider machine estimate --gpu-type "NVIDIA H200 NVL" --gpu-count 8 ``` ## Exit codes {#exit-codes--errors} `lium provider` uses its own exit codes, not the [general ones](./index.md#exit-codes). Branch on `error.code` in the `--json` result. Since lium 0.13.0 it is the dotted form, for example `portal.request_rejected`; the names below are in `error.legacy_code`. | Code | Meaning | Error codes | |------|---------|-------------| | `0` | Success | | | `1` | Bad input | `ARG_INVALID`, `PORTS_INVALID`, `HOTKEY_NOT_REGISTERED`, `PORTAL_REQUEST_REJECTED` | | `2` | Login problem or not allowed | `PORTAL_AUTH_INVALID`, `PORTAL_AUTH_EXPIRED`, `WALLET_NOT_FOUND`, `PORTAL_FORBIDDEN` | | `3` | Portal error | `PORTAL_SERVER_ERROR`, `PORTAL_NOT_FOUND`, `PORTAL_CONTRACT_DRIFT`, `PORTAL_RATE_LIMIT` | | `5` | SSH error | `SSH_UNREACHABLE`, `SSH_AUTH_FAILED` | | `6` | Missing setting | `CONFIG_MISSING` | | `7` | Another `lium provider` command is logging in; retry | `PORTAL_AUTH_REFRESH_RACE` | | `10` | Node blocked (with `--fail-on-blocked` or `--until-clear`) | | --- # Lium MCP server The Lium docs site has a [Model Context Protocol](https://modelcontextprotocol.io) endpoint. Agents use it to search and read the docs, and to look up the GPUs rentable on Lium right now with their live prices. No sign-in needed. Signed in with Lium at `https://docs.lium.io/mcp/account` (Claude, ChatGPT) or with your [API key](../pod-users/api-keys) as a header (Claude Code, Codex), it also rents and removes pods. :::info For agents For the rest of the platform (volumes, backups, clusters), use the [API](./api) at `https://lium.io/api/openapi.json`. ::: ## Endpoint ``` POST https://docs.lium.io/mcp ``` MCP HTTP transport (JSON-RPC 2.0 over POST). ## Available tools ### `search` Search all docs pages. Without an audience, pages for the other side (renter or provider, guessed from the query) rank lower. **Parameters:** | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `query` | string | yes | Search query | | `audience` | string | no | Filter to one audience: `providers`, `validators`, `pod-users`, `developers` | | `limit` | number | no | Max results (default: 10) | **Example:** ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "search", "arguments": { "query": "register a node", "audience": "providers", "limit": 5 } } } ``` ### `read_page` Read one page as markdown, by URL or slug. **Parameters:** | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `url_or_slug` | string | yes | Full URL, absolute slug, or page basename | **Example:** ```json { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "read_page", "arguments": { "url_or_slug": "/providers/quickstart" } } } ``` ### `search_gpus` GPU nodes rentable right now, cheapest per GPU-hour first, from the [public nodes feed](./public-nodes-feed). Each node carries its live price, tier (`secure` or `spot`), reliability score and a `rent_url`; rent one with `rent_pod`. On `/mcp/directory` nodes carry no `rent_url`: that endpoint lists and compares only. **Parameters:** | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `gpu` | string | no | GPU model, e.g. `H100`, `B200`, `RTX 4090` (case and spacing ignored) | | `count` | number | no | GPUs needed on one node; nodes that cannot rent that many are left out | | `country` | string | no | Two-letter country code, e.g. `US` | | `max_price_per_gpu_hour` | number | no | Price cap in USD per GPU-hour | | `limit` | number | no | Max nodes (default: 10, max 50) | ### `get_gpu_prices` Min, median and max USD price per GPU-hour and the free GPU count for each GPU model rentable right now. Optional `gpu`, `country` and `count` filters as above; pass `count` for a multi-GPU quote. The feed is cached for 30 seconds; `generated_at` in each answer says when Lium produced it. ### `estimate_provider_earnings` What a provider earns per month on Lium by listing `count` GPUs (default 1) of the model `gpu`, the same estimate as the [rewards calculator](https://provider.lium.io/rewards-calculator): rental income and rented extra at the last 30 days' utilisation, plus idle pay at the validator's rate for every unrented hour. It also gives what those GPUs actually earned, and the middle-half range across providers at full idle pay and rented extra: what they can earn, not actual payouts. An estimate, not a guarantee. ### Account tools These need your Lium account on the connection: sign in at `https://docs.lium.io/mcp/account` (below), or send an API key (see **Connect with your API key**). | Tool | What it does | |------|--------------| | `quote_rent` | Prices a rental before it is made, from the live nodes feed: GPU, count, USD per GPU-hour and per hour, and when billing starts. Rents nothing. Returns a `quote_id` and the exact `rent_pod` arguments (valid 30 to 60 minutes) | | `rent_pod` | Rents a pod and waits up to 25 seconds by default (50 seconds max); returns the pod id and ssh command. Give `gpu` and `count` (Lium picks the cheapest node) or a `node_id` from `search_gpus`, a unique `idempotency_key`, `quoted_price_per_gpu_hour` and the `quote_id` that `quote_rent` returned for the same terms; other terms rent nothing, and a node asking more than one cent per GPU-hour above the quoted price is not rented. **Billed per second until `remove_pod`**; on any image other than the node's default, billing starts at the rent request, so startup time is billed too ([when a pod is charged](../pod-users/billing#when-a-pod-is-charged)). | | `list_pods` | Your pods with status, ssh command and price per hour | | `get_pod` | One pod by `pod_id` | | `prepare_removal` | Lists what a removal would delete (name, id, GPU, status, price per hour, spend so far) for up to 50 `pod_ids`, with each pod's `removal_token` (valid 30 to 60 minutes). Removes nothing | | `remove_pod` | Deletes one pod; billing stops when accepted. Takes `pod_id`, the pod's `pod_name` and the `removal_token` from `prepare_removal`, and removes nothing if either does not match. A bulk removal is one call per pod | | `get_balance` | Your balance in USD | | `list_templates` | Docker templates for `rent_pod`'s `template_id`; `official` marks Lium's, `yours` your own | Renting and removing are two steps: `quote_rent` and `prepare_removal` show the exact targets and cost, and `rent_pod` and `remove_pod` act only with what they return, so the agent gets your yes first. The MCP cannot send, transfer or withdraw funds of any kind. A [spend budget](../pod-users/api-keys) on the key caps what the agent can spend. ### Without renting: `/mcp/directory` `https://docs.lium.io/mcp/directory` signs in like `/mcp/account` but issues a read-only key. It serves the docs and GPU tools plus `list_pods`, `get_pod` and `get_balance`; it cannot rent, remove pods or spend your balance, and its answers carry no rental, checkout or top-up links. Its `search` and `read_page` serve only docs pages that name no renting, billing, top-ups, payments, credit transfers or code that starts a pod (none of the SDK examples); a question about those, or about sending TAO, gets a short decline with no steps. Its tool descriptions name no way to pay, rent or move credit, and its `get_balance` returns the balance alone, without the low-balance banner. ## Connect with your API key 1. Create a key at [lium.io/api-keys](https://lium.io/api-keys) and add credit. 2. Add the endpoint with the header `Authorization: Bearer `. **Claude Code** ```bash claude mcp add --transport http lium https://docs.lium.io/mcp --header "Authorization: Bearer $LIUM_API_KEY" ``` **Codex CLI** (`~/.codex/config.toml`) ```toml [mcp_servers.lium] url = "https://docs.lium.io/mcp" bearer_token_env_var = "LIUM_API_KEY" ``` **Other MCP clients** ```json { "mcpServers": { "lium": { "url": "https://docs.lium.io/mcp", "headers": { "Authorization": "Bearer " } } } } ``` ## Use in Claude **Claude (claude.ai or desktop)** 1. Open **Settings → Connectors**. 2. Click **Add custom connector**. 3. Enter `https://docs.lium.io/mcp/account` to rent pods (or `https://docs.lium.io/mcp` for the docs and GPU prices only, no sign-in), leave the OAuth settings empty, and click **Add**. 4. For `/mcp/account`, click **Connect**, check the page says you return to **claude.ai**, then sign in on lium.io and approve. 5. In a chat, turn the connector on from the tools menu. The approval creates an API key named `lium CLI MCP Claude …` on [lium.io/api-keys](https://lium.io/api-keys). Delete it there to disconnect; set a [budget](../pod-users/api-keys#budgets) on it to cap spend. **Claude Code** ```bash claude mcp add --transport http lium-docs https://docs.lium.io/mcp ``` **Other MCP clients** ```json { "mcpServers": { "lium-docs": { "url": "https://docs.lium.io/mcp" } } } ``` **ChatGPT** 1. Turn on developer mode in **Settings → Apps → Advanced settings**. 2. Create an app with the URL `https://docs.lium.io/mcp/account` and authentication **OAuth** to rent pods (or `https://docs.lium.io/mcp` and no authentication for the docs only). 3. Click **Connect**, sign in on lium.io and approve. 4. Enable it in a chat. If the app is not connected, an account tool shows **Sign in with Lium** in the chat. Limit: 600 requests per minute per IP address. ## `.md` URLs Add `.md` to any docs URL to get the page as markdown: ```bash curl https://docs.lium.io/providers/quickstart.md ``` Or send `Accept: text/markdown`: ```bash curl -H 'Accept: text/markdown' https://docs.lium.io/providers/quickstart ``` --- # llms.txt The docs site publishes `llms.txt` and `llms-full.txt`, following the [llmstxt.org specification](https://llmstxt.org). ## Endpoints | URL | Description | |-----|-------------| | `https://docs.lium.io/llms.txt` | Index: page titles + 1-line summaries + `.md` URLs | | `https://docs.lium.io/llms-full.txt` | Full bundle: all pages concatenated with H1 separators | ## Format `llms.txt` is a title, a short description and links grouped by audience: ``` # Lium Documentation > Lium (lium.io) is a GPU rental marketplace: rent NVIDIA GPUs by the hour, billed per second. Live prices: https://lium.io/pricing.json Built for agents: a CLI and Python SDK with JSON output, ... ## Providers - [Provider Quickstart](/providers/quickstart.md): Register and launch your first provider node in 5 minutes. - [Architecture](/providers/architecture.md): Self-hosted provider + node architecture. ... ``` `llms-full.txt` is every page's markdown, each starting with its H1: ``` # Provider Quickstart --- # Architecture ... ``` ## Usage with LLMs Give the whole bundle to a model as context: ```python import anthropic import httpx llms_full = httpx.get("https://docs.lium.io/llms-full.txt").text client = anthropic.Anthropic() response = client.messages.create( model="claude-sonnet-4-5", max_tokens=1024, messages=[{ "role": "user", "content": f"\n{llms_full}\n\n\nHow do I register a provider node?" }] ) print(response.content[0].text) ``` For tool use, prefer the [MCP endpoint](./mcp). To call the platform, use the [API](./api). --- # ApiKeysClient ```python from lium.sdk import ApiKeysClient ``` Defined in `lium.sdk.api_keys`. ```python ApiKeysClient(lium: lium.sdk.client.Lium) ``` ## Methods | Method | Description | | --- | --- | | [`scopes_payload`](#scopes_payload) | The body of GET /keys/scopes as the server sent it, read once per client:. | | [`scopes`](#scopes) | Every scope the server knows: its sentence, what a key holding it can do, the routes it opens,. | | [`pod_visibilities`](#pod_visibilities) | \{"own": <sentence>, "account": <sentence>\}, the server's words for each pod-visibility value. | | [`list`](#list) | The keys of a workspace (GET /keys, X-Lium-Workspace-Id when given). | | [`get`](#get) | One key by id (GET /keys/\{id\}). | | [`refusals`](#refusals) | The requests this key's budget refused, newest first (GET /keys/\{id\}/refusals, the ledger's. | | [`revoke`](#revoke) | Revoke a key (DELETE /keys/\{id\}): it stops working at once. Used by lium keys create to take. | | [`resolve`](#resolve) | A key by name (case-insensitive) or id among the workspace's keys. | | [`create`](#create) | Mint a key (POST /keys); the secret is in the returned key this once. | | [`update`](#update) | Set or clear a key's budgets (PATCH /keys/\{id\}). | ### scopes_payload ```python def scopes_payload() -> Dict[str, Any]: ``` The body of ``GET /keys/scopes`` as the server sent it, read once per client: ``\{"scopes": [...], "pod_visibility": [...], "money_routes": [...]\}``. A server before per-key budgets has no such route: the path falls into its session-only ``GET /keys/\{id\}`` and answers 401 (lium.io on 21 Sep 2026), or 404 once that route is gone. On a server that has the route it takes no credential at all, so neither answer can mean a bad key, both become one [`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error) that names the missing route. A server that answers a bare list is read as the ``scopes`` list alone. ### scopes ```python def scopes() -> List[lium.sdk.models.ApiKeyScope]: ``` Every scope the server knows: its sentence, what a key holding it can do, the routes it opens, and whether a key made without naming scopes gets it. ### pod_visibilities ```python def pod_visibilities() -> Dict[str, str]: ``` ``\{"own": , "account": \}``, the server's words for each pod-visibility value. ### list ```python def list(workspace_id: Optional[str] = None) -> List[lium.sdk.models.ApiKeyInfo]: ``` The keys of a workspace (``GET /keys``, ``X-Lium-Workspace-Id`` when given). ### get ```python def get( key_id: str, workspace_id: Optional[str] = None ) -> lium.sdk.models.ApiKeyInfo: ``` One key by id (``GET /keys/\{id\}``). ### refusals ```python def refusals( key_id: str, workspace_id: Optional[str] = None ) -> List[lium.sdk.models.ApiKeyRefusal]: ``` The requests this key's budget refused, newest first (``GET /keys/\{id\}/refusals``, the ledger's ``api_key_budget_refused`` rows). Without a browser session the API key asks about itself. A server without the route answers 404 ([`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error)); a body of ``\{"refusals": [...]\}`` or a bare list is read alike. Rows are ordered on the parsed stamp, so ``Z``, offset and naive stamps sort together; unreadable ones go last. ### revoke ```python def revoke(key_id: str, workspace_id: Optional[str] = None) -> None: ``` Revoke a key (``DELETE /keys/\{id\}``): it stops working at once. Used by ``lium keys create`` to take back a key the server minted without the cap that was asked for. ### resolve ```python def resolve( name_or_id: str, workspace_id: Optional[str] = None ) -> lium.sdk.models.ApiKeyInfo: ``` A key by name (case-insensitive) or id among the workspace's keys. Names are not unique on the server: two keys with that name is an error that names both ids. ### create ```python def create( name: str, scopes: Optional[Iterable[str]] = None, *, daily_budget_usd: Optional[float] = None, monthly_budget_usd: Optional[float] = None, max_budget_usd: Optional[float] = None, pod_visibility: Optional[str] = None, workspace_id: Optional[str] = None, allow_unrecorded: bool = False ) -> lium.sdk.models.ApiKeyInfo: ``` Mint a key (``POST /keys``); the secret is in the returned ``key`` this once. ``scopes`` defaults to `DEFAULT_SCOPES` (``read``, ``rent``, ``manage``) and is always sent, so ``billing``, the money routes, is on a key only when named, alone or next to the other scopes. The three budgets (``daily_budget_usd`` per UTC day, ``monthly_budget_usd`` per UTC month, ``max_budget_usd`` for the key's lifetime) are sent as numbers (USD ≥ 1, whole cents) only when given, daily ≤ monthly ≤ max. ``pod_visibility`` (``own``: the key sees only the pods it creates; ``account``: every pod of the account) is sent only when given, left ``None``, the server's own default decides, which its operator may switch. A server before per-key budgets ignores the budget and visibility fields and answers the row without them: `unrecorded()` tells, and this method revokes the key unless ``allow_unrecorded`` is true (the CLI sets that so ``--allow-unbudgeted`` can keep the key). ### update ```python def update( key_id: str, *, daily_budget_usd: Optional[float] = UNSET, monthly_budget_usd: Optional[float] = UNSET, max_budget_usd: Optional[float] = UNSET, workspace_id: Optional[str] = None ) -> lium.sdk.models.ApiKeyInfo: ``` Set or clear a key's budgets (``PATCH /keys/\{id\}``). A budget given as a number is set, as ``None`` is cleared, left out (`UNSET`) is kept as it is; naming none is a ``ValueError`` here (the server would answer 400). The budgets named here must keep daily ≤ monthly ≤ max among themselves. Scopes and pod visibility are fixed at creation and cannot be changed. --- # JobResult ```python from lium.sdk import JobResult ``` Defined in `lium.sdk.bounded_job`. What [`run_job()`](/developers/sdk/reference/client/lium#run_job) did. ``to_dict()`` is JSON-ready. ``cleanup`` is ``"removed"`` (the pod was deleted and is gone from the pod list), ``"scheduled"`` (its absence was not confirmed; the acknowledged server-side removal at ``removal_scheduled_at`` stands), ``"not_rented"`` (the rent was refused), or ``"unknown"`` (neither removal nor a schedule was confirmed, or a rent whose answer was lost may still have created a pod named ``name``: check [`ps()`](/developers/sdk/reference/client/lium#ps)). ``removal_scheduled_at`` is set only once the server acknowledged the schedule. ``cost_usd`` is what the billing statement shows for the pod, read only after a confirmed removal (``None`` otherwise, or when the statement does not list it yet); ``estimated_cost_usd`` is the rent's hourly price times the seconds from just before the rent request to removal (to ``removal_scheduled_at`` when removal is unconfirmed). ```python JobResult( status: str, name: str, exit_code: Optional[int] = None, stdout: str = '', stderr: str = '', error: Optional[str] = None, pod_id: Optional[str] = None, price_per_hour: Optional[float] = None, removal_scheduled_at: Optional[str] = None, outputs: Dict[str, str] = , missing_outputs: Dict[str, str] = , cleanup: str = 'not_rented', cost_usd: Optional[float] = None, estimated_cost_usd: Optional[float] = None, seconds: float = 0.0 ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `status` | str | | | `name` | str | | | `exit_code` | Optional[int] | `None` | | `stdout` | str | `''` | | `stderr` | str | `''` | | `error` | Optional[str] | `None` | | `pod_id` | Optional[str] | `None` | | `price_per_hour` | Optional[float] | `None` | | `removal_scheduled_at` | Optional[str] | `None` | | `outputs` | Dict[str, str] | | | `missing_outputs` | Dict[str, str] | | | `cleanup` | str | `'not_rented'` | | `cost_usd` | Optional[float] | `None` | | `estimated_cost_usd` | Optional[float] | `None` | | `seconds` | float | `0.0` | ## Properties | Name | Type | Description | | --- | --- | --- | | `ok` | bool | | ## Methods | Method | Description | | --- | --- | | [`to_dict`](#to_dict) | | ### to_dict ```python def to_dict() -> Dict[str, Any]: ``` --- # AlphaQuote ```python from lium.sdk import AlphaQuote ``` Defined in `lium.sdk.client`. USD -> alpha quote from ``GET /balance/convert/alpha``. ``netuid`` is the subnet the alpha transfer goes to. The API sets it, and the transfer uses the value from the quote. ```python AlphaQuote( usd: decimal.Decimal, alpha_amount: decimal.Decimal, rate: decimal.Decimal, netuid: int ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `usd` | decimal.Decimal | | | `alpha_amount` | decimal.Decimal | | | `rate` | decimal.Decimal | | | `netuid` | int | | --- # AlphaSubnet ```python from lium.sdk import AlphaSubnet ``` Defined in `lium.sdk.client`. One subnet whose alpha Lium accepts as payment (``GET /balance/alpha/subnets``). ```python AlphaSubnet(netuid: int, name: str, symbol: str) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `netuid` | int | | | `name` | str | | | `symbol` | str | | --- # AlphaSubnets ```python from lium.sdk import AlphaSubnets ``` Defined in `lium.sdk.client`. The accepted-subnet set from ``GET /balance/alpha/subnets``. ``primary`` is the subnet a quote without a ``netuid`` is made on; the set itself follows pool liquidity on the pay API, so it changes without a CLI release. ```python AlphaSubnets(subnets: tuple[lium.sdk.client.AlphaSubnet, ...], primary: int) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `subnets` | tuple[[AlphaSubnet](/developers/sdk/reference/client/alpha-subnet), ...] | | | `primary` | int | | ## Properties | Name | Type | Description | | --- | --- | --- | | `netuids` | tuple[int, ...] | | ## Methods | Method | Description | | --- | --- | | [`get`](#get) | | ### get ```python def get(netuid: int) -> Optional[lium.sdk.client.AlphaSubnet]: ``` --- # Lium ```python from lium.sdk import Lium ``` Defined in `lium.sdk.client`. Clean Unix-style SDK for Lium. ```python Lium( config: Optional[lium.sdk.config.Config] = None, source: str = 'sdk', workspace: Optional[str] = None ) ``` ## Attributes | Name | Type | Description | | --- | --- | --- | | `config` | | | | `source` | | | | `headers` | | | | `api_keys` | | | | `CLUSTER_IMAGE_PREFIX` | | | | `JOB_ENV_VAR` | | | | `GPU_QUERY_FIELDS` | | | | `GPU_QUERY_COMMAND` | | | | `TERMINAL_POD_STATUSES` | | | | `MISSING_GRACE_SECONDS` | | | | `FIRST_POLL_SECONDS` | | | | `FIRST_POLL_WINDOW_SECONDS` | | | | `FAST_POLL_SECONDS` | | | | `FAST_POLL_WINDOW_SECONDS` | | | | `SLOW_POLL_SECONDS` | | | | `TRANSFER_KEY_ENV` | | | | `TRANSFER_TIMEOUT` | | | | `TRANSFER_KEY_LOCK` | | | ## Methods | Method | Description | | --- | --- | | [`close`](#close) | Close the SSH connections this client keeps open between calls. | | [`features`](#features) | Optional API capabilities the backend advertises on GET /version. | | [`supports`](#supports) | Whether the backend advertises feature (see features()). | | [`list_ssh_keys`](#list_ssh_keys) | Return SSH keys registered for the current user. | | [`register_ssh_key`](#register_ssh_key) | Register a new SSH public key under the current user. | | [`default_ssh_key_name`](#default_ssh_key_name) | cli-<user>@<host> sanitised to A-Za-z0-9.@-. | | [`upload_build_context`](#upload_build_context) | Upload a gzipped tar of a custom build's context (see lium.sdk.build_context.pack()). | | [`up`](#up) | Start a new pod on a specific node. | | [`pod_by_name`](#pod_by_name) | The pod called name, or whose huid or id is name, if it exists. | | [`rental`](#rental) | Rent a pod on executor_id for the duration of a with block and always remove it. | | [`run_job`](#run_job) | Run one bounded job on a rented GPU and remove the pod; never raises for the job's outcome. | | [`rent`](#rent) | Rent the cheapest available node that satisfies a spec, without listing the fleet. | | [`pod`](#pod) | Retrieve detailed information about a specific pod. | | [`logs`](#logs) | Stream logs from a pod. | | [`edit`](#edit) | Edit a pod's template configuration. | | [`ls`](#ls) | List available nodes. | | [`ps`](#ps) | List active pods. | | [`billing_statement`](#billing_statement) | The account's pod charges grouped by pod (GET /billing/statement), most recently billed first. | | [`pod_feedback`](#pod_feedback) | Leave feedback on a pod's node (POST /pods/\{id\}/feedback): rating 1-5, text, reason. | | [`down`](#down) | Stop a pod. | | [`rm`](#rm) | Remove pod (alias for down()). | | [`reboot`](#reboot) | Reboot a pod. | | [`reset_gpu`](#reset_gpu) | Reset a pod's hung GPUs: stops the container, resets the GPUs, starts it again. | | [`lock_gpu_clocks`](#lock_gpu_clocks) | Lock a pod's GPU core clocks to min_mhz..max_mhz. Nothing in the pod is stopped. | | [`reset_gpu_clocks`](#reset_gpu_clocks) | Return a pod's GPU clocks to the driver default; same response and errors as lock_gpu_clocks. | | [`clusters`](#clusters) | Groups of free nodes that sit on one RDMA fabric and can be rented as one cluster. | | [`cluster_offer`](#cluster_offer) | The offer for one fabric (exact id, or a unique prefix of it). | | [`cluster_template`](#cluster_template) | The template every cluster rental must use (daturaai/lium-cluster); newest tag wins. | | [`up_cluster`](#up_cluster) | Rent several nodes of one fabric as a single all-or-nothing cluster. | | [`my_clusters`](#my_clusters) | The caller's cluster rentals, one Cluster per cluster_id found in ps(). | | [`cluster`](#cluster) | One cluster by id (exact, or a unique prefix), from the caller's pods. | | [`wait_cluster_ready`](#wait_cluster_ready) | Poll until every member of cluster is RUNNING with SSH metadata. | | [`rm_cluster`](#rm_cluster) | Remove every member pod of a cluster with one DELETE /clusters/\{cluster_id\}. | | [`get_default_images`](#get_default_images) | Get default images for GPU type and driver version. | | [`default_docker_template`](#default_docker_template) | Resolve the best default template for a node ID. | | [`templates`](#templates) | List available templates. | | [`get_executor`](#get_executor) | Resolve a node by UUID or HUID against the same listing ls() returns. | | [`pod_record`](#pod_record) | What one run ran on and what it cost, readable after the pod is removed. | | [`quote`](#quote) | What renting a node for hours costs, line by line, at the rates billing charges. | | [`ambiguous_executor_message`](#ambiguous_executor_message) | The sentence for a HUID that is shared by several listed nodes. | | [`executor_not_found_message`](#executor_not_found_message) | The one sentence every caller prints when a node id resolves to nothing. | | [`gpu_types`](#gpu_types) | Get list of available GPU types. | | [`gpu_short_types`](#gpu_short_types) | The short GPU types the marketplace knows (H100, RTX4090, ...), sorted. | | [`unknown_gpu_type`](#unknown_gpu_type) | None when gpu_short names a known GPU type; otherwise the list of known types. | | [`request_machine`](#request_machine) | Ask providers for a GPU type that is sold out (POST /machine-requests). | | [`get_template`](#get_template) | Fetch a template by ID/HUID/name. | | [`get_template_by_image_name`](#get_template_by_image_name) | Fetch a template by its Docker image + tag. | | [`ssh_connection`](#ssh_connection) | SSH connection context manager. | | [`ssh_session`](#ssh_session) | Keep one SSH connection to pod open for the whole block. | | [`has_open_connection`](#has_open_connection) | Whether this client holds a live SSH connection to pod (kept from an earlier call, or an open ssh_session()). | | [`exec`](#exec) | Execute a shell command on a pod over SSH. | | [`default_detach_log_path`](#default_detach_log_path) | /workspace/logs/exec-<UTC stamp>-<6 hex>.log; the tail keeps two. | | [`build_detached_command`](#build_detached_command) | The remote command line that starts command in the background and prints its PID. | | [`login_shell_env`](#login_shell_env) | (prelude, exec_env) that make a bash -lc job see env. | | [`run_background`](#run_background) | Start command in the background on a pod and return a Job to follow it. | | [`job`](#job) | Re-attach to a job started earlier with run_background(), by name. | | [`jobs`](#jobs) | Every job that has a PID file under job_dir on the pod, running or finished. | | [`wait_for_port`](#wait_for_port) | Block until TCP port accepts connections inside the pod (a server that is up). | | [`parse_gpu_stats`](#parse_gpu_stats) | Parse nvidia-smi --query-gpu=... --format=csv,noheader,nounits output. | | [`gpu_stats`](#gpu_stats) | Per-GPU utilization, memory, temperature and power on a pod, via nvidia-smi. | | [`stream_exec`](#stream_exec) | Execute a shell command and stream incremental output. | | [`exec_all`](#exec_all) | Execute a shell command on multiple pods in parallel. | | [`poll_delay`](#poll_delay) | Seconds to sleep between two wait_ready polls. | | [`pod_events`](#pod_events) | The pod's event log, oldest first, creation, reboots, failures with their error, and. | | [`pod_failure_cause`](#pod_failure_cause) | What the backend recorded as the reason the pod failed or was closed, or None. | | [`wait_ready`](#wait_ready) | Poll until a pod reports RUNNING + SSH metadata. | | [`scp`](#scp) | Upload a local file to a pod via SFTP. | | [`download`](#download) | Download a file from a pod via SFTP. | | [`upload`](#upload) | Upload a file to a pod via SFTP. | | [`ssh_argv`](#ssh_argv) | The OpenSSH argument list that opens a shell on a pod. | | [`refresh_pod`](#refresh_pod) | Re-read one pod from the API. | | [`ssh`](#ssh) | Get SSH command string for connecting to a pod. | | [`rsync_options`](#rsync_options) | The rsync flags shared by rsync() and cp(). | | [`rsync`](#rsync) | Sync files between the local machine and a pod with rsync. | | [`cp`](#cp) | Copy files from one pod to another over SSH, without passing through this machine. | | [`transfer_keypair`](#transfer_keypair) | A fresh ed25519 key pair for one copy, as OpenSSH text. | | [`grant_transfer_key_command`](#grant_transfer_key_command) | The remote line that appends authorized_line to the pod's authorized_keys. | | [`revoke_transfer_key_command`](#revoke_transfer_key_command) | The remote line that drops every authorized_keys entry carrying public_key. | | [`switch_template`](#switch_template) | Switch the template of a running pod. | | [`create_template`](#create_template) | Create a new template. | | [`wait_template_ready`](#wait_template_ready) | Wait for template verification to complete. | | [`me`](#me) | The account the API key belongs to, as GET /users/me returns it. | | [`get_my_user_id`](#get_my_user_id) | Get the current user's ID. | | [`update_template`](#update_template) | Update an existing template owned by the caller. | | [`wallets`](#wallets) | Get the caller's configured funding wallets. | | [`add_wallet`](#add_wallet) | Link your wallet to the user account. | | [`alpha_subnets`](#alpha_subnets) | The subnets whose alpha Lium accepts as payment (GET /balance/alpha/subnets). | | [`convert_alpha`](#convert_alpha) | Quote usd (USD) -> alpha via GET /balance/convert/alpha. | | [`company_wallet`](#company_wallet) | Resolve the Lium deposit address via GET /wallet/company/?app_id=. | | [`link_gamma_hotkey`](#link_gamma_hotkey) | Link hotkey so SN51 gamma it pays Lium with becomes this account's USD credit. | | [`backup_create`](#backup_create) | Create or replace a backup configuration for a pod. | | [`backup_update`](#backup_update) | Replace the schedule of an existing backup configuration in place. | | [`backup_now`](#backup_now) | Trigger an immediate backup for a pod. | | [`backup_config`](#backup_config) | Return the backup configuration for a pod if one exists. | | [`backup_list`](#backup_list) | List all backup configurations across all pods. | | [`backup_logs`](#backup_logs) | Get recent backup logs for a pod. | | [`backup_logs_all`](#backup_logs_all) | Get all backup logs available to the current user. | | [`backup_log`](#backup_log) | Get one backup log owned by the authenticated user. | | [`resolve_backup_id`](#resolve_backup_id) | Resolve an eight-character backup ID shown by the CLI. | | [`backup_delete`](#backup_delete) | Delete a backup configuration by ID. | | [`backup_cancel`](#backup_cancel) | Request cancellation of an active backup while retaining its history. | | [`backup_log_delete`](#backup_log_delete) | Delete the stored data for a completed backup and retain its audit row. | | [`restore`](#restore) | Restore a backup to a pod. | | [`restore_logs`](#restore_logs) | Get recent restore logs for a pod. | | [`resolve_restore_id`](#resolve_restore_id) | Resolve an eight-character restore ID shown by the CLI. | | [`restore_cancel`](#restore_cancel) | Request cancellation of an active restore. | | [`get_deployment_estimate`](#get_deployment_estimate) | Estimate deployment time for a template on a node. | | [`balance`](#balance) | Get current account balance. | | [`balance_or_none`](#balance_or_none) | The balance from /users/me, or None when the answer has no balance field, where. | | [`events`](#events) | The account's event log, newest first (GET /users/me/events). | | [`audit_log`](#audit_log) | One page of the account audit log, newest first (GET /account/audit). | | [`topup_currencies`](#topup_currencies) | List stablecoin currencies/networks supported for self-serve top-ups. | | [`topup_create_invoice`](#topup_create_invoice) | Create a stablecoin top-up invoice for the current account. | | [`transfer_credits`](#transfer_credits) | Move credit from this account's balance to another account (POST /users/me/transfer-credits). | | [`topup_checkout_link`](#topup_checkout_link) | Open a Stripe Checkout page that tops up this account by card (POST /stripe/create-checkout-session). | | [`wait_for_credit`](#wait_for_credit) | Poll the balance until it rises above baseline (a top-up landed) or timeout seconds pass. | | [`volumes`](#volumes) | List all volumes for the current user. | | [`volume`](#volume) | Get a specific volume by ID. | | [`volume_create`](#volume_create) | Create a new volume. | | [`volume_update`](#volume_update) | Update a volume's metadata. | | [`volume_delete`](#volume_delete) | Delete a volume. | | [`schedule_termination`](#schedule_termination) | Schedule a pod for automatic termination at a future date and time. | | [`cap_spend`](#cap_spend) | Schedule the pod's removal for the moment it will have spent budget_usd. | | [`cancel_scheduled_termination`](#cancel_scheduled_termination) | Cancel a scheduled termination for a pod. | | [`install_jupyter`](#install_jupyter) | Install Jupyter Notebook on a pod. | ### close ```python def close() -> None: ``` Close the SSH connections this client keeps open between calls. `exec()`, `stream_exec()`, `upload()` and `download()` keep one connection per pod open after they return, so the next call to that pod skips the TCP + SSH handshake. They are closed here, when the client is garbage-collected, or at interpreter exit; ``with Lium() as lium:`` closes them at the end of the block. ### features ```python def features() -> set: ``` Optional API capabilities the backend advertises on ``GET /version``. Read once per client. A backend that predates the list advertises nothing; one that cannot be reached advertises nothing for now and is asked again next time, so a passing outage does not switch a feature off for the client's lifetime. ### supports ```python def supports(feature: str) -> bool: ``` Whether the backend advertises ``feature`` (see `features()`). ### list_ssh_keys ```python def list_ssh_keys() -> List[lium.sdk.models.SSHKey]: ``` Return SSH keys registered for the current user. ### register_ssh_key ```python def register_ssh_key(*, name: str, public_key: str) -> lium.sdk.models.SSHKey: ``` Register a new SSH public key under the current user. ### default_ssh_key_name ```python def default_ssh_key_name() -> str: ``` ``cli-@`` sanitised to ``[A-Za-z0-9._@-]``. ### upload_build_context ```python def upload_build_context(archive: bytes, timeout: float = 30) -> str: ``` Upload a gzipped tar of a custom build's context (see `lium.sdk.build_context.pack()`). Returns the archive's sha256, which `up()` and `rent()` take as ``build_context_sha256``. Needs a backend that advertises ``build_context`` (`supports()`); the archive is kept for a limited time, so upload it right before the rent. Uploading the same archive again is harmless. ``timeout`` is the requests timeout in seconds (each connect/send/read, not the whole upload). ### up ```python def up( *, executor_id: str, name: str = 'Your Pod', template_id: Optional[str] = None, image: Optional[str] = None, dockerfile_content: Optional[str] = None, build_context_sha256: Optional[str] = None, volume_id: Optional[str] = None, ports: Optional[int] = None, ssh_keys: Optional[List[str]] = None, ssh_name: Optional[str] = None, enable_volume_encryption: bool | None = None, backup_id: Optional[str] = None, restore_path: Optional[str] = None, gpu_count: Optional[int] = None, wait: bool = False, timeout: int = 600, idempotency_key: Optional[str] = None, confirmed_only: bool = False, before_send: Optional[Callable[[Dict[str, Any]], NoneType]] = None, termination_hours: Optional[int] = None, enable_backups: bool = True, enable_jupyter: bool = False ) -> Union[Dict[str, Any], lium.sdk.models.PodInfo]: ``` Start a new pod on a specific node. **Arguments:** - **executor_id:** Target node ID string. - **name:** Human-friendly pod name (defaults to ``"Your Pod"``). - **template_id:** Template ID. Defaults to the node's default template. Mutually exclusive with ``image`` and ``dockerfile_content``. - **image:** Docker image to run, passed to the backend whole (``"repo/name:tag"``, ``"registry:5000/team/img"``, ``"repo/name@sha256:"``; the backend splits name, tag and digest and defaults the tag to ``latest``), the same as ``lium up --image``: a private one-time template is created for it with port 22 exposed and the image's own entrypoint/command, and deleted with the pod. Mutually exclusive with ``template_id`` and ``dockerfile_content``. - **dockerfile_content:** Raw Dockerfile text to build the pod image from on the node (custom build). Mutually exclusive with ``template_id``, pass exactly one. The image is built remotely with no network access, so the Dockerfile must be self-contained (no ``ADD `` or ``ADD $\{var\}`` directives). - **build_context_sha256:** What `upload_build_context()` returned: the files the Dockerfile's ``COPY``/``ADD`` read, unpacked next to it on the node. Needs ``dockerfile_content`` and a backend that advertises ``build_context``. - **volume_id:** Optional volume ID to attach on spawn. - **ports:** Number of exposed ports to request. - **ssh_keys:** SSH public keys to authorize. Defaults to the keys discovered by the Config. - **ssh_name:** Optional name to use when registering a new SSH key with the backend. Defaults to ``cli-@``. Only applied to keys that are not already registered server-side. - **enable_volume_encryption:** Whether to request encryption for the local pod volume. ``None`` (the default) requests it only when the template advertises support (`[`supports_volume_encryption`](/developers/sdk/reference/models/template#supports_volume_encryption)`); a Dockerfile build or a plain ``image`` does not. ``True`` requests it for any image; an image without support then gets a plain volume. - **backup_id:** Optional backup ID to restore after the pod starts. - **restore_path:** New or empty subdirectory where the backup is restored. Required when ``backup_id`` is provided. - **wait:** When ``True``, block until the pod is RUNNING with an SSH endpoint and return it as a [`PodInfo`](/developers/sdk/reference/models/pod-info). The pod is billing from the moment the rent call returns, so a timeout raises a [`LiumError`](/developers/sdk/reference/exceptions/lium-error) that names the pod id. - **timeout:** Seconds to wait for readiness when ``wait`` is set. - **gpu_count:** Rent only this many of the node's GPUs (GPU splitting). ``None`` takes every GPU that is free on the node right now (the whole node when none of it is rented). The API rejects a count above the free GPUs, below the provider's minimum, or on nodes that do not allow splitting; a count below the free GPUs on a node listed whole-host-only ([`whole_host_only`](/developers/sdk/reference/models/executor-info#whole_host_only) with ``enable_jupyter``, [`whole_host_only_ssh_only`](/developers/sdk/reference/models/executor-info#whole_host_only_ssh_only) without) raises ``ValueError`` after the node listing is read and before the rent request is sent; requesting all its free GPUs rents as usual. - **idempotency_key:** The ``Idempotency-Key`` the rent request carries (a new UUID when ``None``). The API keeps a key only for a limited time and per account, so a key sent again later can rent a second pod. - **confirmed_only:** Return only a pod the rent response named. A pod found by its name after a lost answer is then not returned: [`LiumRentOutcomeUnknownError`](/developers/sdk/reference/exceptions/lium-rent-outcome-unknown-error) is raised with its id in ``candidates``, since a same-name pod may belong to another client. - **before_send:** Called with ``\{"endpoint", "payload", "idempotency_key"\}`` right before the first rent request is sent, e.g. to journal it. If it raises, nothing is sent and the exception propagates. - **termination_hours:** Sent with the rent (1 to 720): the server removes the pod this many hours after it starts, even if this process never gets to schedule it. - **enable_backups:** Lium backs up a new pod's volume automatically by default when the account has a paid deposit or existing backup storage. Without either, the pod is still rented but gets no backup, and the result's ``backup_notice`` says so: check it. ``False`` turns the backup off for this pod. **Returns:** Pod metadata as returned by the rent API (id, name, status, ssh command, etc.), or the ready [`PodInfo`](/developers/sdk/reference/models/pod-info) when ``wait`` is ``True``. ### pod_by_name ```python def pod_by_name(name: str) -> Optional[lium.sdk.models.PodInfo]: ``` The pod called ``name``, or whose huid or id is ``name``, if it exists. Names are chosen by the caller and huids are what ``lium ps`` prints, so both are accepted; the first match wins when several pods share a name. **Arguments:** - **name:** Pod name, huid, or id. **Returns:** The matching [`PodInfo`](/developers/sdk/reference/models/pod-info), or ``None``. ### rental ```python def rental( *, executor_id: str, timeout: int = 600, **up_kwargs: Any ) -> Generator[lium.sdk.models.PodInfo, NoneType, NoneType]: ``` Rent a pod on ``executor_id`` for the duration of a ``with`` block and always remove it. (`rent()` is the other way to rent: by spec, returning a [`RentResult`](/developers/sdk/reference/models/rent-result) the caller owns; ``rental`` is the scoped form that cleans up after itself.) The pod is removed on the way out whether the block returned, raised, or was interrupted, and also when the pod was created but never became ready. A pod that outlives the code that needed it is the most common way to pay for nothing. **Arguments:** - **executor_id:** Target node ID. - **timeout:** Seconds to wait for the pod to become ready. - ****up_kwargs:** Any other keyword argument `up()` accepts (``name``, ``template_id``, ``ports`` ...). **Yields:** The ready [`PodInfo`](/developers/sdk/reference/models/pod-info). **Example:** ```python with lium.rental(executor_id=node.id, name="job") as pod: ``` ... lium.exec(pod, command="nvidia-smi") ### run_job ```python def run_job( *, command: str, gpu_type: str, max_cost_usd: float, deadline_s: float, gpu_count: int = 1, inputs: Optional[Dict[str, str]] = None, outputs: Optional[Dict[str, str]] = None, env: Optional[Dict[str, str]] = None, name: Optional[str] = None, boot_timeout: float = 600, output_reserve_s: float = 120, output_tail_bytes: int = 16777216, max_download_bytes: int = 10737418240, **rent_kwargs: Any ) -> lium.sdk.bounded_job.JobResult: ``` Run one bounded job on a rented GPU and remove the pod; never raises for the job's outcome. Rents the cheapest node that fits (`rent()`), schedules the pod's removal server-side for the earlier of ``deadline_s`` and the moment the rental has cost ``max_cost_usd`` at its initial hourly price (both counted from just before the rent request), waits for it, uploads ``inputs``, runs ``command`` under ``bash -c`` bounded by the time left, downloads ``outputs`` (after a failure or a timeout too; each transfer bounded by the time left), then deletes the pod, waits until it is gone and reads its billed cost. After server-side scheduling succeeds, removal survives caller exit. A Ctrl-C during the rent still finds the pod by name and removes it (then re-raises); a hard kill during rent or scheduling leaves the pod to the removal sent with the rent (``termination_hours``): the deadline rounded up to whole hours, at most 720, counted by the server from boot. The limits are best effort: scheduled removal is processed periodically, so charges can exceed the budget. **Arguments:** - **command:** Shell command to run on the pod. - **gpu_type, gpu_count:** What to rent, as in `rent()`. - **max_cost_usd:** Approximate compute budget in USD, boot and copying included. - **deadline_s:** Wall-clock ceiling in seconds from this call, boot and copying included. - **inputs:** ``\{local path: remote path\}`` uploaded before the command runs. - **outputs:** ``\{remote path: local path\}`` downloaded after it ends. - **env:** Environment for the command, sent as `exec()` sends it. - **name:** Pod name prefix (default ``job``); ``-<8 hex>`` is always appended so only this call's pod matches it when a lost rent response is looked up. - **boot_timeout:** Seconds to wait for the pod to become ready (never past the limits). - **output_reserve_s:** Seconds kept back from the command for copying outputs. - **output_tail_bytes:** Keep the last this many bytes of stdout and of stderr each (16 MiB; ``0`` keeps none). The timeout check does not depend on it. - **max_download_bytes:** Refuse an output file past this size (10 GiB); it is reported in ``missing_outputs``. - ****rent_kwargs:** Any other `rent()` constraint (``max_price_per_gpu_hour``, ``template_id``, ``min_vram_gb``, ``country``, ...). A ``termination_hours`` is sent with the rent and counted by the server from pod start, as for `rent()`; once the pod runs, the job stops at the earlier of that end and the budget/deadline cutoff. If the pod never became ready and its deletion fails, the cleanup only retries the removal sent right after the rent (when the budget/deadline cutoff is the earlier end); otherwise the server's own ``termination_hours`` ends the pod (``cleanup`` is ``"unknown"``). **Returns:** A [`JobResult`](/developers/sdk/reference/bounded_job/job-result): ``status`` is one of ``succeeded``, ``failed``, ``timed_out``, ``budget_exhausted``, ``rent_failed``, ``boot_failed`` or ``error``; ``cleanup`` says whether the pod's removal was confirmed (``removed``), left to the acknowledged schedule (``scheduled``) or neither (``unknown``); ``cost_usd`` is the billed cost, read only after a confirmed removal, ``estimated_cost_usd`` the price times the rented time. **Example:** ```python r = lium.run_job(command="python train.py", gpu_type="H100", max_cost_usd=5, ``` ... deadline_s=1800, inputs=\{"train.py": "/root/train.py"\}, ... outputs=\{"/root/model.pt": "model.pt"\}) ```python r.status, r.exit_code, r.cleanup, r.cost_usd ``` ### rent ```python def rent( *, gpu_type: str, gpu_count: int = 1, name: str = 'Your Pod', template_id: Optional[str] = None, dockerfile_content: Optional[str] = None, build_context_sha256: Optional[str] = None, min_vram_gb: Optional[float] = None, min_cpus: Optional[int] = None, min_ram_gb: Optional[float] = None, min_disk_gb: Optional[float] = None, min_download_mbps: Optional[float] = None, min_ports: Optional[int] = None, max_price_per_gpu_hour: Optional[float] = None, country: Optional[str] = None, docker_in_docker: Optional[bool] = None, interconnect: Optional[str] = None, volume_id: Optional[str] = None, ports: Optional[int] = None, ssh_keys: Optional[List[str]] = None, ssh_name: Optional[str] = None, enable_volume_encryption: bool | None = None, backup_id: Optional[str] = None, restore_path: Optional[str] = None, dry_run: bool = False, termination_hours: Optional[int] = None, enable_backups: bool = True, enable_jupyter: bool = False ) -> lium.sdk.models.RentResult: ``` Rent the cheapest available node that satisfies a spec, without listing the fleet. When the backend advertises ``rent_by_spec`` (``GET /version``), one call to ``POST /executors/rent-by-spec`` selects and rents: the server picks the cheapest ``$/GPU·h`` node that meets every constraint (ties: faster ingress, then reliability, then id), rents it under its own locks and, if that node is taken meanwhile, tries the next candidate. Against an older backend the same arguments make today's client-side pick, list, filter, cheapest exact match, and rent it with `up()`. **Arguments:** - **gpu_type:** Short or full GPU name, ``"H100"``, ``"RTX4090"``, ``"NVIDIA H200"``. - **gpu_count:** GPUs to rent (default 1). Server-side this also admits a split of a larger node when its provider allows one; client-side it is the node's size. - **name:** Pod name. - **template_id:** Template to run. Omitted: the node's recommended image. Mutually exclusive with ``dockerfile_content``. - **dockerfile_content:** Build the image from this Dockerfile instead (see `up()`). - **build_context_sha256:** The build context of ``dockerfile_content`` (see `up()`). - **min_vram_gb, min_cpus, min_ram_gb, min_disk_gb, min_download_mbps, min_ports:** Floors on the host; a host that does not report the figure does not qualify. - **max_price_per_gpu_hour:** Ceiling on ``price_per_gpu``. - **country:** ISO country code. - **docker_in_docker:** Require a sysbox host. - **interconnect:** ``"nvlink"``, every GPU pair on NVLink (unreported counts as no). Client-side only: a rent-by-spec backend has no such field, so the call is refused there rather than sent with a constraint the server would not check. - volume_id, ports, ssh_keys, ssh_name, enable_volume_encryption, backup_id, restore_path, termination_hours, enable_backups: as in `up()`. - **dry_run:** Choose and price only; nothing is rented and no SSH key is registered with the account. Against a rent-by-spec backend the request still carries your SSH public key (``ssh_keys`` or the configured key: the server validates a dry run as a rent); the client-side pick needs no key. **Returns:** [`RentResult`](/developers/sdk/reference/models/rent-result), the node, the GPUs rented, the hourly price, the pod (``None`` on a dry run), the template used, how many nodes qualified and the runners-up. **Raises:** - **LiumError:** No node satisfies the spec. The message names the constraint that left no candidate and the best value on offer, e.g. ``min_cpus=64: none of the 12 node(s) matching the earlier constraints satisfies it; the best on offer is 48``. - **LiumError:** ``interconnect`` was given and the backend rents by spec (nothing is registered or rented). - **LiumServerError, LiumRateLimitError, requests.RequestException:** the rent-by-spec response was lost. The pod is looked up by name for ~9 s and returned when it appears. If it does not appear, a backend that honours the Idempotency-Key (``rent_idempotency``) gets the rent once more with the same key, which replays the first answer instead of renting again; after an ambiguous resend the pod is looked up once more, and no third request is sent. A backend without the key gets no resend, since a repeat could rent a second node; if no pod is found there, the error propagates and the pod may still exist, check `ps()`. - **LiumError:** code ``rent_outcome_unknown``: the resend got no usable answer (lost, 5xx, 429, ``idempotency_in_progress``/``idempotency_outcome_unknown``, or refused for authentication, permission or balance) and the pod was not listed; either request may have rented it, check `ps()` before renting again. ### pod ```python def pod(pod_id: str) -> Dict[str, Any]: ``` Retrieve detailed information about a specific pod. **Arguments:** - **pod_id:** The unique identifier of the pod to retrieve. **Returns:** Raw pod data dictionary including template, node, status, and connection info. ### logs ```python def logs( pod_id: str, *, tail: int = 100, follow: bool = False ) -> Generator[bytes, NoneType, NoneType]: ``` Stream logs from a pod. **Arguments:** - **pod_id:** The unique identifier of the pod. - **tail:** Number of lines to retrieve from the end of the logs (default: 100). - **follow:** If True, stream logs continuously (default: False). **Yields:** Log lines as bytes. ### edit ```python def edit(pod_id: str, **kwargs) -> Dict[str, Any]: ``` Edit a pod's template configuration. Updates the template associated with a pod by merging the provided keyword arguments with the existing template settings. **Arguments:** - **pod_id:** The unique identifier of the pod whose template to edit. - `**kwargs`: Template fields to update. Common fields include: - docker_image (str): Docker image repository. - docker_image_tag (str): Docker image tag. - startup_commands (str): Commands to run on container start. - internal_ports (List[int]): Ports to expose. - environment (Dict[str, str]): Environment variables. - volumes (List[str]): Volume mount paths. **Returns:** Updated template data dictionary from the API. **Example:** ```python lium.edit(pod_id, startup_commands="python main.py", environment={"DEBUG": "1"}) ``` ### ls ```python def ls( *, gpu_type: Optional[str] = None, gpu_count: Optional[int] = None, lat: Optional[float] = None, lon: Optional[float] = None, max_distance_miles: Optional[int] = None, min_cuda_version: Optional[float] = None, min_cpus: Optional[int] = None, nvlink: Optional[bool] = None, min_download_mbps: Optional[float] = None, reliable: Optional[bool] = None, view: str = 'summary' ) -> List[lium.sdk.models.ExecutorInfo]: ``` List available nodes. **Arguments:** - **gpu_type:** Optional GPU filter such as ``"A100"`` or ``"H200"``. - **gpu_count:** Exact GPU count to match (default ``None``: any count). - **lat:** Optional latitude for geospatial filtering. Must be used together with ``lon`` and ``max_distance_miles``. - **lon:** Optional longitude for geospatial filtering. Must be used together with ``lat`` and ``max_distance_miles``. - **max_distance_miles:** Optional radius (in miles) for geospatial filtering. Must be used together with ``lat`` and ``lon``. - **min_cuda_version:** Optional minimum CUDA version to require (e.g. ``12.4``). Nodes whose ``max_cuda_version`` is ``None`` or below this threshold are excluded. NVIDIA drivers are backward compatible, so a node with a higher driver CUDA version satisfies the requirement. - **min_cpus:** Optional minimum CPU thread count (``specs.cpu.count``). Nodes that report fewer CPUs, or none, are excluded. - **nvlink:** ``True`` keeps only nodes where Lium's node checks saw every GPU pair on NVLink ([`nvlink`](/developers/sdk/reference/models/executor-info#nvlink)). Nodes with no verdict yet are excluded, a renter who asks for NVLink must not be handed a PCIe box. ``False``/``None`` do not filter. - **min_download_mbps:** Minimum Download in Mbps, judged on [`effective_download_speed_mbps`](/developers/sdk/reference/models/executor-info#effective_download_speed_mbps) (the figure ``lium ls`` shows as Download). Nodes with no figure are excluded. - **reliable:** ``True`` hides nodes whose rents often fail to start: 2 or more failed starts in the last 7 days, at least 30% of the node's rents ([`frequent_rent_failures`](/developers/sdk/reference/models/executor-info#frequent_rent_failures)). ``False``/``None`` do not filter. - **view:** ``"summary"`` (default) asks the API for the fields a listing reads, price, GPU/CPU/RAM/disk headline specs, location, tier, network; an API that does not know the parameter returns the full row. ``"full"`` asks for the whole public node-check scrape in [`specs`](/developers/sdk/reference/models/executor-info#specs) (verified ports, checksums, per-GPU card fields). What the renters' pods are doing (docker containers, GPU processes, per-GPU load, memory in use, current clocks and PCIe link) is not served; a renter reads their own pod's load with `gpu_stats()`. **Returns:** A list of [`ExecutorInfo`](/developers/sdk/reference/models/executor-info) objects that satisfy the filters. ### ps ```python def ps(*, api_key_id: Optional[str] = None) -> List[lium.sdk.models.PodInfo]: ``` List active pods. **Arguments:** - **api_key_id:** Only the pods rented through this API key (``GET /pods?api_key_id=…``). A server without the filter ignores the parameter and lists every pod the caller can see. **Returns:** List of [`PodInfo`](/developers/sdk/reference/models/pod-info) objects representing the caller's running pods. ### billing_statement ```python def billing_statement( *, start_day: Optional[str] = None, end_day: Optional[str] = None, api_key_id: Optional[str] = None ) -> Dict[str, Any]: ``` The account's pod charges grouped by pod (``GET /billing/statement``), most recently billed first. Every pod the account was charged for in the period, removed pods included, with ``days``, one entry per ledger row, oldest first; a UTC day can have more than one row (for example when billing stops and resumes). Each pod's ``total`` is what the ledger debited. ``start_day`` / ``end_day`` are UTC billing days (``YYYY-MM-DD``), both inclusive and optional. ``api_key_id`` keeps only the pods rented through that key (the rows then carry ``api_key_name``); a server without the filter ignores it. Returns the server's ``\{"start_day", "end_day", "total", "pods": [...]\}``. A key needs the ``read`` scope. ### pod_feedback ```python def pod_feedback( pod: lium.sdk.models.PodInfo, text: str = '', rating: Optional[int] = None, reason: Optional[str] = None ) -> Dict[str, Any]: ``` Leave feedback on a pod's node (``POST /pods/\{id\}/feedback``): ``rating`` 1-5, ``text``, ``reason``. The feedback and its optional rating are recorded and reach Lium support. The pod must still exist; to rate a pod you are removing, pass the feedback to `down()` instead. ### down ```python def down( pod: lium.sdk.models.PodInfo, feedback: Optional[str] = None, rating: Optional[int] = None ) -> Dict[str, Any]: ``` Stop a pod. **Arguments:** - **pod:** Pod to terminate. - **feedback:** Optional note about the pod's node, sent as the body of the delete call. - **rating:** Optional 1-5 rating of the node, sent the same way. **Returns:** API response payload from the delete call. The feedback is recorded once per pod, so a retried removal does not rate the node twice. It never blocks the removal: feedback the API edge refuses (403) is dropped and the pod is removed with a plain delete. ### rm ```python def rm( pod: lium.sdk.models.PodInfo, feedback: Optional[str] = None, rating: Optional[int] = None ) -> Dict[str, Any]: ``` Remove pod (alias for `down()`). **Arguments:** - **pod:** Pod to terminate. - **feedback:** Optional note about the pod's node. - **rating:** Optional 1-5 rating of the node. **Returns:** API response payload from the delete call. ### reboot ```python def reboot( pod: lium.sdk.models.PodInfo, volume_id: Optional[str] = None ) -> Dict[str, Any]: ``` Reboot a pod. **Arguments:** - **pod:** Pod to reboot. - **volume_id:** Optional volume ID to attach for the reboot request. **Returns:** Pod data from the API response after issuing the reboot. ### reset_gpu ```python def reset_gpu( pod: lium.sdk.models.PodInfo, gpu_indices: Optional[List[int]] = None, on_progress: Optional[Callable[[float], NoneType]] = None ) -> lium.sdk.models.GpuResetResult: ``` Reset a pod's hung GPUs: stops the container, resets the GPUs, starts it again. Every process in the pod is stopped, even when one GPU is named; files are kept and the SSH host key stays. ``POST /pods/\{id\}/reset-gpu`` starts the reset (202 with a ``request_id``), then ``GET /pods/\{id\}/reset-gpu/\{request_id\}`` is polled until it ends; a reset takes 1 to 2 minutes. **Arguments:** - **pod:** Pod whose GPUs to reset. - **gpu_indices:** Pod GPU indices as ``nvidia-smi`` numbers them inside the pod; ``None`` resets all. - **on_progress:** Called with the seconds since the start before each poll. **Returns:** [`GpuResetResult`](/developers/sdk/reference/models/gpu-reset-result), one [`GpuResetOutcome`](/developers/sdk/reference/models/gpu-reset-outcome) per GPU. **Raises:** - **LiumGpuOperationError:** the reset operation failed and returned per-GPU outcomes. Inspect ``gpus`` and ``container_restarted``; the container can fail to restart even when every GPU reset succeeds. - **LiumError:** refusals with the API's ``code`` (``invalid_gpu_index``, ``mig_enabled``, ...). - **LiumServerError:** ``gpu_reset_unavailable`` (the request was not sent, or the server gave up waiting) or ``gpu_reset_timeout`` (this client gave up waiting or lost the connection); after both the reset may still finish. ### lock_gpu_clocks ```python def lock_gpu_clocks( pod: lium.sdk.models.PodInfo, min_mhz: int, max_mhz: int, gpu_indices: Optional[List[int]] = None ) -> lium.sdk.models.GpuClockResult: ``` Lock a pod's GPU core clocks to ``min_mhz``..``max_mhz``. Nothing in the pod is stopped. ``POST /pods/\{id\}/gpu-clocks``. **Arguments:** - **pod:** Pod whose GPU clocks to lock. - **min_mhz:** Lowest core clock in MHz. - **max_mhz:** Highest core clock in MHz. - **gpu_indices:** Pod GPU indices as ``nvidia-smi`` numbers them inside the pod; ``None`` means all. **Returns:** [`GpuClockResult`](/developers/sdk/reference/models/gpu-clock-result), one [`GpuClockOutcome`](/developers/sdk/reference/models/gpu-clock-outcome) per GPU. **Raises:** - **LiumGpuOperationError:** 409, the change ran and a GPU failed; ``gpus`` says what each GPU has now. - **LiumError:** 400/409 with the API's ``code`` (``invalid_clock_range``, ``pod_not_running``, ``clock_lock_not_supported``, ``mig_enabled``, ``operation_in_progress``, ...); `[`LiumServerError`](/developers/sdk/reference/exceptions/lium-server-error)` ``gpu_clocks_unavailable`` on a 503 or a lost answer (the clocks may already have changed). ### reset_gpu_clocks ```python def reset_gpu_clocks( pod: lium.sdk.models.PodInfo, gpu_indices: Optional[List[int]] = None ) -> lium.sdk.models.GpuClockResult: ``` Return a pod's GPU clocks to the driver default; same response and errors as ``lock_gpu_clocks``. ### clusters ```python def clusters() -> List[lium.sdk.models.ClusterOffer]: ``` Groups of free nodes that sit on one RDMA fabric and can be rented as one cluster. ``GET /executors/infiniband-clusters``. Each offer names the fabric, whether it is InfiniBand or RoCE, whether the wire between the members was measured, how many nodes the fabric has and which of them are free right now. ### cluster_offer ```python def cluster_offer(fabric_id: str) -> Optional[lium.sdk.models.ClusterOffer]: ``` The offer for one fabric (exact id, or a unique prefix of it). ### cluster_template ```python def cluster_template() -> lium.sdk.models.Template: ``` The template every cluster rental must use (``daturaai/lium-cluster``); newest tag wins. ### up_cluster ```python def up_cluster( executor_ids: List[str], *, name: str, template_id: Optional[str] = None, ssh_keys: Optional[List[str]] = None, ssh_name: Optional[str] = None, ports: Optional[int] = None, enable_volume_encryption: bool | None = True, wait: bool = False, timeout: int = 900, enable_backups: bool = True ) -> lium.sdk.models.Cluster: ``` Rent several nodes of one fabric as a single all-or-nothing cluster. ``POST /executors/cluster/rent``. Every node is taken whole and runs the cluster template, which raises the private overlay each member uses to find its peers. The same ``name`` is given to every member pod; the members share ``cluster_id``. **Arguments:** - **executor_ids:** Nodes to rent; they must all be on one fabric (see `clusters()`). - **name:** Pod name applied to every member. - **template_id:** Defaults to `cluster_template()`. - **ssh_keys:** Public keys to install; defaults to the configured key. - **ports:** Ports to expose per node. - **enable_volume_encryption:** As for `up()`. - **wait:** Block until every member is RUNNING with SSH (``timeout`` seconds). - **enable_backups:** As for `up()`; applies to every member. **Raises:** - **ValueError:** fewer than two nodes, or no SSH key. - **ClusterNotListedError:** the nodes are, or may be, rented, but the listing did not show a whole cluster: the API confirmed the order and named the member pods but the listing did not show every one of them (or failed); or the order got no answer and the by-name lookup found fewer members than requested, none at all, or could not list. Do not rent again. - **LiumError:** the API refused the group (mixed fabrics, split hosts, wrong image), or the pod listing before the order failed (nothing was rented). ### my_clusters ```python def my_clusters() -> List[lium.sdk.models.Cluster]: ``` The caller's cluster rentals, one [`Cluster`](/developers/sdk/reference/models/cluster) per ``cluster_id`` found in `ps()`. ### cluster ```python def cluster(cluster_id: str) -> lium.sdk.models.Cluster: ``` One cluster by id (exact, or a unique prefix), from the caller's pods. **Raises:** - **LiumNotFoundError:** no pod carries that cluster id. ### wait_cluster_ready ```python def wait_cluster_ready( cluster: lium.sdk.models.Cluster, *, timeout: int = 900, poll_interval: int = 10 ) -> lium.sdk.models.Cluster: ``` Poll until every member of ``cluster`` is RUNNING with SSH metadata. The members waited for are the pods of ``cluster`` as given: one of them missing from any poll, the first included, is a member that vanished, not one that is slow. **Raises:** - **PodStartError:** a member reached a terminal status (``FAILED``, ``STOPPED``, …) or is missing from the pod list. Reported at once, not at the deadline, since the other members keep billing. - **TimeoutError:** some member was still not ready after ``timeout`` seconds (all members keep billing). ### rm_cluster ```python def rm_cluster(cluster: lium.sdk.models.Cluster) -> List[Dict[str, Any]]: ``` Remove every member pod of a cluster with one ``DELETE /clusters/\{cluster_id\}``. Returns one ``\{"pod", "huid", "name", "node_rank", "success", "message", "error"\}`` per member, in the order the server reports them (``huid`` is the short name ``lium rm`` accepts). The server finds the members by the cluster id, checks ownership and API-key scope on every one of them before the first delete, then tears them down one by one; a member that failed is reported with ``success`` false and its error text while the others are still removed, so nothing is left billing by accident. Call again to retry the members that failed. A cluster still provisioning with no member yet answers ``[]``: the delete is accepted and nothing is billing. The pinned ssh host key of every member the server accepted is dropped, as `rm()` does for a single pod. There is no per-pod fallback: a 404 from the route removes nothing and is raised. **Raises:** - **LiumNotFoundError:** no pod carries the id (the cluster is already gone, as on a repeated delete), or the server has no ``DELETE /clusters/\{id\}`` route yet. Nothing was removed. - **LiumPermissionError:** a member belongs to another user, or the API key lacks the ``manage`` scope for a pod it did not create. Nothing was removed. - **LiumError:** 409, a member is still being created and the platform is set not to cancel in-flight creates; nothing was removed, call again later. Also a 200 without the per-member rows, so an unexpected answer is never read as "removed". ### get_default_images ```python def get_default_images(gpu_model: Optional[str], driver_version: Optional[str]) -> list[dict]: ``` Get default images for GPU type and driver version. ### default_docker_template ```python def default_docker_template(executor_id: str) -> lium.sdk.models.Template: ``` Resolve the best default template for a node ID. **Arguments:** - **executor_id:** Node identifier returned by `ls()`. **Returns:** [`Template`](/developers/sdk/reference/models/template) best suited for the node. **Raises:** - **ValueError:** If no matching node or template exists. ### templates ```python def templates( filter: Optional[str] = None, only_my: bool = False ) -> List[lium.sdk.models.Template]: ``` List available templates. **Arguments:** - **filter:** Optional substring to filter by image or name. - **only_my:** When ``True`` return only templates owned by the caller. **Returns:** List of [`Template`](/developers/sdk/reference/models/template). ### get_executor ```python def get_executor(executor: str) -> Optional[lium.sdk.models.ExecutorInfo]: ``` Resolve a node by UUID or HUID against the same listing `ls()` returns. **Arguments:** - **executor:** Node UUID, or the HUID ``lium ls`` prints for it (``cosmic-hawk-f2``). **Returns:** Matching [`ExecutorInfo`](/developers/sdk/reference/models/executor-info) or ``None`` if no listed node has that id. **Raises:** - **ValueError:** the HUID names more than one listed node. HUIDs are client-side draws (10 adjectives × 10 nouns × 256 tails), so a full listing can hold two nodes with the same one; picking the first in API order would rent a different node than the one ``lium ls`` showed, so the caller is asked for the UUID instead. ### pod_record ```python def pod_record(pod_id: str) -> Dict[str, Any]: ``` What one run ran on and what it cost, readable after the pod is removed. ``GET /pods/\{id\}/record``: GPU model and count, the image (with its digest when the template pins one), the node's driver/CUDA/interconnect when the container came up (``launch_snapshot``, null for older runs), start and end, ``close_reason``, ``billed_seconds``, ``total`` (what the ledger charged) and ``price_segments``. A 404 is `[`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error)` (no such pod of yours) on a server that lists ``run_record`` on ``GET /version``; on one that does not, it is a `[`LiumError`](/developers/sdk/reference/exceptions/lium-error)` saying the server does not serve run records yet, so a removed pod is not reported as missing. ### quote ```python def quote( executor: str, *, hours: float, gpu_count: Optional[int] = None, volume_gb: float = 0.0, backup_gb: float = 0.0 ) -> lium.sdk.models.JobQuote: ``` What renting a node for ``hours`` costs, line by line, at the rates billing charges. ``GET /executors/\{uuid\}/quote``: compute (price per GPU × ``gpu_count``; without it the server quotes the node's free GPUs, which is what ``lium up `` rents without ``-c``), volume and backup storage per GB-hour, and an egress line with no amount (billed at what AWS charges). Returns the API's answer: ``price_per_hour``, ``lines`` (``item``, ``unit``, ``rate_usd``, ``quantity``, ``amount_usd``, ``note``), ``total_usd`` (egress not included), ``pod_balance_floor_usd`` (this pod's part of the balance floor: 15 minutes of ``price_per_hour``) and, when supplied by the server for a signed-in caller, ``rent_balance_required_usd`` (what the balance must be more than for this rent: 15 minutes of this pod and of each open pod, more for some older accounts; 0 when the renter is exempt from this pod-cost reserve: an admin, or a validator renting a node on its own validator; also 0 for a free pod when the hourly prices of the open pods counted toward the reserve sum to zero, which the server does not tell apart from an exempt renter). Who pays must still have a balance above zero, except the Lium validator paying from its own account. Nothing is reserved. Returned as a [`JobQuote`](/developers/sdk/reference/models/job-quote). **Arguments:** - **executor:** Node UUID, or the HUID ``lium ls`` prints for it. **Raises:** - **LiumNotFoundError:** no listed node has that HUID, the server knows no node with that UUID, or it has no quote route yet. A UUID is sent as given, with no listing read. - **ValueError:** the HUID names more than one listed node. ### ambiguous_executor_message ```python def ambiguous_executor_message(executor: str, matches: List[lium.sdk.models.ExecutorInfo]) -> str: ``` The sentence for a HUID that is shared by several listed nodes. ### executor_not_found_message ```python def executor_not_found_message(executor: str) -> str: ``` The one sentence every caller prints when a node id resolves to nothing. ### gpu_types ```python def gpu_types() -> set[str]: ``` Get list of available GPU types. **Returns:** Set of GPU type strings advertised by the API. ### gpu_short_types ```python def gpu_short_types() -> List[str]: ``` The short GPU types the marketplace knows (``H100``, ``RTX4090``, ...), sorted. These are the values ``--gpu`` / ``ls(gpu_type=)`` accept; a bare model number (``4090``) and spacing/case variants (``rtx 4090``) resolve to them too. Names the extractor could not type (it falls back to the last word: ``Ti``, ``SUPER``, ``V``) are left out, they are not something ``--gpu`` can usefully take. ### unknown_gpu_type ```python def unknown_gpu_type(gpu_short: str) -> Optional[List[str]]: ``` ``None`` when ``gpu_short`` names a known GPU type; otherwise the list of known types. Lets a caller tell "every 4090 is rented" from "nothing is called 4090", the second case is what a typo or an unsupported spelling produces, and the two need different messages. Never raises: on an API failure the answer is ``None`` (assume known), so a listing failure is reported as such and not as a typo. ### request_machine ```python def request_machine(gpu: str, count: Optional[int] = None) -> Dict[str, Any]: ``` Ask providers for a GPU type that is sold out (``POST /machine-requests``). ``gpu`` is a short type (``B300``, ``4090``) or a full catalog name. The providers who list that type may be notified, and the request shows in ``lium.io/machine-requests``. A short type that covers several catalog names must be given by one of them. **Returns:** The API's answer: ``provider_notified_count`` and, when present, ``confirmation``. ### get_template ```python def get_template(template_id: str) -> Optional[lium.sdk.models.Template]: ``` Fetch a template by ID/HUID/name. **Arguments:** - **template_id:** Template ID, HUID, or name to match. A HUID or name picks only the caller's own templates; someone else's public template is chosen by its ID. **Returns:** Matching [`Template`](/developers/sdk/reference/models/template) or ``None`` if not found. **Raises:** - **LiumError:** the HUID or name matches several of the caller's templates, or matches only public templates of other users (the message names their IDs and images). ### get_template_by_image_name ```python def get_template_by_image_name( image_name: Optional[str] = None, image_tag: Optional[str] = None ) -> Optional[lium.sdk.models.Template]: ``` Fetch a template by its Docker image + tag. **Arguments:** - **image_name:** Repository/image name. - **image_tag:** Tag to match. **Returns:** Matching [`Template`](/developers/sdk/reference/models/template) or ``None`` if not found. ### ssh_connection ```python def ssh_connection( pod: lium.sdk.models.PodInfo, timeout: int = 30, deadline: Optional[float] = None ): ``` SSH connection context manager. **Arguments:** - **pod:** Pod whose SSH metadata is used. - **timeout:** Connection timeout in seconds. - **deadline:** A ``time.monotonic()`` instant the whole connect (TCP, banner and every auth attempt) must end by; no wait runs past it (`TimeoutError`). **Yields:** An active ``paramiko.SSHClient``. **Raises:** - **ValueError:** no ``ssh_cmd`` or no SSH key configured, or ``pod.ssh_cmd`` is not ``ssh @ [-p ]`` (`ssh_target()`, the check the OpenSSH path applies). Nothing is connected then. ### ssh_session ```python def ssh_session(pod: lium.sdk.models.PodInfo, timeout: int = 30): ``` Keep one SSH connection to ``pod`` open for the whole block. Every `exec()`, `stream_exec()`, `upload()` and `download()` inside it runs over this connection, so the TCP + SSH handshake (several seconds to a distant node) is paid once for the whole block. It is the connection the client keeps for the pod between calls, so it stays open after the block too (until `close()`); with ``LIUM_SSH_REUSE=0`` it is a connection of its own, closed when the block ends. **Yields:** The active ``paramiko.SSHClient``. ### has_open_connection ```python def has_open_connection(pod: lium.sdk.models.PodInfo) -> bool: ``` Whether this client holds a live SSH connection to ``pod`` (kept from an earlier call, or an open `ssh_session()`). ### exec ```python def exec( pod: lium.sdk.models.PodInfo, *, command: str, env: Optional[Dict[str, str]] = None, timeout: Optional[float] = None, detach: bool = False, log_path: Optional[str] = None, output_tail_bytes: Optional[int] = None, max_output_bytes: int = 67108864 ) -> Dict[str, Any]: ``` Execute a shell command on a pod over SSH. The connection stays open after the call, so the next call to the same pod starts at once (`close()` closes it; ``LIUM_SSH_REUSE=0`` connects per call). **Arguments:** - **pod:** Pod to target. - **command:** Shell command to run remotely. - **env:** Optional environment variables exported before the command runs. The values are sent over the session's stdin, not in the remote command line, so ``ps`` on the pod never shows them. - **timeout:** Seconds to wait for the command to finish. When it runs out the channel is closed and `TimeoutError` is raised; the remote process may keep running. With ``detach`` it bounds only the launcher (default 60 s), never the job. - **detach:** Start the command in the background on the pod and return at once. The command runs under ``nohup setsid`` with stdin closed and stdout/stderr to ``log_path``, so it survives the SSH session ending, the shape every user otherwise rediscovers by hand. ``env`` still travels over stdin, and is applied inside the detached login shell after its profile, so the given value wins. - **log_path:** Log file for ``detach`` (default ``/workspace/logs/exec--.log``, the ```` a 6-hex tail that keeps two launches in the same second apart). - **output_tail_bytes:** Keep only the last this many bytes of stdout and of stderr each (``0`` keeps none); the rest is read and dropped while the command runs, and ``truncated`` is ``True`` in the result. The call still succeeds: this keeps a tail, it is not a limit that fails the call. ``timeout`` then also bounds reading the output, so a host that never stops sending cannot hold the call. - **max_output_bytes:** Limit on the output bytes, stdout and stderr together (default 64 MiB). It bounds output bytes, not memory: the raw bytes and the text decoded from them are both held, so peak memory is about twice the limit for ASCII or Latin-1 output, and more when a wider character such as an emoji makes the text take up to 4 bytes per character. Past the limit the channel is closed and [`OutputLimitExceeded`](/developers/sdk/reference/exceptions/output-limit-exceeded) is raised. **Returns:** Dict containing stdout, stderr, exit_code, and success flag; with ``detach`` a dict with ``pid``, ``log_path`` and ``command``. **Raises:** - **OutputLimitExceeded:** stdout and stderr together are more than ``max_output_bytes``. - **ValueError:** an ``env`` name is not a shell identifier, or ``output_tail_bytes`` is negative. Raised before the connection is opened, so nothing reaches the pod. ### default_detach_log_path ```python def default_detach_log_path() -> str: ``` ``/workspace/logs/exec--<6 hex>.log``; the tail keeps two jobs started in the same second from sharing (and truncating) one file. ### build_detached_command ```python def build_detached_command(command: str, log_path: str) -> str: ``` The remote command line that starts ``command`` in the background and prints its PID. ``nohup`` alone is not enough over a non-interactive SSH session: the child keeps the session's stdin and its process group, so ``exec`` blocks until the child exits, and a closed session can still take the child down. ``setsid`` gives it its own session, ``< /dev/null`` detaches stdin, and both output streams go to the log file. ``echo $!`` is the only thing the caller reads back on stdout. ### login_shell_env ```python def login_shell_env( cls, env: Optional[Dict[str, str]] ) -> Tuple[str, Optional[Dict[str, str]]]: ``` ``(prelude, exec_env)`` that make a ``bash -lc`` job see ``env``. ``prelude`` goes in front of the job's command inside the login shell; ``exec_env`` is what the launching `exec()` call exports over stdin. Both are empty when ``env`` is. ``lium exec --detach`` uses it the same way for the launcher it builds itself. An export the job shell cannot apply (a name bash keeps read-only, such as ``UID``, or one the pod's profile marked ``readonly``) ends the shell with exit 1 and the reason in the log; the command never runs with a different environment than the one asked for. **Raises:** - **ValueError:** an ``env`` name is not a shell identifier, or is `JOB_ENV_VAR` itself (the carrier, unset before the command runs). ### run_background ```python def run_background( pod: lium.sdk.models.PodInfo, command: str, *, name: Optional[str] = None, env: Optional[Dict[str, str]] = None, workdir: Optional[str] = None, job_dir: str = '/workspace/logs', timeout: float = 60 ) -> lium.sdk.jobs.Job: ``` Start ``command`` in the background on a pod and return a [`Job`](/developers/sdk/reference/jobs/job) to follow it. The job survives this SSH session and this process: it runs under ``nohup setsid`` with stdin closed, logs to ``/.log``, records its PID in ``.pid`` (with the process's boot id and start time in ``.id``, so a reused PID never passes as the job; a job without that file is never trusted either) and its exit code in ``.exit`` when it ends. `job()` re-attaches later by name. **Arguments:** - **pod:** Pod to run on. - **command:** Shell command (run through ``bash -lc``, so the login environment, conda, PATH, applies). - **name:** Job name, also the stem of its files; default ``job-``. Refused when a job of that name is still running on the pod. - **env:** Environment variables for the job. Sent over the session's stdin like `exec()` does, never in a command line, and applied inside the job shell after its login profile, so the given value wins. - **workdir:** Directory to ``cd`` into first. - **job_dir:** Where the job files live (default ``/workspace/logs``, the fast local volume, not the encrypted ``/root``). - **timeout:** Seconds allowed for the launcher itself (not the job). **Raises:** - **LiumError:** the launcher printed no PID, or the name is taken by a live job. ### job ```python def job( pod: lium.sdk.models.PodInfo, name: str, *, job_dir: str = '/workspace/logs' ) -> lium.sdk.jobs.Job: ``` Re-attach to a job started earlier with `run_background()`, by name. **Raises:** - **LiumNotFoundError:** no job of that name has files on the pod. ### jobs ```python def jobs( pod: lium.sdk.models.PodInfo, *, job_dir: str = '/workspace/logs' ) -> List[lium.sdk.jobs.Job]: ``` Every job that has a PID file under ``job_dir`` on the pod, running or finished. ### wait_for_port ```python def wait_for_port( pod: lium.sdk.models.PodInfo, port: int, *, timeout: float = 600, host: str = '127.0.0.1', poll_interval: float = 3 ) -> None: ``` Block until TCP ``port`` accepts connections inside the pod (a server that is up). The probe runs on the pod over SSH (bash ``/dev/tcp``, no ``nc`` needed), so it sees the port as the pod does. For a job started with `run_background()` prefer [`wait_for_port()`](/developers/sdk/reference/jobs/job#wait_for_port), which also stops early when the job dies. **Raises:** - **TimeoutError:** the port did not answer within ``timeout`` seconds. ### parse_gpu_stats ```python def parse_gpu_stats(csv_text: str) -> List[lium.sdk.models.GpuStats]: ``` Parse ``nvidia-smi --query-gpu=... --format=csv,noheader,nounits`` output. ``[N/A]`` and ``[Not Supported]`` become ``None`` and the rest of the reading is kept; a GPU whose power sensor is missing still has a utilization figure worth showing. ### gpu_stats ```python def gpu_stats( pod: lium.sdk.models.PodInfo, *, timeout: float = 30 ) -> List[lium.sdk.models.GpuStats]: ``` Per-GPU utilization, memory, temperature and power on a pod, via ``nvidia-smi``. **Raises:** - **LiumError:** when ``nvidia-smi`` failed or printed nothing usable. ### stream_exec ```python def stream_exec( pod: lium.sdk.models.PodInfo, *, command: str, env: Optional[Dict[str, str]] = None, pty: bool = True, check: bool = False ) -> Generator[Dict[str, str], NoneType, int]: ``` Execute a shell command and stream incremental output. Args: pod: Pod to target. command: Shell command to run remotely. env: Optional environment variables exported before the command runs. pty: Request a pseudo-terminal (default). A pty merges stderr into stdout and turns `` `` into `` ``; pass ``False`` to keep the two streams apart, as `lium.machine()` does to relay a function's output. check: Raise [`RemoteExecutionError`](/developers/sdk/reference/exceptions/remote-execution-error) when the command exits non-zero, after its last chunk, so a plain ``for`` loop fails with the command instead of finishing silently. Yields: Streaming output chunks as ``\{"type": "stdout"|"stderr", "data": str\}``. Returns: The command's exit status (the generator's ``StopIteration.value``). Raises: RemoteExecutionError: with ``check=True``, the command exited non-zero; ``exit_code`` holds the status. ### exec_all ```python def exec_all( pods: List[lium.sdk.models.PodInfo], *, command: str, env: Optional[Dict[str, str]] = None, max_workers: int = 10, max_output_bytes: int = 67108864 ) -> List[Dict]: ``` Execute a shell command on multiple pods in parallel. **Arguments:** - **pods:** List of pods to target. - **command:** Shell command to run on each pod. - **env:** Optional environment variables exported before each command. - **max_workers:** Maximum number of SSH workers to spawn. - **max_output_bytes:** Output byte limit for each pod, as in `exec()`. **Returns:** List of result dictionaries mirroring `exec()`, each with the pod id under ``"pod"``. When SSH fails for a pod its entry is ``\{"pod": , "error": , "success": False\}``, same key, same type as the successful entries, so callers can index results by pod id without checking which shape they got. **Raises:** - **ValueError:** an ``env`` name is not a shell identifier. Checked once, before any pod is contacted, a caller's mistake is not one failure entry per pod. ### poll_delay ```python def poll_delay(cls, elapsed: float, poll_interval: Optional[int] = None) -> float: ``` Seconds to sleep between two ``wait_ready`` polls. A caller-given ``poll_interval`` is used as-is; ``None`` selects the adaptive schedule (`FIRST_POLL_SECONDS` for the first `FIRST_POLL_WINDOW_SECONDS` seconds, `FAST_POLL_SECONDS` until `FAST_POLL_WINDOW_SECONDS`, `SLOW_POLL_SECONDS` after that). ### pod_events ```python def pod_events(pod_id: str) -> List[Dict[str, Any]]: ``` The pod's event log, oldest first, creation, reboots, failures with their error, and lifecycle entries saying why it left RUNNING. Answers for a pod whose row is already gone. Returns ``[]`` against a backend that predates the endpoint. ### pod_failure_cause ```python def pod_failure_cause(pod_id: str) -> Optional[str]: ``` What the backend recorded as the reason the pod failed or was closed, or ``None``. The latest event carrying an ``error`` (a failed create or reboot: the node's error headline) or a lifecycle ``reason``/``detail`` wins. Never raises, this is read on a failure path. ### wait_ready ```python def wait_ready( pod: Union[str, lium.sdk.models.PodInfo, Dict], *, timeout: Optional[int] = 300, poll_interval: Optional[int] = None, on_poll: Optional[Callable[[Optional[lium.sdk.models.PodInfo], str, float], NoneType]] = None, ready_port: Optional[int] = None ) -> Optional[lium.sdk.models.PodInfo]: ``` Poll until a pod reports RUNNING + SSH metadata. **Arguments:** - **pod:** Pod identifier, PodInfo, or dict with an ``id`` field. - **timeout:** Maximum number of seconds to wait; ``None`` waits until the pod is ready or fails. - **poll_interval:** Fixed interval between successive ``ps`` calls; ``None`` (default) polls every `FIRST_POLL_SECONDS` for the first `FIRST_POLL_WINDOW_SECONDS` seconds, every `FAST_POLL_SECONDS` until `FAST_POLL_WINDOW_SECONDS`, then every `SLOW_POLL_SECONDS`, see `poll_delay()`. - **on_poll:** Called after every poll with the pod as last listed (or ``None``), its status (``"missing"`` when not listed) and the seconds elapsed, so a caller can show progress while waiting. - **ready_port:** When given, also wait until this TCP port answers inside the pod (a template that serves a model on start is not usable when RUNNING, only when its port accepts). The same ``timeout`` bounds both phases together; with ``timeout=None`` the port wait uses `wait_for_port()`'s own default. **Returns:** PodInfo when the pod is ready, otherwise ``None`` if the timeout expires while the pod is still starting (or, with ``ready_port``, while the port has not answered yet). **Raises:** - **PodStartError:** The pod reached a terminal status (``FAILED``, ``CREATION_FAILED``, ``STOPPED``, …), vanished from the pod list after being seen, or was still not listed `MISSING_GRACE_SECONDS` seconds after the first poll. The error carries the last `[`PodInfo`](/developers/sdk/reference/models/pod-info)`, its status, the status history and the cause the backend recorded (``cause``), so a caller can tell a dead pod from a slow one and clean up instead of retrying. ### scp ```python def scp( pod: lium.sdk.models.PodInfo, *, local: str, remote: str, timeout: Optional[float] = None ) -> None: ``` Upload a local file to a pod via SFTP. ``remote`` is a file path, or a directory: an existing remote directory, or a path ending in ``/`` (created if missing), receives the file under its own name. ``timeout`` bounds the whole transfer, connecting included (`TimeoutError`). ### download ```python def download( pod: lium.sdk.models.PodInfo, *, remote: str, local: str, max_bytes: Optional[int] = None, timeout: Optional[float] = None ) -> None: ``` Download a file from a pod via SFTP. **Arguments:** - **pod:** The pod to download from. - **remote:** Remote file path on the pod. - **local:** Local destination path. - **max_bytes:** Refuse a file larger than this; the transfer stops there. - **timeout:** Seconds for the whole transfer, connecting included; the connection is closed when they run out. **Raises:** - **ValueError:** If SSH is not configured for the pod, or the file passes ``max_bytes``. - **IsADirectoryError:** If ``remote`` is a directory (SFTP copies one file); nothing is written locally. - **TimeoutError:** The transfer did not finish within ``timeout``. ### upload ```python def upload( pod: lium.sdk.models.PodInfo, *, local: str, remote: str, timeout: Optional[float] = None ) -> None: ``` Upload a file to a pod via SFTP. This is an alias for `scp()` for parity with the CLI. **Arguments:** - **pod:** The pod to upload to. - **local:** Local file path to upload. - **remote:** Remote destination path on the pod. - **timeout:** Seconds for the whole transfer, as in `scp()`. **Raises:** - **ValueError:** If SSH is not configured for the pod. ### ssh_argv ```python def ssh_argv(pod: lium.sdk.models.PodInfo) -> List[str]: ``` The OpenSSH argument list that opens a shell on a pod. Built from the user, host and port the API's ``ssh_connect_cmd`` names (`ssh_target()`; any other shape is refused), with ``-i `` when one is configured and the host-key options of `openssh_host_key_options()`. Run it with ``subprocess.run(argv)``, no shell is involved, so nothing in the API's value is ever interpreted. **Raises:** - **ValueError:** The pod has no SSH command, or it is not ``ssh @ [-p ]``. ### refresh_pod ```python def refresh_pod(pod: Union[str, lium.sdk.models.PodInfo]) -> lium.sdk.models.PodInfo: ``` Re-read one pod from the API. A `[`PodInfo`](/developers/sdk/reference/models/pod-info)` is a snapshot: after a restart the pod's host, port and ``ssh_cmd`` can all change, and the copy a caller holds says nothing about it. Call this before reconnecting to a pod held for a while. **Arguments:** - **pod:** A `[`PodInfo`](/developers/sdk/reference/models/pod-info)`, a pod id or a huid. **Returns:** The current `[`PodInfo`](/developers/sdk/reference/models/pod-info)` for that pod (one ``/pods`` call). **Raises:** - **LiumNotFoundError:** The pod is no longer in the account's pod list. ### ssh ```python def ssh(pod: lium.sdk.models.PodInfo, *, refresh: bool = False) -> str: ``` Get SSH command string for connecting to a pod. The shell-quoted form of `ssh_argv()`: the configured key, the pinned host-key options and the pod's ``user@host``, ready to paste into a POSIX shell. Building it creates the pod's ``~/.lium/known_hosts/`` file when it does not exist yet (empty until the first connection pins the key). **Arguments:** - **pod:** The pod to generate SSH command for. - **refresh:** Re-read the pod first (see `refresh_pod()`), so the command reflects the host and port the pod has *now*, not the ones it had when ``pod`` was fetched. **Returns:** SSH command string with the configured SSH key path. **Raises:** - **ValueError:** If SSH is not configured for the pod or no SSH key path is set. - **LiumNotFoundError:** ``refresh=True`` and the pod is gone. ### rsync_options ```python def rsync_options( *, bwlimit: Optional[int] = None, exclude: Optional[Sequence[str]] = None, delete: bool = False, partial: bool = True, progress: bool = False ) -> List[str]: ``` The rsync flags shared by `rsync()` and `cp()`. ``partial`` keeps half-copied files so an interrupted transfer resumes instead of starting over, multi-GB pulls over a flaky link are the normal case, not the exception. It stays ``--partial`` only: ``--inplace`` would drop rsync's write-then-rename, and a job on the pod could read a half-written checkpoint. ``progress`` is plain ``--progress``, which both GNU rsync and the openrsync stock macOS ships accept (``--info=progress2`` needs GNU rsync >= 3.1 and dies before any byte moves on a Mac). ### rsync ```python def rsync( pod: lium.sdk.models.PodInfo, *, local: str, remote: str, bwlimit: Optional[int] = None, exclude: Optional[Sequence[str]] = None, delete: bool = False, partial: bool = True, progress: bool = False, download: bool = False ) -> None: ``` Sync files between the local machine and a pod with rsync. **Arguments:** - **pod:** Pod to sync. - **local:** Local path (source, or destination when ``download``). - **remote:** Path on the pod (destination, or source when ``download``). - **bwlimit:** Cap the transfer at this many KiB/s (rsync ``--bwlimit``). - **exclude:** Patterns to skip (rsync ``--exclude``), e.g. ``[".git", "*.pt"]``. - **delete:** Remove files at the destination that are not in the source. - **partial:** Keep partially transferred files so a retry resumes (default on). - **progress:** Show rsync's overall progress on the terminal instead of capturing its output. - **download:** Copy from the pod to the local path instead of to it. **Raises:** - **RuntimeError:** If the rsync command fails. ### cp ```python def cp( src_pod: lium.sdk.models.PodInfo, src_path: str, dst_pod: lium.sdk.models.PodInfo, dst_path: str, *, bwlimit: Optional[int] = None, exclude: Optional[Sequence[str]] = None, delete: bool = False ) -> Dict[str, Any]: ``` Copy files from one pod to another over SSH, without passing through this machine. Pod-to-pod links are far faster than relaying through the caller. This client makes a one-off ed25519 key, places the private half on the source pod (sent over the exec session's stdin, never on a command line) and adds the public half to the destination pod's ``authorized_keys`` for the duration of the copy; the source runs ``rsync`` straight to the destination, and both halves are removed again whatever happened. The source pod's output never decides what the destination trusts: the key the destination authorizes is the one this client generated, and the revoke removes exactly that key. The source verifies the destination with the host key this client pinned for it (``~/.lium/known_hosts/``, written by the grant connection), copied next to the transfer key; no pin means no copy (``LIUM_SSH_INSECURE=1`` accepts any key, as everywhere). **Arguments:** - **src_pod, src_path:** Where to copy from. A trailing ``/`` on a directory copies its contents, as in rsync. - **dst_pod, dst_path:** Where to copy to. - **bwlimit, exclude, delete:** As in `rsync()`. **Returns:** The `exec()` result of the rsync on the source pod. **Raises:** - **LiumHostKeyError:** When nothing is pinned for the destination pod. - **LiumError:** When the copy fails; the message carries rsync's stderr (``rsync: command not found`` means ``apt-get install -y rsync`` on the pod named). ### transfer_keypair ```python def transfer_keypair() -> Tuple[str, str]: ``` A fresh ed25519 key pair for one copy, as OpenSSH text. **Returns:** ``(private_key, public_key)``: the private key in OpenSSH PEM form (what ``ssh -i`` reads) and the public key as one ``ssh-ed25519 `` line with no comment. ### grant_transfer_key_command ```python def grant_transfer_key_command(cls, authorized_line: str, expires_in: int) -> str: ``` The remote line that appends ``authorized_line`` to the pod's authorized_keys. The line gets ``restrict`` and, where the pod's sshd is OpenSSH 9.1 or newer, an ``expiry-time`` ``expires_in`` seconds from now on the pod's clock. ### revoke_transfer_key_command ```python def revoke_transfer_key_command(cls, public_key: str, marker: str) -> str: ``` The remote line that drops every authorized_keys entry carrying ``public_key``. The match is the key itself (``ssh-ed25519 ``, unique to one ``cp`` run), not the comment: a line that lost its marker still goes. The scratch file carries the ``marker``, so two ``cp`` runs into the same pod never share one, and the result is written back with ``cat >`` (the way lium-io removes keys), so the file keeps its mode and a second run's half-written scratch file can never replace it. ``grep`` exits 1 when nothing is left to keep, which is fine; any other failure leaves authorized_keys untouched. The whole line runs under the transfer-key lock, so a concurrent grant or revoke waits for it. ### switch_template ```python def switch_template( pod: lium.sdk.models.PodInfo, *, template_id: str ) -> lium.sdk.models.PodInfo: ``` Switch the template of a running pod. **Arguments:** - **pod:** Pod to update. - **template_id:** ID of the template to switch to. **Returns:** PodInfo object with updated pod information. ### create_template ```python def create_template( name: str, docker_image: str, docker_image_digest: str = '', docker_image_tag: str = 'latest', ports: Optional[List[int]] = None, start_command: Optional[str] = None, **kwargs ) -> lium.sdk.models.Template: ``` Create a new template. **Arguments:** - **name:** Friendly template name. - **docker_image:** Image repository (e.g., ``"daturaai/pytorch"``). - **docker_image_digest:** Digest string for pinning (defaults to empty string). - **docker_image_tag:** Image tag (defaults to ``"latest"``). - **ports:** Internal ports to expose (defaults to ``[22, 8000]``). - **start_command:** Optional command executed on container start. - `**kwargs`: Additional template fields: - category (str): Template category (defaults to ``"UBUNTU"``). - is_private (bool): Whether template is private (defaults to ``True``). - volumes (List[str]): Volume mount paths (defaults to ``["/workspace"]``). - description (str): Template description. - environment (Dict[str, str]): Environment variables. - entrypoint (str): Container entrypoint. - one_time_template (bool): Whether to delete template after pod removal (defaults to ``False``). **Returns:** Newly created [`Template`](/developers/sdk/reference/models/template). ### wait_template_ready ```python def wait_template_ready( template_id: str, timeout: int = 300 ) -> Optional[lium.sdk.models.Template]: ``` Wait for template verification to complete. **Arguments:** - **template_id:** Template identifier. - **timeout:** Maximum seconds to wait. **Returns:** Template once it is verified (a public one at once: the server does not verify user templates), otherwise ``None`` if the timeout expires. **Raises:** - **LiumError:** If template verification fails. ### me ```python def me() -> Dict[str, Any]: ``` The account the API key belongs to, as ``GET /users/me`` returns it. Useful keys: ``id``, ``email`` (when the server sends it), ``balance``. ### get_my_user_id ```python def get_my_user_id() -> str: ``` Get the current user's ID. **Returns:** The ID returned by ``/users/me``. ### update_template ```python def update_template( template_id: str, name: str, docker_image: str, docker_image_digest: str, docker_image_tag: str = 'latest', ports: Optional[List[int]] = None, start_command: Optional[str] = None, **kwargs ) -> lium.sdk.models.Template: ``` Update an existing template owned by the caller. **Arguments:** - **template_id:** Template identifier. - **name:** Friendly name. - **docker_image:** Image repository. - **docker_image_digest:** Optional digest. - **docker_image_tag:** Image tag. - **ports:** Internal ports to expose. - **start_command:** Startup command. - `**kwargs`: Additional override fields. **Returns:** Updated [`Template`](/developers/sdk/reference/models/template). **Raises:** - **ValueError:** If the template is missing or not owned by the caller. ### wallets ```python def wallets() -> List[Dict[str, Any]]: ``` Get the caller's configured funding wallets. **Returns:** Raw wallet records returned by the pay API. ### add_wallet ```python def add_wallet( bt_wallet: Any, *, credentials: tuple[str, str] | None = None ) -> tuple[str, str]: ``` Link your wallet to the user account. **Arguments:** - **bt_wallet:** Wallet object exposing ``coldkey``/``coldkeypub`` for signing. - **credentials:** App and customer IDs already resolved for this payment. **Returns:** ``(app_id, customer_id)`` parsed from the ``/tao/create-transfer`` redirect. **Raises:** - **LiumError:** If verification or wallet polling fails. ### alpha_subnets ```python def alpha_subnets() -> lium.sdk.client.AlphaSubnets: ``` The subnets whose alpha Lium accepts as payment (``GET /balance/alpha/subnets``). Hard-fails (no fallback): the pay API answers 503 while it has no accepted set, which ``_request`` raises as `[`LiumServerError`](/developers/sdk/reference/exceptions/lium-server-error)`. ### convert_alpha ```python def convert_alpha(usd: Any, netuid: Optional[int] = None) -> lium.sdk.client.AlphaQuote: ``` Quote ``usd`` (USD) -> alpha via ``GET /balance/convert/alpha``. The response carries the alpha amount to transfer (``converted``) and the subnet ``netuid`` the transfer goes to. ``netuid`` picks one of the accepted subnets (`alpha_subnets()`); without it the pay API quotes on its primary subnet. A pay-API error raises: ``_request`` maps 503 -> `[`LiumServerError`](/developers/sdk/reference/exceptions/lium-server-error)` and a subnet that is not accepted (400) to a `[`LiumError`](/developers/sdk/reference/exceptions/lium-error)`, so the funding stops before any transfer is sent. ### company_wallet ```python def company_wallet(app_id: str) -> str: ``` Resolve the Lium deposit address via ``GET /wallet/company/?app_id=``. Returns the company ``wallet_hash``, the SS58 address Lium credits deposits to. A 404 (app has no wallet) raises `[`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error)` (a `[`LiumError`](/developers/sdk/reference/exceptions/lium-error)`) before any transfer is sent. ### link_gamma_hotkey ```python def link_gamma_hotkey(hotkey: str, sign: Callable[[bytes], str]) -> dict: ``` Link ``hotkey`` so SN51 gamma it pays Lium with becomes this account's USD credit. ``sign(message_bytes) -> str`` signs the UTF-8 challenge with the hotkey's key (0x-hex sr25519). Linking an already-linked hotkey is a no-op. Returns ``\{"hotkey", "netuid", "spender"\}``; a ``mint_gamma`` must name ``spender``. Servers that accept gamma spent at a service (subtensor runtime 493, which removes deposit spenders) also return ``service``: the hotkey then spends its gamma with ``spend_gamma(service, netuid, amount)``. ### backup_create ```python def backup_create( pod: lium.sdk.models.PodInfo, *, path: str, frequency_hours: int = 6, retention_days: int = 7 ) -> lium.sdk.models.BackupConfig: ``` Create or replace a backup configuration for a pod. **Arguments:** - **pod:** Pod to configure. - **path:** Explicit filesystem path inside the pod volume to back up. - **frequency_hours:** Backup interval in hours. - **retention_days:** Retention period in days. **Returns:** Created [`BackupConfig`](/developers/sdk/reference/models/backup-config). ### backup_update ```python def backup_update( config_id: str, *, path: str, frequency_hours: int, retention_days: int ) -> lium.sdk.models.BackupConfig: ``` Replace the schedule of an existing backup configuration in place. A refused update leaves the old configuration as it was. **Arguments:** - **config_id:** Backup configuration identifier. - **path:** Explicit filesystem path inside the pod volume to back up. - **frequency_hours:** Backup interval in hours. - **retention_days:** Retention period in days. **Returns:** Updated [`BackupConfig`](/developers/sdk/reference/models/backup-config). ### backup_now ```python def backup_now( pod: lium.sdk.models.PodInfo, *, name: str, description: str = '' ) -> Dict[str, Any]: ``` Trigger an immediate backup for a pod. **Arguments:** - **pod:** Pod to back up. - **name:** Backup name. - **description:** Optional description. **Returns:** API response payload from the run-now endpoint. ### backup_config ```python def backup_config(pod: lium.sdk.models.PodInfo) -> Optional[lium.sdk.models.BackupConfig]: ``` Return the backup configuration for a pod if one exists. **Arguments:** - **pod:** Pod to inspect. **Returns:** [`BackupConfig`](/developers/sdk/reference/models/backup-config) if present, otherwise ``None``. ### backup_list ```python def backup_list() -> List[lium.sdk.models.BackupConfig]: ``` List all backup configurations across all pods. **Returns:** List of [`BackupConfig`](/developers/sdk/reference/models/backup-config). ### backup_logs ```python def backup_logs(pod: lium.sdk.models.PodInfo) -> List[lium.sdk.models.BackupLog]: ``` Get recent backup logs for a pod. **Arguments:** - **pod:** Pod to inspect. **Returns:** List of [`BackupLog`](/developers/sdk/reference/models/backup-log) entries (possibly empty). ### backup_logs_all ```python def backup_logs_all() -> List[lium.sdk.models.BackupLog]: ``` Get all backup logs available to the current user. ### backup_log ```python def backup_log(backup_id: str) -> lium.sdk.models.BackupLog: ``` Get one backup log owned by the authenticated user. ### resolve_backup_id ```python def resolve_backup_id(backup_id: str) -> str: ``` Resolve an eight-character backup ID shown by the CLI. ### backup_delete ```python def backup_delete(config_id: str) -> Dict[str, Any]: ``` Delete a backup configuration by ID. **Arguments:** - **config_id:** Backup configuration identifier. **Returns:** API response payload. ### backup_cancel ```python def backup_cancel(backup_id: str) -> Dict[str, Any]: ``` Request cancellation of an active backup while retaining its history. ### backup_log_delete ```python def backup_log_delete(backup_id: str) -> Dict[str, Any]: ``` Delete the stored data for a completed backup and retain its audit row. ### restore ```python def restore( pod: lium.sdk.models.PodInfo, *, backup_id: str, restore_path: Optional[str] = None ) -> Dict[str, Any]: ``` Restore a backup to a pod. **Arguments:** - **pod:** Pod to restore to. - **backup_id:** ID of the backup to restore. - **restore_path:** New or empty subdirectory where the backup is restored. Defaults to ``/restored``. **Returns:** Response from the restore API. ### restore_logs ```python def restore_logs(pod: lium.sdk.models.PodInfo) -> List[lium.sdk.models.RestoreLog]: ``` Get recent restore logs for a pod. **Arguments:** - **pod:** Pod to inspect. **Returns:** List of [`RestoreLog`](/developers/sdk/reference/models/restore-log) entries (possibly empty). ### resolve_restore_id ```python def resolve_restore_id(restore_id: str) -> str: ``` Resolve an eight-character restore ID shown by the CLI. ### restore_cancel ```python def restore_cancel(restore_id: str) -> Dict[str, Any]: ``` Request cancellation of an active restore. ### get_deployment_estimate ```python def get_deployment_estimate(executor_id: str, template_id: str) -> dict: ``` Estimate deployment time for a template on a node. **Arguments:** - **executor_id:** Node UUID. - **template_id:** Template UUID. **Returns:** Dict with ``estimated_seconds``, ``is_slow_machine``, ``warning_message``, ``is_cached_template``, and ``docker_image_size`` (image size in bytes, or ``None`` if unknown). ### balance ```python def balance() -> float: ``` Get current account balance. Pods are billed per second at their hourly price; the balance is debited every 5 minutes, and every minute once less than 10 minutes of balance is left. **Returns:** Floating-point balance value reported by ``/users/me``. ### balance_or_none ```python def balance_or_none() -> Optional[float]: ``` The balance from ``/users/me``, or ``None`` when the answer has no ``balance`` field, where `balance()` would say 0, which a caller comparing balances would misread. ### events ```python def events( *, since: Optional[datetime.datetime] = None, pod_id: Optional[str] = None, api_key_id: Optional[str] = None, limit: int = 200 ) -> List[Dict[str, Any]]: ``` The account's event log, newest first (``GET /users/me/events``). Each entry is one recorded action, a rent request, creation, reboot, deletion with its reason, an API/SSH key or template change, with ``actor`` naming the session or API key (``api_key_id``, ``api_key_name``) that made the request; ``null`` when the platform acted by itself. ``pod_id`` also answers for a pod that has since been deleted. ### audit_log ```python def audit_log( *, since: Optional[datetime.datetime] = None, until: Optional[datetime.datetime] = None, action: Optional[str] = None, source: Optional[str] = None, api_key_id: Optional[str] = None, resource_id: Optional[str] = None, cursor: Optional[str] = None, limit: int = 100 ) -> Dict[str, Any]: ``` One page of the account audit log, newest first (``GET /account/audit``). One entry per request that changed something on the account, a pod created, restarted or deleted, a key created or revoked, a login, a top-up requested, a setting or a workspace member changed, with ``action`` (``pod.delete``, ``key.create``, ``login``, …), ``actor`` (``auth`` ``session`` or ``api_key``, ``user_id``, ``api_key_id``, ``api_key_name``), ``source`` (``portal``, ``cli``, ``sdk``, ``mcp``, ``admin``, ``api``), ``ip`` (filled on the caller's own entries only), ``user_agent``, ``request_id``, ``method``, ``route``, ``status_code``, ``resource_type``, ``resource_id``, ``summary``. ``action`` filters by prefix (``pod.`` is every pod action). Returns ``\{"items": [...], "next_cursor": ...\}``; pass ``next_cursor`` back as ``cursor`` for the next (older) page, ``None`` when this page was the last. ``limit`` is 1–500. A key needs the ``read`` scope; a server without the route answers 404 (`[`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error)`). ### topup_currencies ```python def topup_currencies(refresh: bool = False) -> List[Dict[str, Any]]: ``` List stablecoin currencies/networks supported for self-serve top-ups. **Arguments:** - **refresh:** Bypass the server-side cache and re-fetch from the provider. **Returns:** List of ``\{"code", "network", "decimals", "display_decimals"\}`` dicts. ### topup_create_invoice ```python def topup_create_invoice( amount: float, crypto_currency: str, crypto_network: str ) -> Dict[str, Any]: ``` Create a stablecoin top-up invoice for the current account. The returned ``deposit_address`` is where the exact ``crypto_amount`` of ``crypto_currency`` (on ``crypto_network``) must be sent. Once the provider confirms the transfer, the account balance is credited automatically. **Arguments:** - **amount:** Top-up amount in USD. - **crypto_currency:** Stablecoin code (e.g. ``"USDT"``), see `topup_currencies()`. - **crypto_network:** Network the stablecoin is sent on (e.g. ``"tron"``). **Returns:** Invoice dict including ``invoice_id``, ``deposit_address``, ``crypto_amount``, ``crypto_currency``, ``crypto_network``, ``exchange_rate`` and ``expires_at``. ### transfer_credits ```python def transfer_credits( to: str, amount: float, description: Optional[str] = None, idempotency_key: Optional[str] = None ) -> Dict[str, Any]: ``` Move credit from this account's balance to another account (``POST /users/me/transfer-credits``). The key must hold the ``billing`` scope ([`LiumScopeError`](/developers/sdk/reference/exceptions/lium-scope-error) otherwise). The request is sent once with an ``Idempotency-Key`` header, yours, or a fresh ``uuid4``. The platform keeps a transfer's recorded answer for 24 h: within that time an identical request with the same key gets that answer back; later the key is forgotten and a repeat transfers again. After a lost answer do not repeat it: check the Billing page and contact support. **Arguments:** - **to:** The recipient's e-mail (anything with an ``@``) or account id. - **amount:** USD, at least $0.01. - **description:** A note the recipient sees. - **idempotency_key:** Sent as ``Idempotency-Key``; within 24 h an identical repeat of an answered transfer gets its answer back, later it transfers again. Omitted: the SDK makes one. **Returns:** ``\{"sender_balance", "transfer_id", "idempotency_key"\}``. **Raises:** - **LiumError:** ``code`` ``self_transfer`` (400), ``insufficient_balance`` (402) or ``recipient_unavailable`` (409: no account with that e-mail or id, or a deleted or blocked one). ``code`` ``transfer_outcome_unknown`` (with ``idempotency_key`` and ``hint``): timeout, dropped connection, 5xx after the POST, or, on a repeat, a 409 ``idempotency_outcome_unknown`` / ``idempotency_in_progress`` or a 422 ``idempotency_key_reused`` (the key reused with a changed body, such as a different amount). - **LiumTransferInterruptedError:** Ctrl-C while waiting for the answer; a ``KeyboardInterrupt`` with the same ``code``, ``idempotency_key`` and ``hint``., the transfer may have happened; check transfer history on the Billing page of the account owning the key and, if it is not there, contact support with ``idempotency_key`` from the error. Do not repeat it, with that key or a new one. ### topup_checkout_link ```python def topup_checkout_link( amount_usd: float, success_url: Optional[str] = None, cancel_url: Optional[str] = None ) -> Dict[str, Any]: ``` Open a Stripe Checkout page that tops up this account by card (``POST /stripe/create-checkout-session``). Nothing is charged by this call: whoever opens ``url`` enters a card (and passes the bank's 3-D Secure check, if it asks) and the balance is credited by Stripe's webhook once the payment succeeds. This is how an agent with no card of its own asks a person to pay. The key must hold the ``billing`` scope (or be a browser session); a ``read`` / ``rent`` / ``manage`` key is refused with [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error). **Arguments:** - **amount_usd:** At least $10, the platform's top-up minimum. - **success_url:** Where Checkout sends the payer after paying; default the Billing page of the site the client talks to. - **cancel_url:** Where Checkout sends the payer on cancel; same default. **Returns:** ``\{"url", "session_id", "amount_usd", "expires_at"\}``; ``expires_at`` is a Unix time, or ``None`` when the server does not send it. ### wait_for_credit ```python def wait_for_credit( baseline: float, timeout: float = 600, interval: float = 2.0, *, _clock: Callable[[], float] = , _sleep: Callable[[float], NoneType] = ) -> Dict[str, Any]: ``` Poll the balance until it rises above ``baseline`` (a top-up landed) or ``timeout`` seconds pass. Card and crypto top-ups are credited by the payment provider's webhook, so the call that starts a payment returns before the money is on the balance. Read `balance()` before starting the payment and pass it as ``baseline``. A balance read that fails is retried on the next tick; the pods' own billing can lower the balance meanwhile, so a top-up smaller than what the account's running pods burn in ``interval`` seconds may be missed, and any other credit landing meanwhile (a second invoice, a transfer) also ends the wait: compare ``balance`` with what you paid. **Returns:** ``\{"credited": bool, "balance": float | None, "seconds": float\}``: ``credited`` is ``False`` when the time ran out; ``balance`` is the last one read (``None`` if none could be read). ### volumes ```python def volumes() -> List[lium.sdk.models.VolumeInfo]: ``` List all volumes for the current user. **Returns:** List of [`VolumeInfo`](/developers/sdk/reference/models/volume-info). ### volume ```python def volume(volume_id: str) -> lium.sdk.models.VolumeInfo: ``` Get a specific volume by ID. **Arguments:** - **volume_id:** Volume identifier. **Returns:** [`VolumeInfo`](/developers/sdk/reference/models/volume-info) for the requested volume. ### volume_create ```python def volume_create(name: str, *, description: str = '') -> lium.sdk.models.VolumeInfo: ``` Create a new volume. **Arguments:** - **name:** Volume name. - **description:** Optional description. **Returns:** Created [`VolumeInfo`](/developers/sdk/reference/models/volume-info). ### volume_update ```python def volume_update( volume_id: str, *, name: Optional[str] = None, description: Optional[str] = None ) -> lium.sdk.models.VolumeInfo: ``` Update a volume's metadata. **Arguments:** - **volume_id:** Volume identifier. - **name:** Optional new name. - **description:** Optional description. **Returns:** Updated [`VolumeInfo`](/developers/sdk/reference/models/volume-info). **Raises:** - **ValueError:** If neither ``name`` nor ``description`` is provided. ### volume_delete ```python def volume_delete(volume_id: str) -> Dict[str, Any]: ``` Delete a volume. **Arguments:** - **volume_id:** Volume identifier. **Returns:** API response payload from the delete request. ### schedule_termination ```python def schedule_termination( pod: Union[str, lium.sdk.models.PodInfo, Dict], *, termination_time: str ) -> Dict[str, Any]: ``` Schedule a pod for automatic termination at a future date and time. The pod does not have to be running: the dict `up()` returns, or its ``id``, is enough, so the schedule can be set before `wait_ready()`, a pod that never becomes ready is billed all the same and is removed at ``termination_time``. **Arguments:** - **pod:** Pod identifier, PodInfo (or any object with an ``id`` attribute), or dict with an ``id`` field. - **termination_time:** ISO 8601 formatted datetime string (e.g., "2025-10-17T15:30:00Z") **Returns:** Response from the schedule termination API ### cap_spend ```python def cap_spend(pod: lium.sdk.models.PodInfo, *, budget_usd: float) -> datetime.datetime: ``` Schedule the pod's removal for the moment it will have spent ``budget_usd``. The API caps a rental by time only. This computes the time at which the pod, billed at its hourly price since ``created_at``, reaches the budget (`lium.sdk.utils.spend_cap_deadline()`) and schedules removal then, unless a removal is already scheduled earlier (a ``--ttl``), which stays, as ``lium up --budget --ttl`` keeps the earlier of the two. Client-side: the pod keeps running if the schedule is canceled or the price changes. **Arguments:** - **pod:** A running pod with ``created_at`` and an executor price. - **budget_usd:** Total spend allowed for the pod's lifetime. **Returns:** The scheduled removal time (UTC): the budget deadline, or the earlier removal that was already scheduled. **Raises:** - **ValueError:** Budget not positive, price or creation time unknown, the budget is already spent (the deadline is in the past), or the pod's scheduled removal has already passed. ### cancel_scheduled_termination ```python def cancel_scheduled_termination(pod: lium.sdk.models.PodInfo) -> Dict[str, Any]: ``` Cancel a scheduled termination for a pod. **Arguments:** - **pod:** Pod to cancel the schedule for **Returns:** Response from the cancel scheduled termination API ### install_jupyter ```python def install_jupyter( pod: lium.sdk.models.PodInfo, *, jupyter_internal_port: int ) -> Dict[str, Any]: ``` Install Jupyter Notebook on a pod. **Arguments:** - **pod:** Pod to install Jupyter on - **jupyter_internal_port:** Internal port for Jupyter Notebook **Returns:** Response from the install Jupyter API --- # pod_ssh_command ```python from lium.sdk import pod_ssh_command ``` Defined in `lium.sdk.client`. ```python def pod_ssh_command(pod: lium.sdk.models.PodInfo) -> Optional[str]: ``` The pod's ssh command for a shell, with the host-key options and without a key. ``ssh -p -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile= @`` (`ssh_target()` + `openssh_host_key_options()`, shell-quoted): what ``lium ps --format json`` and ``lium describe`` show as ``ssh_command``. It carries no ``-i ``, the key path lives in the SDK config, not in the pod record; [`ssh()`](/developers/sdk/reference/client/lium#ssh) adds it. Unlike [`ssh()`](/developers/sdk/reference/client/lium#ssh) it creates no pin file (only the directory): a listing leaves nothing per pod behind. None when the pod has no ssh command yet or the API's value is not ``ssh @ [-p ]``; both views keep the raw ``ssh_cmd`` next to it. --- # Config ```python from lium.sdk import Config ``` Defined in `lium.sdk.config`. ```python Config( api_key: str, base_url: str = 'https://lium.io/api', ssh_key_path: Optional[pathlib.Path] = None, workspace: Optional[str] = None, workspace_id: Optional[str] = None, workspace_explicit: bool = False, session_token: Optional[str] = None, api_key_source: str = 'explicit', ssh_key_source: Optional[str] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `api_key` | str | | | `base_url` | str | `'https://lium.io/api'` | | `ssh_key_path` | Optional[pathlib.Path] | `None` | | `workspace` | Optional[str] | `None` | | `workspace_id` | Optional[str] | `None` | | `workspace_explicit` | bool | `False` | | `session_token` | Optional[str] | `None` | | `api_key_source` | str | `'explicit'` | | `ssh_key_source` | Optional[str] | `None` | ## Properties | Name | Type | Description | | --- | --- | --- | | `api_key_fingerprint` | str | | | `api_key_description` | str | key <fingerprint> from <source>, what an auth error should name. | | `ssh_public_keys` | List[str] | Get SSH public keys. | ## Methods | Method | Description | | --- | --- | | [`load`](#load) | Load config from env/file with smart defaults. | ### load ```python def load( cls, workspace: Optional[str] = None, *, key_for_workspace: bool = True, require_key: bool = True ) -> lium.sdk.config.Config: ``` Load config from env/file with smart defaults. An explicitly requested workspace (``workspace=`` or LIUM_WORKSPACE) means the key saved for it (``[workspace.] api_key``) and nothing else: a key acts in exactly one workspace, so falling back to another key would run the command in another team on another balance; ``ValueError`` when none is saved. Otherwise, first match wins: LIUM_API_API_KEY / LIUM_API_KEY, the key saved for the workspace selected with ``lium workspaces use`` (``[workspaces] active``), ``[api] api_key``. A config without workspace sections resolves as it always has. ``key_for_workspace=False`` is for the commands that manage teams (``lium workspaces``, ``lium keys``): a missing key for the requested workspace is not an error there, the key is LIUM_API_API_KEY / LIUM_API_KEY, else the one saved for the requested workspace, else the one saved for the stored default, else ``[api] api_key``, so ``lium keys create … --save`` and ``LIUM_API_KEY=… lium workspaces use …``, the remedies for a missing key, work with LIUM_WORKSPACE exported, and ``lium -w W workspaces members`` reads with W's key when one is saved. ``require_key=False`` leaves ``api_key`` None instead of raising: a password login, and the session-only commands once signed in, need no API key. --- # machine ```python from lium.sdk import machine ``` Defined in `lium.sdk.decorators`. ```python def machine( machine: str, template_id: Optional[str] = None, cleanup: bool = True, requirements: Optional[Sequence[str]] = None, *, timeout: Optional[float] = 3600, keep_warm: float = 0, local: bool = False, quiet: bool = False ): ``` Decorator to execute a function on a remote Lium machine. Creates a new pod, sends function source code and executes it remotely, returns the result, and optionally cleans up the pod. The decorated function also offers ``f.remote(*a)`` (same as ``f(*a)``), ``f.local(*a)`` (run the original here), ``f.map(iterable)`` (run every item on one pod, rented once) and ``f.close()`` (remove the pod kept by ``keep_warm``). Arguments travel as a pickle: your own bytes, loaded on your own pod as they are. The result comes back from provider hardware, so nothing it contains is unpickled here: it travels as a JSON envelope plus an ``.npz`` sidecar for numpy arrays, read with ``allow_pickle=False``. What round-trips, exactly: ``None``, ``bool``, ``int``, ``float``, ``str``, ``bytes``; ``list``, ``tuple``, ``set``, ``frozenset`` and ``dict`` of those, nested; ``datetime``/``date``/``time``/``timedelta``, ``Decimal``, ``pathlib.Path``, ``uuid.UUID``; ``numpy.ndarray`` (any dtype without Python objects, any shape) and numpy scalars. Anything else, a dataclass, an ``Enum``, an ``OrderedDict``, a tensor, an ndarray subclass, raises [`ResultEncodingError`](/developers/sdk/reference/result_codec/result-encoding-error) on the pod, naming the type and its place in the result, and is re-raised here (return ``.tolist()``, ``dict(x)``, ``x.value`` instead). Only the function's own ``def`` is sent: import what it needs inside the body and pass everything else as arguments. Whatever the function prints is relayed to this process's stdout/stderr while it runs. An exception raised on the pod is re-raised here with the same type when that type is a builtin (``except ValueError`` works; its args come along when they are plain data, else its message); other types come back as [`RemoteExecutionError`](/developers/sdk/reference/exceptions/remote-execution-error). Either way the ``__cause__`` is a [`RemoteExecutionError`](/developers/sdk/reference/exceptions/remote-execution-error) carrying the remote traceback, exit code and captured output. **Arguments:** - **machine:** ``"x"`` or ``""``, e.g. ``"1xH200"``, ``"RTX4090"``, ``"2xA100"``. The count defaults to 1. The GPU is named as ``lium ls --gpu`` takes it (``H100``, ``RTX4090``, ``rtx pro 6000``, a bare ``4090``) and has to match the node's type whole, ``"A100"`` never rents an RTX A1000. The cheapest node with exactly that many GPUs of that type free to rent is rented (a split host with 2 of 8 free is a ``2xA100``) and billed for those, by the backend in one call ([`rent()`](/developers/sdk/reference/client/lium#rent)) when it offers ``rent_by_spec``, else picked here from a listing; when none matches, the error names the types the listing has. - **template_id:** Docker template ID (optional, uses the node's default if not specified) - **cleanup:** Whether to delete the pod after execution (default: True) - **requirements:** Optional iterable of pip-installable packages to install on the pod. They go into a venv that also sees the image's own packages, created and populated once per pod and reused by later calls with the same list. - **timeout:** Seconds the function may run on the pod before it is killed (default 1 h; ``None`` for no limit; ``0`` or a negative number is refused when decorating). A fraction of a second is rounded up to the next second for the kill. The pod is also scheduled for removal at ``timeout + 15 min`` (24 h when ``timeout=None``) so a caller that dies mid-call cannot leave it billing. - **keep_warm:** Seconds the pod stays after a call for the next one, from this process or the next run of the script (the pod is found by name). Default 0: the pod is removed when the call returns. The pod is scheduled for removal server-side ``keep_warm + 2 min`` after each call, so nothing depends on the caller coming back. - **local:** Run the function in this process instead (``LIUM_MACHINE_LOCAL=1`` does the same for every decorated function), for tests and offline work. - **quiet:** Suppress the one-line progress messages written to stderr. --- # ClusterNotListedError ```python from lium.sdk import ClusterNotListedError ``` Defined in `lium.sdk.exceptions`. The cluster rent may have gone through, but the pod listing did not show a whole cluster within the lookup window. Two ways in. ``confirmed`` is True when the rent route confirmed the order and named the member pods (``pod_ids``) but the listing did not show every one of them, or failed: the nodes are rented and billing. ``confirmed`` is False when the rent route gave no answer (timeout, 5xx) and the by-name lookup then found fewer members than requested (none included), or could not list at all: the nodes may be rented. Either way a second ``up_cluster`` may rent a second cluster. ###### Attributes: - **pod_ids:** The member pod ids the API returned; empty when the order was not confirmed. - **listed:** The member ids the last listing showed. - **confirmed:** Whether the API confirmed the order. - **backup_notice:** The rent answer's backup notice, if any: the members may run without backups. ```python ClusterNotListedError( message: str, *, pod_ids=(), listed=(), confirmed: bool = True, backup_notice=None ) ``` ## Catching it `ClusterNotListedError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import ClusterNotListedError try: ... # any SDK call except ClusterNotListedError as e: print(e) ``` --- # LiumAuthError ```python from lium.sdk import LiumAuthError ``` Defined in `lium.sdk.exceptions`. Authentication error. ```python LiumAuthError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumAuthError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. Catching `LiumAuthError` also catches [`LiumSessionError`](/developers/sdk/reference/exceptions/lium-session-error). ```python from lium.sdk import LiumAuthError try: ... # any SDK call except LiumAuthError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumBudgetExceededError ```python from lium.sdk import LiumBudgetExceededError ``` Defined in `lium.sdk.exceptions`. The API key's budget refused the request (402, ``error.code`` ``API_KEY_BUDGET_EXCEEDED``). A per-key daily, monthly or lifetime budget (``lium keys create --daily-budget / --monthly-budget / --max-budget``, ``lium keys budget``) is reached: the billing tick deletes the key's pods (data outside a volume is lost), and a rent, a pod extend / schedule change or a key-initiated top-up (``lium fund``, ``lium topup``, ``lium topup card``) through that key is refused with this one error. The message names the window hit. ``budget_usd``, ``spent_usd``, ``window`` (``daily``, ``monthly`` or ``max``) and ``api_key_id`` are filled when the server's error body carried them, else ``None``. A [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error) handler keeps working; this class is for callers that want the numbers. ```python LiumBudgetExceededError( message: str, *, budget_usd: float | None = None, spent_usd: float | None = None, window: str | None = None, api_key_id: str | None = None, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumBudgetExceededError` subclasses [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error) → [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumBudgetExceededError try: ... # any SDK call except LiumBudgetExceededError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `budget_usd` | | | | `spent_usd` | | | | `window` | | | | `api_key_id` | | | --- # LiumError ```python from lium.sdk import LiumError ``` Defined in `lium.sdk.exceptions`. Base exception for Lium SDK. ``code``, ``hint`` and ``request_id`` come from the API's error envelope (``error: \{code, message, hint, request_id\}``) and the ``X-Request-Id`` header; all three are ``None`` when the server did not send them. ```python LiumError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumError` subclasses `Exception`, so a handler for any of those also catches it. Catching `LiumError` also catches [`ClusterNotListedError`](/developers/sdk/reference/exceptions/cluster-not-listed-error), [`LiumAuthError`](/developers/sdk/reference/exceptions/lium-auth-error), [`LiumGpuOperationError`](/developers/sdk/reference/exceptions/lium-gpu-operation-error), [`LiumHostKeyError`](/developers/sdk/reference/exceptions/lium-host-key-error), [`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error), [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error), [`LiumRateLimitError`](/developers/sdk/reference/exceptions/lium-rate-limit-error), [`LiumRentOutcomeUnknownError`](/developers/sdk/reference/exceptions/lium-rent-outcome-unknown-error), [`LiumSSHError`](/developers/sdk/reference/exceptions/lium-ssh-error), [`LiumServerError`](/developers/sdk/reference/exceptions/lium-server-error), [`OutputLimitExceeded`](/developers/sdk/reference/exceptions/output-limit-exceeded), [`PodStartError`](/developers/sdk/reference/exceptions/pod-start-error), [`RemoteExecutionError`](/developers/sdk/reference/exceptions/remote-execution-error). ```python from lium.sdk import LiumError try: ... # any SDK call except LiumError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `code` | | | | `hint` | | | | `request_id` | | | --- # LiumGpuOperationError ```python from lium.sdk import LiumGpuOperationError ``` Defined in `lium.sdk.exceptions`. A GPU reset or clock change ran on the node and failed (a reset's status ``failed``, or a 409, that lists ``gpus``). Inspect ``gpus`` and ``container_restarted``: the container can fail to restart even when every GPU reset succeeds. ``gpus`` is each GPU's outcome ([`GpuResetOutcome`](/developers/sdk/reference/models/gpu-reset-outcome) from [`reset_gpu()`](/developers/sdk/reference/client/lium#reset_gpu), [`GpuClockOutcome`](/developers/sdk/reference/models/gpu-clock-outcome) from [`lock_gpu_clocks()`](/developers/sdk/reference/client/lium#lock_gpu_clocks) / [`reset_gpu_clocks()`](/developers/sdk/reference/client/lium#reset_gpu_clocks)), so the caller sees which GPUs failed and which stay locked; ``container_restarted`` says whether a reset started the pod's container again (``None`` when the server did not say, always for clocks). ``code`` is the API's (``reset_not_supported``, ...). ```python LiumGpuOperationError( message: str, *, gpus: list[lium.sdk.models.GpuResetOutcome | lium.sdk.models.GpuClockOutcome] | None = None, container_restarted: bool | None = None, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumGpuOperationError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumGpuOperationError try: ... # any SDK call except LiumGpuOperationError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumHostKeyError ```python from lium.sdk import LiumHostKeyError ``` Defined in `lium.sdk.exceptions`. A pod presented an SSH host key that differs from the pinned one. ```python LiumHostKeyError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumHostKeyError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumHostKeyError try: ... # any SDK call except LiumHostKeyError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumInsufficientBalanceError ```python from lium.sdk import LiumInsufficientBalanceError ``` Defined in `lium.sdk.exceptions`. The account cannot pay for this: a 403 with a balance reason, or a 402 balance refusal. The API sends 402 ``BALANCE_REQUIRED`` when an API key on an account with no balance lists pods (the first call of a first rental), and 402 ``account_unfunded`` when such a key tries a write other than a delete, cancelling a running backup or restore, a top-up or adding an SSH key. Clearing a pod's removal deadline (``DELETE /pods/\{id\}/schedule-removal``) is refused too, since the pod keeps running. A client at version 0.46.10 or older, or one that sends no ``X-Lium-Client-Version``, gets a 403 ``insufficient_balance`` for the same writes; both raise this error. ``required`` and ``available`` are the USD amounts printed in the server's refusal, when present, else ``None``; ``available`` keeps the sign of a negative balance. The server refuses a balance at or below the unrounded cost, so a balance equal to ``required`` can still be refused. Callers that catch [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error) keep working; ones that want the numbers catch this class. ```python LiumInsufficientBalanceError( message: str, *, required: float | None = None, available: float | None = None, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumInsufficientBalanceError` subclasses [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error) → [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumInsufficientBalanceError try: ... # any SDK call except LiumInsufficientBalanceError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `required` | | | | `available` | | | --- # LiumNotFoundError ```python from lium.sdk import LiumNotFoundError ``` Defined in `lium.sdk.exceptions`. Resource not found (404). ```python LiumNotFoundError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumNotFoundError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumNotFoundError try: ... # any SDK call except LiumNotFoundError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumPermissionError ```python from lium.sdk import LiumPermissionError ``` Defined in `lium.sdk.exceptions`. The account is not allowed to do this (403). ```python LiumPermissionError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumPermissionError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. Catching `LiumPermissionError` also catches [`LiumBudgetExceededError`](/developers/sdk/reference/exceptions/lium-budget-exceeded-error), [`LiumInsufficientBalanceError`](/developers/sdk/reference/exceptions/lium-insufficient-balance-error), [`LiumScopeError`](/developers/sdk/reference/exceptions/lium-scope-error). ```python from lium.sdk import LiumPermissionError try: ... # any SDK call except LiumPermissionError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumRateLimitError ```python from lium.sdk import LiumRateLimitError ``` Defined in `lium.sdk.exceptions`. Rate limit exceeded. ``retry_after`` is the response's ``Retry-After`` in seconds, ``None`` when absent. ```python LiumRateLimitError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumRateLimitError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumRateLimitError try: ... # any SDK call except LiumRateLimitError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `retry_after` | float \| None | | --- # LiumRentOutcomeUnknownError ```python from lium.sdk import LiumRentOutcomeUnknownError ``` Defined in `lium.sdk.exceptions`. [`up()`](/developers/sdk/reference/client/lium#up) could not confirm a rent's result; check ``ps()`` before renting again, a pod may be billing. Raised when the first request got no answer (a timeout, a dropped connection, a 5xx) or was rate-limited, and the repeat got no answer or failed too; or when the API answered without a pod id. No new pod was listed yet, but the server may still be completing a request, so a pod **may exist and bill**. ``idempotency_key`` is the key the requests carried. ```python LiumRentOutcomeUnknownError( message: str, *, idempotency_key: str | None = None, pod_name: str | None = None, executor_id: str | None = None, candidates: list[str] | None = None, endpoint: str | None = None, payload: dict | None = None, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumRentOutcomeUnknownError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumRentOutcomeUnknownError try: ... # any SDK call except LiumRentOutcomeUnknownError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `idempotency_key` | | | | `pod_name` | | | | `executor_id` | | | | `candidates` | | | | `endpoint` | | | | `payload` | | | --- # LiumScopeError ```python from lium.sdk import LiumScopeError ``` Defined in `lium.sdk.exceptions`. The API key lacks the scope the route needs (403 ``API key '' does not have the '' scope``). ``scope`` is the missing scope (``read``, ``rent``, ``manage``, ``billing``) when the server named it, else ``None``. Another key with that scope fixes this, not funds or verification. ```python LiumScopeError( message: str, *, scope: str | None = None, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumScopeError` subclasses [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error) → [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumScopeError try: ... # any SDK call except LiumScopeError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | ## Attributes | Name | Type | Description | | --- | --- | --- | | `scope` | | | --- # LiumServerError ```python from lium.sdk import LiumServerError ``` Defined in `lium.sdk.exceptions`. Server error. ```python LiumServerError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumServerError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumServerError try: ... # any SDK call except LiumServerError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumSessionError ```python from lium.sdk import LiumSessionError ``` Defined in `lium.sdk.exceptions`. A browser session (``lium workspaces login`` / LIUM_SESSION_TOKEN) is missing or refused. An API key cannot fix this, so the CLI's hint must not point at one. ```python LiumSessionError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumSessionError` subclasses [`LiumAuthError`](/developers/sdk/reference/exceptions/lium-auth-error) → [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. Catching `LiumSessionError` also catches [`LiumTwoFactorRequired`](/developers/sdk/reference/exceptions/lium-two-factor-required). ```python from lium.sdk import LiumSessionError try: ... # any SDK call except LiumSessionError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumSSHError ```python from lium.sdk import LiumSSHError ``` Defined in `lium.sdk.exceptions`. SSH could not connect to a pod (refused, timed out, login rejected). ```python LiumSSHError( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `LiumSSHError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumSSHError try: ... # any SDK call except LiumSSHError as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # LiumTransferInterruptedError ```python from lium.sdk import LiumTransferInterruptedError ``` Defined in `lium.sdk.exceptions`. Ctrl-C ended [`transfer_credits()`](/developers/sdk/reference/client/lium#transfer_credits) after its POST: the transfer may have happened. ```python LiumTransferInterruptedError(message: str, *, idempotency_key: str, hint: str) ``` ## Catching it `LiumTransferInterruptedError` subclasses `KeyboardInterrupt`, so a handler for any of those also catches it. ```python from lium.sdk import LiumTransferInterruptedError try: ... # any SDK call except LiumTransferInterruptedError as e: print(e, e.hint) ``` | Field | Meaning | | --- | --- | | `hint` | what to try next, when the API suggested something | ## Attributes | Name | Type | Description | | --- | --- | --- | | `code` | | | | `idempotency_key` | | | | `hint` | | | | `request_id` | | | --- # LiumTwoFactorRequired ```python from lium.sdk import LiumTwoFactorRequired ``` Defined in `lium.sdk.exceptions`. ```python LiumTwoFactorRequired(mfa_token: str) ``` ## Catching it `LiumTwoFactorRequired` subclasses [`LiumSessionError`](/developers/sdk/reference/exceptions/lium-session-error) → [`LiumAuthError`](/developers/sdk/reference/exceptions/lium-auth-error) → [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import LiumTwoFactorRequired try: ... # any SDK call except LiumTwoFactorRequired as e: print(e) ``` --- # OutputLimitExceeded ```python from lium.sdk import OutputLimitExceeded ``` Defined in `lium.sdk.exceptions`. A command run with `[`exec`](/developers/sdk/reference/client/lium#exec)` produced more than ``max_output_bytes`` bytes of output (stdout and stderr together). The limit bounds output bytes, not memory. ```python OutputLimitExceeded( message: str = '', *, code: str | None = None, hint: str | None = None, request_id: str | None = None ) ``` ## Catching it `OutputLimitExceeded` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import OutputLimitExceeded try: ... # any SDK call except OutputLimitExceeded as e: print(e, e.code, e.hint, e.request_id) ``` | Field | Meaning | | --- | --- | | `code` | machine-readable error code from the API, when it sent one | | `hint` | what to try next, when the API suggested something | | `request_id` | the API request id; quote it when you contact support | --- # PodStartError ```python from lium.sdk import PodStartError ``` Defined in `lium.sdk.exceptions`. A pod reached a state from which it will never become ready. Raised by [`wait_ready()`](/developers/sdk/reference/client/lium#wait_ready) (and everything built on it) when the pod reports a terminal status such as ``FAILED`` or ``STOPPED``, or disappears from the account's pod list while being waited for. A timeout is *not* a start error: a pod that is merely slow is still returned as ``None``. ###### Attributes: - **pod_id:** The id that was waited for. - **pod:** The last `[`PodInfo`](/developers/sdk/reference/models/pod-info)` seen for it, or ``None`` if it was never listed. - **status:** The last status seen (upper-cased), or ``None`` if never listed. - **history:** Every distinct status observed while waiting, in order. - **cause:** The failure the backend recorded for the pod (the error headline, e.g. ``Container creation failed due to ... (failure_step: ssh_connect)``), or ``None`` when it recorded nothing readable. ```python PodStartError( message: str, *, pod_id: str, pod=None, status=None, history=None, cause=None ) ``` ## Catching it `PodStartError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import PodStartError try: ... # any SDK call except PodStartError as e: print(e) ``` ## Attributes | Name | Type | Description | | --- | --- | --- | | `pod_id` | | | | `pod` | | | | `status` | | | | `history` | | | | `cause` | | | --- # RemoteExecutionError ```python from lium.sdk import RemoteExecutionError ``` Defined in `lium.sdk.exceptions`. A function offloaded with ``@lium.machine`` did not return a result from the pod, or a command streamed with ``Lium.stream_exec(check=True)`` exited non-zero. When the function raised, the caller sees the original exception type and this error is its ``__cause__``; ``remote_traceback`` is the traceback from the pod. ```python RemoteExecutionError( message: str, *, exception_type: str | None = None, remote_traceback: str = '', exit_code: int | None = None, stdout: str = '', stderr: str = '' ) ``` ## Catching it `RemoteExecutionError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import RemoteExecutionError try: ... # any SDK call except RemoteExecutionError as e: print(e) ``` ## Attributes | Name | Type | Description | | --- | --- | --- | | `exception_type` | | | | `remote_traceback` | | | | `exit_code` | | | | `stdout` | | | | `stderr` | | | --- # Job ```python from lium.sdk import Job ``` Defined in `lium.sdk.jobs`. A command started in the background on a pod. Returned by [`run_background()`](/developers/sdk/reference/client/lium#run_background) and [`job()`](/developers/sdk/reference/client/lium#job). Every method opens one short SSH session; nothing is cached, so the answers reflect the pod as it is now. ```python Job( client: lium.sdk.client.Lium, pod: lium.sdk.models.PodInfo, *, name: str, pid: int, command: str, job_dir: str = '/workspace/logs' ) ``` ## Attributes | Name | Type | Description | | --- | --- | --- | | `pod` | | | | `name` | | | | `pid` | | | | `command` | | | | `job_dir` | | | | `log_path` | | | | `pid_file` | | | | `id_file` | | | | `exit_file` | | | | `cmd_file` | | | ## Methods | Method | Description | | --- | --- | | [`to_dict`](#to_dict) | | | [`status`](#status) | \{"state": "running" \| "exited" \| "gone", "exit_code": int \| None\}. | | [`is_running`](#is_running) | | | [`poll`](#poll) | None while the job runs, its exit code once it ended (subprocess.Popen.poll semantics). | | [`wait`](#wait) | Block until the job ends and return its exit code. | | [`wait_for_port`](#wait_for_port) | Block until TCP port accepts connections inside the pod. | | [`logs`](#logs) | The job's combined stdout/stderr; the last tail lines when given. Empty if no log yet. | | [`kill`](#kill) | Send signal to the job's whole process group. Returns whether anything received it. | ### to_dict ```python def to_dict() -> Dict[str, Any]: ``` ### status ```python def status() -> Dict[str, Any]: ``` ``\{"state": "running" | "exited" | "gone", "exit_code": int | None\}``. ``gone`` means the process is not alive and left no exit code, killed as a group, or the pod restarted underneath it (a PID that another process took after the restart does not count as alive: the ``.id`` file decides). A job with no ``.id`` file (started before the file existed) is ``gone`` too. ### is_running ```python def is_running() -> bool: ``` ### poll ```python def poll() -> Optional[int]: ``` ``None`` while the job runs, its exit code once it ended (``subprocess.Popen.poll`` semantics). **Raises:** - **LiumError:** the process is gone without an exit code. ### wait ```python def wait(timeout: Optional[float] = None, *, poll_interval: float = 5) -> int: ``` Block until the job ends and return its exit code. **Raises:** - **TimeoutError:** still running after ``timeout`` seconds (the job keeps running). - **LiumError:** the process vanished without writing an exit code. ### wait_for_port ```python def wait_for_port( port: int, timeout: float = 600, *, host: str = '127.0.0.1', poll_interval: float = 3 ) -> None: ``` Block until TCP ``port`` accepts connections inside the pod. The probe and the job's liveness are read in the same SSH round trip, and the job's state is judged first: a server that crashed while loading fails this call at once with its exit code and the last log lines, even when another process holds the port. A job that exited 0 with the port open counts as ready (it forked its server and left). **Raises:** - **LiumError:** the job ended (or vanished) before the port answered. - **TimeoutError:** the port did not answer within ``timeout`` seconds. ### logs ```python def logs(tail: Optional[int] = None) -> str: ``` The job's combined stdout/stderr; the last ``tail`` lines when given. Empty if no log yet. ### kill ```python def kill(signal: str = 'TERM') -> bool: ``` Send ``signal`` to the job's whole process group. Returns whether anything received it. Nothing is signaled when the PID belongs to a different process (the pod restarted and that process took the number) or when the job has no ``.id`` file to check it against; the call returns ``False``. --- # ApiKeyInfo ```python from lium.sdk import ApiKeyInfo ``` Defined in `lium.sdk.models`. An API key row as ``GET /keys`` / ``POST /keys`` describe it. The budget fields are USD, one per window, ``daily_budget_usd`` (a UTC day), ``monthly_budget_usd`` (a UTC calendar month), ``max_budget_usd`` (the key's lifetime); ``spent_today_usd`` / ``spent_month_usd`` / ``spent_total_usd`` are what the key's pods were billed in each; a budget is ``None`` when the key has none. ``pod_visibility`` is ``own`` (the key lists only the pods it rented) or ``account`` (every pod of the account); ``None`` from a server before per-key budgets. ``key`` is the secret when the server sent it (``POST /keys`` always; the list rows on servers that echo it): kept out of ``repr`` and of `to_dict()`, so it is printed only where ``create`` prints it once. ``raw`` is the server's row, for fields this class does not name. ```python ApiKeyInfo( id: str, name: str, scopes: List[str] = , created_at: Optional[str] = None, last_used: Optional[str] = None, workspace_id: Optional[str] = None, daily_budget_usd: Optional[float] = None, monthly_budget_usd: Optional[float] = None, max_budget_usd: Optional[float] = None, spent_today_usd: Optional[float] = None, spent_month_usd: Optional[float] = None, spent_total_usd: Optional[float] = None, pod_visibility: Optional[str] = None, pods_count: Optional[int] = None, key: Optional[str] = None, raw: Dict[str, Any] = ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `name` | str | | | `scopes` | List[str] | | | `created_at` | Optional[str] | `None` | | `last_used` | Optional[str] | `None` | | `workspace_id` | Optional[str] | `None` | | `daily_budget_usd` | Optional[float] | `None` | | `monthly_budget_usd` | Optional[float] | `None` | | `max_budget_usd` | Optional[float] | `None` | | `spent_today_usd` | Optional[float] | `None` | | `spent_month_usd` | Optional[float] | `None` | | `spent_total_usd` | Optional[float] | `None` | | `pod_visibility` | Optional[str] | `None` | | `pods_count` | Optional[int] | `None` | | `key` | Optional[str] | `None` | | `raw` | Dict[str, Any] | | ## Methods | Method | Description | | --- | --- | | [`matches`](#matches) | Whether name_or_id names this key: its id, or its name (case-insensitive). | | [`to_dict`](#to_dict) | The server's row without the key material, plus the normalised fields, what --json prints. | ### matches ```python def matches(name_or_id: str) -> bool: ``` Whether ``name_or_id`` names this key: its id, or its name (case-insensitive). ### to_dict ```python def to_dict() -> Dict[str, Any]: ``` The server's row without the key material, plus the normalised fields, what ``--json`` prints. --- # ApiKeyRefusal ```python from lium.sdk import ApiKeyRefusal ``` Defined in `lium.sdk.models`. One row of ``GET /keys/\{id\}/refusals``: a request the key's budget refused, when, which window was hit (``daily`` / ``monthly`` / ``max``), the route asked, the USD asked for, and the budget and spend at the time. ``raw`` is the server's row. ```python ApiKeyRefusal( at: Optional[str] = None, window: Optional[str] = None, route: Optional[str] = None, amount_usd: Optional[float] = None, budget_usd: Optional[float] = None, spent_usd: Optional[float] = None, raw: Dict[str, Any] = ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `at` | Optional[str] | `None` | | `window` | Optional[str] | `None` | | `route` | Optional[str] | `None` | | `amount_usd` | Optional[float] | `None` | | `budget_usd` | Optional[float] | `None` | | `spent_usd` | Optional[float] | `None` | | `raw` | Dict[str, Any] | | --- # ApiKeyScope ```python from lium.sdk import ApiKeyScope ``` Defined in `lium.sdk.models`. One row of ``GET /keys/scopes``: what a scope lets a key do, in the server's words. ``description`` is the one sentence next to the picker's checkbox, ``can`` the "what this key can do" lines, ``route_families`` the routes it opens, ``default`` whether a key made without naming scopes gets it. ```python ApiKeyScope( scope: str, description: str, title: str = '', can: List[str] = , route_families: List[str] = , default: bool = False ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `scope` | str | | | `description` | str | | | `title` | str | `''` | | `can` | List[str] | | | `route_families` | List[str] | | | `default` | bool | `False` | --- # BackupConfig ```python from lium.sdk import BackupConfig ``` Defined in `lium.sdk.models`. Backup configuration information. ```python BackupConfig( id: str, huid: str, pod_executor_id: str, backup_frequency_hours: int, retention_days: int, backup_path: str, is_active: bool, created_at: str, updated_at: Optional[str] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `huid` | str | | | `pod_executor_id` | str | | | `backup_frequency_hours` | int | | | `retention_days` | int | | | `backup_path` | str | | | `is_active` | bool | | | `created_at` | str | | | `updated_at` | Optional[str] | `None` | --- # BackupLog ```python from lium.sdk import BackupLog ``` Defined in `lium.sdk.models`. Backup log information. ```python BackupLog( id: str, huid: str, backup_config_id: str, status: str, started_at: str, completed_at: Optional[str] = None, error_message: Optional[str] = None, progress: Optional[float] = None, backup_volume_id: Optional[str] = None, created_at: Optional[str] = None, stage: Optional[str] = None, total_files: Optional[int] = None, processed_files: Optional[int] = None, total_bytes: Optional[int] = None, processed_bytes: Optional[int] = None, deletion_state: Optional[str] = None, physical_cleanup_at: Optional[str] = None, status_message: Optional[str] = None, elapsed_seconds: Optional[int] = None, throughput_bytes_per_second: Optional[int] = None, estimated_remaining_seconds: Optional[int] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `huid` | str | | | `backup_config_id` | str | | | `status` | str | | | `started_at` | str | | | `completed_at` | Optional[str] | `None` | | `error_message` | Optional[str] | `None` | | `progress` | Optional[float] | `None` | | `backup_volume_id` | Optional[str] | `None` | | `created_at` | Optional[str] | `None` | | `stage` | Optional[str] | `None` | | `total_files` | Optional[int] | `None` | | `processed_files` | Optional[int] | `None` | | `total_bytes` | Optional[int] | `None` | | `processed_bytes` | Optional[int] | `None` | | `deletion_state` | Optional[str] | `None` | | `physical_cleanup_at` | Optional[str] | `None` | | `status_message` | Optional[str] | `None` | | `elapsed_seconds` | Optional[int] | `None` | | `throughput_bytes_per_second` | Optional[int] | `None` | | `estimated_remaining_seconds` | Optional[int] | `None` | --- # Cluster ```python from lium.sdk import Cluster ``` Defined in `lium.sdk.models`. The pods of one multi-node rental, in node-rank order. Node 0 is the natural ``MASTER_ADDR`` for ``torchrun``; every member reaches every other over the private overlay (``10.42.0.``) that the cluster image raises on start. ```python Cluster( id: str, pods: List[lium.sdk.models.PodInfo], backup_notice: Optional[str] = None ) ``` --- # ClusterOffer ```python from lium.sdk import ClusterOffer ``` Defined in `lium.sdk.models`. A group of free nodes on one RDMA fabric that can be rented as a single multi-node job. ``node_count`` is the whole fabric; ``nodes`` are the members free right now. Every node of a cluster rental is taken whole (all its GPUs), so the price of an N-node cluster is the sum of the N nodes' ``price_per_hour``. ```python ClusterOffer( fabric_id: str, fabric_type: str, link_rate: Optional[str], fabric_measured: bool, node_count: int, nodes: List[lium.sdk.models.ExecutorInfo] ) ``` --- # ExecutorInfo ```python from lium.sdk import ExecutorInfo ``` Defined in `lium.sdk.models`. ```python ExecutorInfo( id: str, huid: str, machine_name: str, gpu_type: str, gpu_count: int, price_per_hour: float, price_per_gpu: float, location: Dict, specs: Dict, status: str, docker_in_docker: bool, ip: str, available_port_count: Optional[int] = None, effective_upload_speed_mbps: Optional[float] = None, effective_download_speed_mbps: Optional[float] = None, max_cuda_version: Optional[float] = None, tier: Optional[str] = None, available_gpu_count: Optional[int] = None, whole_host_only: Optional[bool] = None, whole_host_only_ssh_only: Optional[bool] = None, interconnect: Optional[Dict] = None, nvlink: Optional[bool] = None, gpu_power_limited: Optional[bool] = None, gpu_power_limit_w: Optional[int] = None, gpu_power_limit_default_w: Optional[int] = None, frequent_rent_failures: Optional[bool] = None, last_verified_at: Optional[str] = None, reliability_score: Optional[float] = None, provider_notes: Optional[List[str]] = None, scheduled_notice: Optional[Dict] = None, removal_at: Optional[str] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `huid` | str | | | `machine_name` | str | | | `gpu_type` | str | | | `gpu_count` | int | | | `price_per_hour` | float | | | `price_per_gpu` | float | | | `location` | Dict | | | `specs` | Dict | | | `status` | str | | | `docker_in_docker` | bool | | | `ip` | str | | | `available_port_count` | Optional[int] | `None` | | `effective_upload_speed_mbps` | Optional[float] | `None` | | `effective_download_speed_mbps` | Optional[float] | `None` | | `max_cuda_version` | Optional[float] | `None` | | `tier` | Optional[str] | `None` | | `available_gpu_count` | Optional[int] | `None` | | `whole_host_only` | Optional[bool] | `None` | | `whole_host_only_ssh_only` | Optional[bool] | `None` | | `interconnect` | Optional[Dict] | `None` | | `nvlink` | Optional[bool] | `None` | | `gpu_power_limited` | Optional[bool] | `None` | | `gpu_power_limit_w` | Optional[int] | `None` | | `gpu_power_limit_default_w` | Optional[int] | `None` | | `frequent_rent_failures` | Optional[bool] | `None` | | `last_verified_at` | Optional[str] | `None` | | `reliability_score` | Optional[float] | `None` | | `provider_notes` | Optional[List[str]] | `None` | | `scheduled_notice` | Optional[Dict] | `None` | | `removal_at` | Optional[str] | `None` | ## Properties | Name | Type | Description | | --- | --- | --- | | `notice_warning` | Optional[str] | The sentence lium up prints before renting a node with a scheduled notice; None without one. | | `link` | Optional[str] | One-word interconnect label: NV18 (NVLink, 18 links), PCIe/SYS (worst PCIe class), or None when unknown. | | `p2p` | Optional[bool] | Every GPU pair can read each other's memory (NCCL works without NCCL_P2P_DISABLE=1); None when unknown. | | `driver_version` | str | Extract GPU driver version from specs. | | `gpu_model` | str | Extract GPU model name from specs. | | `cpu_count` | Optional[int] | Number of CPU threads the node reports (specs.cpu.count); None if unknown. | | `download_speed` | float | Effective download speed in Mbps (backend-authoritative; 0.0 if unknown). | | `upload_speed` | float | Effective upload speed in Mbps (backend-authoritative; 0.0 if unknown). | --- # GpuClockOutcome ```python from lium.sdk import GpuClockOutcome ``` Defined in `lium.sdk.models`. One GPU's result of [`lock_gpu_clocks()`](/developers/sdk/reference/client/lium#lock_gpu_clocks) / [`reset_gpu_clocks()`](/developers/sdk/reference/client/lium#reset_gpu_clocks). ``result`` is ``locked``, ``reset`` or ``failed``; ``applied_*_mhz`` are what the node set after clamping. ```python GpuClockOutcome( index: int, uuid: str, result: str, applied_min_mhz: Optional[int] = None, applied_max_mhz: Optional[int] = None, detail: Optional[str] = None ) ``` --- # GpuClockResult ```python from lium.sdk import GpuClockResult ``` Defined in `lium.sdk.models`. What [`lock_gpu_clocks()`](/developers/sdk/reference/client/lium#lock_gpu_clocks) / [`reset_gpu_clocks()`](/developers/sdk/reference/client/lium#reset_gpu_clocks) return when every GPU succeeded. ```python GpuClockResult(pod_id: str, ok: bool, gpus: List[lium.sdk.models.GpuClockOutcome]) ``` --- # GpuResetOutcome ```python from lium.sdk import GpuResetOutcome ``` Defined in `lium.sdk.models`. One GPU's result of [`reset_gpu()`](/developers/sdk/reference/client/lium#reset_gpu): ``result`` is ``reset``, ``latch_cleared`` or ``failed``. ```python GpuResetOutcome(index: int, uuid: str, result: str, detail: Optional[str] = None) ``` --- # GpuResetResult ```python from lium.sdk import GpuResetResult ``` Defined in `lium.sdk.models`. What [`reset_gpu()`](/developers/sdk/reference/client/lium#reset_gpu) returns when every GPU was reset. ```python GpuResetResult( pod_id: str, ok: bool, container_restarted: bool, gpus: List[lium.sdk.models.GpuResetOutcome] ) ``` --- # GpuStats ```python from lium.sdk import GpuStats ``` Defined in `lium.sdk.models`. One GPU's utilization as reported by ``nvidia-smi`` on the pod. ```python GpuStats( index: int, name: str, utilization_pct: Optional[float], memory_used_mib: Optional[float], memory_total_mib: Optional[float], temperature_c: Optional[float], power_draw_w: Optional[float] ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `index` | int | | | `name` | str | | | `utilization_pct` | Optional[float] | | | `memory_used_mib` | Optional[float] | | | `memory_total_mib` | Optional[float] | | | `temperature_c` | Optional[float] | | | `power_draw_w` | Optional[float] | | ## Properties | Name | Type | Description | | --- | --- | --- | | `memory_pct` | Optional[float] | | --- # JobQuote ```python from lium.sdk import JobQuote ``` Defined in `lium.sdk.models`. What [`quote()`](/developers/sdk/reference/client/lium#quote) returns: a job's cost on a node, line by line. ```python JobQuote( executor_id: str, gpu_count: int, hours: float, price_per_hour: float, lines: List[lium.sdk.models.JobQuoteLine], total_usd: float, pod_balance_floor_usd: float, allocation: Optional[Dict[str, Any]] = None, rent_balance_required_usd: Optional[float] = None ) ``` --- # JobQuoteLine ```python from lium.sdk import JobQuoteLine ``` Defined in `lium.sdk.models`. One charge of a [`JobQuote`](/developers/sdk/reference/models/job-quote); ``rate_usd`` and ``amount_usd`` are None for egress (billed at AWS cost). ```python JobQuoteLine( item: str, unit: str, rate_usd: Optional[float], quantity: float, amount_usd: Optional[float], note: str ) ``` --- # PodInfo ```python from lium.sdk import PodInfo ``` Defined in `lium.sdk.models`. ```python PodInfo( id: str, name: str, status: str, huid: str, ssh_cmd: Optional[str], ports: Dict, created_at: str, updated_at: str, executor: Optional[lium.sdk.models.ExecutorInfo], template: Dict, removal_scheduled_at: Optional[str], jupyter_installation_status: Optional[str], jupyter_url: Optional[str], enable_volume_encryption: bool | None = None, volume_encryption_status: str | None = None, estimated_ready_seconds: int | None = None, eta_basis: str | None = None, phase: str | None = None, gpu_count: Optional[int] = None, workspace_id: Optional[str] = None, cluster_id: Optional[str] = None, cluster_node_index: Optional[int] = None, cluster_overlay_ip: Optional[str] = None, api_key_id: Optional[str] = None, api_key_name: Optional[str] = None, api_key_stamped: bool = False, local_volume_path: Optional[str] = None, backup_notice: Optional[str] = None, billing_paused: bool = False ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `name` | str | | | `status` | str | | | `huid` | str | | | `ssh_cmd` | Optional[str] | | | `ports` | Dict | | | `created_at` | str | | | `updated_at` | str | | | `executor` | Optional[[ExecutorInfo](/developers/sdk/reference/models/executor-info)] | | | `template` | Dict | | | `removal_scheduled_at` | Optional[str] | | | `jupyter_installation_status` | Optional[str] | | | `jupyter_url` | Optional[str] | | | `enable_volume_encryption` | bool \| None | `None` | | `volume_encryption_status` | str \| None | `None` | | `estimated_ready_seconds` | int \| None | `None` | | `eta_basis` | str \| None | `None` | | `phase` | str \| None | `None` | | `gpu_count` | Optional[int] | `None` | | `workspace_id` | Optional[str] | `None` | | `cluster_id` | Optional[str] | `None` | | `cluster_node_index` | Optional[int] | `None` | | `cluster_overlay_ip` | Optional[str] | `None` | | `api_key_id` | Optional[str] | `None` | | `api_key_name` | Optional[str] | `None` | | `api_key_stamped` | bool | `False` | | `local_volume_path` | Optional[str] | `None` | | `backup_notice` | Optional[str] | `None` | | `billing_paused` | bool | `False` | ## Properties | Name | Type | Description | | --- | --- | --- | | `host` | Optional[str] | | | `username` | Optional[str] | | | `ssh_port` | int | Extract SSH port from command. | | `volume_path` | str | Return the pod's volume mount path: where the validator mounted it, else the template's. | | `default_restore_path` | str | Return a safe restore destination below the local volume mount. | ## Methods | Method | Description | | --- | --- | | [`eta_hint`](#eta_hint) | One line for a pod that is still starting, e.g. est. ready in ~18 s (phase: pulling image). | ### eta_hint ```python def eta_hint() -> Optional[str]: ``` One line for a pod that is still starting, e.g. ``est. ready in ~18 s (phase: pulling image)``. ``None`` when the API sent neither an estimate nor a phase (older backend, or the pod is already RUNNING). --- # RentResult ```python from lium.sdk import RentResult ``` Defined in `lium.sdk.models`. What [`rent()`](/developers/sdk/reference/client/lium#rent) chose and, unless it was a dry run, rented. ``pod`` is the same dict [`up()`](/developers/sdk/reference/client/lium#up) returns (``id``, ``name``, ``executor_id``, …) and is ``None`` on a dry run. ``gpu_count`` is the GPUs rented and ``price_per_hour`` what the rental bills (``price_per_gpu`` × ``gpu_count``); both differ from ``executor.gpu_count`` / ``executor.price_per_hour`` when the server rents a split of a larger node. ``alternatives`` are the runners-up in the order they would have been tried; ``attempts`` is how many rents the server made before one succeeded (0 on a dry run, > 1 when the first pick was taken meanwhile); ``server_side`` says whether the backend chose the node or this client did. ```python RentResult( executor: lium.sdk.models.ExecutorInfo, price_per_hour: float, gpu_count: int = 1, pod: Optional[Dict] = None, template_id: Optional[str] = None, candidates: int = 1, alternatives: List[Dict] = , attempts: int = 0, dry_run: bool = False, server_side: bool = False, backup_notice: Optional[str] = None ) ``` --- # RestoreLog ```python from lium.sdk import RestoreLog ``` Defined in `lium.sdk.models`. Restore log information. ```python RestoreLog( id: str, huid: str, backup_id: str, pod_id: str, status: str, progress: float, created_at: str, started_at: Optional[str] = None, completed_at: Optional[str] = None, error_message: Optional[str] = None, logs: Optional[List[str]] = None, restore_path: Optional[str] = None, backup_engine: Optional[str] = None, restore_mode: Optional[str] = None, stage: Optional[str] = None, last_heartbeat_at: Optional[str] = None, total_files: Optional[int] = None, processed_files: Optional[int] = None, total_bytes: Optional[int] = None, processed_bytes: Optional[int] = None, elapsed_seconds: Optional[int] = None, throughput_bytes_per_second: Optional[int] = None, estimated_remaining_seconds: Optional[int] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `huid` | str | | | `backup_id` | str | | | `pod_id` | str | | | `status` | str | | | `progress` | float | | | `created_at` | str | | | `started_at` | Optional[str] | `None` | | `completed_at` | Optional[str] | `None` | | `error_message` | Optional[str] | `None` | | `logs` | Optional[List[str]] | `None` | | `restore_path` | Optional[str] | `None` | | `backup_engine` | Optional[str] | `None` | | `restore_mode` | Optional[str] | `None` | | `stage` | Optional[str] | `None` | | `last_heartbeat_at` | Optional[str] | `None` | | `total_files` | Optional[int] | `None` | | `processed_files` | Optional[int] | `None` | | `total_bytes` | Optional[int] | `None` | | `processed_bytes` | Optional[int] | `None` | | `elapsed_seconds` | Optional[int] | `None` | | `throughput_bytes_per_second` | Optional[int] | `None` | | `estimated_remaining_seconds` | Optional[int] | `None` | --- # SSHKey ```python from lium.sdk import SSHKey ``` Defined in `lium.sdk.models`. Public SSH key registered for the current user. ```python SSHKey( id: str, name: str, public_key: str, created_at: Optional[str] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `name` | str | | | `public_key` | str | | | `created_at` | Optional[str] | `None` | --- # Template ```python from lium.sdk import Template ``` Defined in `lium.sdk.models`. Template information. ```python Template( id: str, name: str, huid: str, docker_image: str, docker_image_tag: str, category: str, status: str, supports_volume_encryption: bool = False, official: bool = False ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `name` | str | | | `huid` | str | | | `docker_image` | str | | | `docker_image_tag` | str | | | `category` | str | | | `status` | str | | | `supports_volume_encryption` | bool | `False` | | `official` | bool | `False` | --- # VolumeInfo ```python from lium.sdk import VolumeInfo ``` Defined in `lium.sdk.models`. Volume information. ```python VolumeInfo( id: str, huid: str, name: str, description: str, created_at: str, updated_at: Optional[str] = None, current_size_bytes: int = 0, current_file_count: int = 0, current_size_gb: float = 0.0, current_size_mb: float = 0.0, last_metrics_update: Optional[str] = None ) ``` ## Fields | Name | Type | Default | | --- | --- | --- | | `id` | str | | | `huid` | str | | | `name` | str | | | `description` | str | | | `created_at` | str | | | `updated_at` | Optional[str] | `None` | | `current_size_bytes` | int | `0` | | `current_file_count` | int | `0` | | `current_size_gb` | float | `0.0` | | `current_size_mb` | float | `0.0` | | `last_metrics_update` | Optional[str] | `None` | --- # ResultEncodingError ```python from lium.sdk import ResultEncodingError ``` Defined in `lium.sdk.result_codec`. The function's result holds a value that does not travel back from the pod. Raised on the pod before the result file is written; the message names the type and its place in the result. The caller re-raises it with the same message. ```python ResultEncodingError(*args, **kwargs) ``` ## Catching it `ResultEncodingError` subclasses `TypeError` → `Exception`, so a handler for any of those also catches it. ```python from lium.sdk import ResultEncodingError try: ... # any SDK call except ResultEncodingError as e: print(e) ``` --- # Screenshots for the Renters section The Renters pages reference these images. Capture each on a clean, signed-in [lium.io](https://lium.io) browser at viewport ≥ 1440×900 with the dark theme (default) and save as PNG into this directory. | File | URL to capture | What's in frame | |------|----------------|-----------------| | `browse-pods.png` | `https://lium.io/` | Browse Pods list with the right-hand filter rail visible. | | `access-ssh-keys.png` | `https://lium.io/ssh-keys` | Access page with the **SSH Keys** tab selected. | | `api-keys-list.png` | `https://lium.io/ssh-keys` | Access page with the **API Keys** tab selected (one+ row visible). | | `templates-list.png` | `https://lium.io/templates` | Templates page showing **My templates** cards and the start of **Browse templates**. | | `templates-create.png` | `https://lium.io/templates/create` | Create new template form, scrolled so Container Image, Tag, Volume, Internal Ports are all visible. | | `volumes-list.png` | `https://lium.io/volumes` | Volumes page with the rate calculator at the top and at least one existing volume row. | | `backups-list.png` | `https://lium.io/backups` | Global Backups page with filters and a few rows of history. | | `create-pod-top.png` | Click RENT NOW on any row from `/` | Top of the Create Pod page: Pod Name, machine card, Template card, SSH Key chip. | | `create-pod-summary.png` | Same as above, scrolled down | Right-hand summary panel and the **Deploy** button. | | `create-pod.png` | Same as above | Whole page (full-page screenshot if your tool supports it; otherwise the upper half). | | `create-pod-restore.png` | Same as above, scrolled to bottom | The **Restore** subsection on the Create Pod form. | | `pod-detail.png` | Click SEE DETAILS on a running pod | Pod detail header with **SSH CONNECTION**, INFO panel, TEMPLATE panel. | | `backups-tab-pod.png` | Pod detail page → **Backups** tab | Backups + Restore From Backup sections. | | `backups-config-modal.png` | Pod detail page → click **Backup** | The Backup Configuration modal open over the page. | | `scheduled-termination.png` | Pod detail page → click **DELETE** | The "Schedule pod deletion" menu / preset chooser. | ## Quick capture recipe The Chrome extension lets us grab page-level screenshots, but it can't write directly to the WSL filesystem in this build. Easiest manual flow: 1. Open the URL above in a logged-in browser at 1440×900. 2. Use your OS screenshot tool (or a full-page extension like GoFullPage) to save PNG. 3. Drop the file into this `docs/pod-users/assets/` folder using the exact name from the table. 4. `npm run build` from the lium-docs root and confirm the images render. ## Why these images matter The Renters pages are now UI-first: they walk a renter through the dashboard step by step. Without the images, every workflow still works (the prose is self-contained), but with them, a new user can match every "click X" to the actual button on screen and get to a running pod in 5 minutes flat. This file is generated by hand; update it when you add or rename a screenshot reference in any `pod-users/*.md` file.