Rent a Lium GPU pod
rent_podRent a GPU pod on Lium with your API key and wait until it runs; returns the pod id and the ssh command. Spends money from your Lium balance: the pod is billed per second until remove_pod, also when idle. Give gpu (and count, optional max_price_per_gpu_hour and country) to let Lium pick the cheapest matching node, or node_id from search_gpus alone for that node. idempotency_key is required: if a call fails or times out, retry with the same key within 24 hours so it cannot rent twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | GPU model, e.g. H100, RTX 4090; Lium picks the cheapest node that fits | |
| name | No | Pod name | |
| count | No | GPUs on one node (default: 1 with gpu, every free GPU with node_id) | |
| country | No | Two-letter country code (with gpu, not node_id) | |
| node_id | No | A node id from search_gpus, to rent that node | |
| template_id | No | From list_templates; default: Lium's PyTorch image for the node | |
| wait_seconds | No | How long to wait for the pod to run (default 25, max 50) | |
| ssh_public_key | No | OpenSSH public key to log in with (e.g. ~/.ssh/id_ed25519.pub); default: the keys saved on your Lium account | |
| idempotency_key | Yes | A new unique string per rental (e.g. a UUID). Send the same key again within 24 hours to retry the same rental: it never rents twice | |
| max_price_per_gpu_hour | No | Price cap in USD per GPU-hour (with gpu, not node_id) |