Rent a GPU machine
rent_gpuRent one machine found by search_gpus. COSTS MONEY: price per GPU-hour x GPUs, paid an hour at a time from when it starts running (booting is free) until terminate_instance or termination_hours, whichever comes first; worst_case_usd in the result is the most it can cost, and balance_covers_hours says how many hours the balance pays. It rents every GPU on the machine unless gpu_count says fewer (only some hosts allow that). Pass max_price_per_gpu_hour, normally the price search_gpus showed: if the live price is higher nothing is rented and the error gives the new price. Spot machines can be taken back by their host at any time. Boots the Arrakis PyTorch image unless template_id (list_images) or a public image is given; uses ssh_public_key, else ssh_key_id, else the account's first SSH key. Returns instance_id, state, the locked price, worst_case_usd and what to do next. Calling again with the same idempotency_key, or the same node_id and name within 10 minutes, returns the same machine instead of renting a second; use a new name for a second machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A name you will recognise. | |
| image | No | Or any public image as docker pull takes it, e.g. vllm/vllm-openai:v0.11.0 or nvcr.io/nvidia/pytorch:25.01-py3 (x86-64). Checked with its registry before anything is charged. Not with template_id. | |
| start | No | With image: idle (default) keeps the machine waiting for SSH; image runs the image's own command (server images such as vLLM). Reach a server with ssh -L 8000:localhost:8000. | |
| node_id | Yes | node_id from search_gpus. | |
| gpu_count | No | GPUs to rent on that machine. Default: all of them (the whole machine); fewer works only on hosts that allow splitting. | |
| ssh_key_id | No | Id of an SSH key saved on the account. | |
| template_id | No | Image to boot: an id from list_images. Default: the Arrakis PyTorch image (SSH, login banner and tools built in). | |
| ssh_public_key | No | Your SSH public key, for example the contents of ~/.ssh/id_ed25519.pub. | |
| idempotency_key | No | Reuse when retrying. | |
| termination_hours | Yes | Hours until the machine is removed automatically. | |
| max_price_per_gpu_hour | No | The most to pay per GPU-hour (USD). If the live price is higher, nothing is rented. |