Give your AI agent a GPU in one command
Coding agents already run shell commands, so the
lium CLI is all they need to use a GPU. The agent rents a pod, runs code on it, copies the results back and removes the pod, with no browser and no human click. Billing is per second with no minimum, so a short GPU test costs cents.pip install lium.io && lium up --gpu H100 --ttl 1h
In our test run with Claude Code, an H100 pod came online in under 10 seconds after
lium up, and the whole run cost a few cents.Set it up in three steps
- Create a budgeted key for the agent on a machine or user account the agent cannot read, such as your laptop when the agent runs on a server:
pip install lium.io,lium workspaces login, thenlium keys create agent --scope read --scope rent --pod-visibility own --daily-budget 20. The login keeps your own session in~/.lium, so never run it where the agent runs. It needs an account email and password; if you signed up with Google or GitHub, set a password under Settings with Change password. - On the agent's machine, install the CLI and give it only that key:
export LIUM_API_KEY=sk_..., thenlium whoamito check it. The key sees only the pods it rents and stops at its budget. It holds nobillingscope, so it cannot pay by card or transfer credits. - Add the rules below to the project's
CLAUDE.md(Claude Code) orAGENTS.md(Codex, Cursor), then ask for what you want, for example "benchmark this training script on a GPU and give me the numbers".
## GPU compute (Lium) Rent GPUs with the `lium` CLI. The API key is configured; never print it. - 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 <huid> --name <name> --ttl 1h -y --json`. - Run work with `lium exec <name> "<command>"`; use `lium exec <name> -d "<command>"` for anything long. - Bring results back with `lium scp <name> <remote-file> <local-dir> -d`. - When done, or if anything fails: `lium rm <name> -y`, then `lium ps` to confirm. - If a rent is refused with API_KEY_BUDGET_EXCEEDED, stop and tell me.
Guardrails Lium enforces, whatever the agent does
- Scoped keys. A key holds only the scopes it was created with. Card payments and credit transfers need the
billingscope, and no key can create keys or raise its own budget. - Budgets per key. Give a key a daily, monthly or total budget and a rent that would pass it is refused with
402 API_KEY_BUDGET_EXCEEDED. Set budgets when you create the key, or later withlium keys budget; API keys shows how. - Its own pods only. A key created with
--pod-visibility ownsees and controls only the pods it rented. - Automatic removal.
--ttlschedules the pod's removal as soon as it exists, so a crashed or forgotten session still ends with no pod running (scheduled termination). - A real machine. Every pod has root access and its own Docker daemon, so the agent can build and run containers inside it.
Tools built for agents
- The agent skill teaches the commands once:
npx skills add Datura-ai/lium-skill --skill lium. - The docs MCP server answers questions mid-task:
https://docs.lium.io/mcp. - lium.io/llms-full.txt is the whole agent reference in one fetch.
- AI agents in the docs covers headless signup, funding and the REST API.
Ready to pick a GPU? Browse the marketplace or see prices per GPU model.
For AI agents — CLI install, agent skill, headless signup: llms-full.txt