Shader
Rent a GPU

DocsGuides14 of 35 · 3 min read

Rent a GPU

Launch an NVIDIA GPU by the second from the app, the SDK, the CLI or MCP, and watch its meter.

A rental runs one machine and charges its seconds as they run (Metering and settlement). You need 300 credits of headroom in your balance and, to use SSH with a key, your SSH public key. An agent also needs a per-request cap that covers the GPU's rate for 1 hour (Agent keys and caps).

#Launch a GPU

GPUMemoryCredits per second, fromPer hour, fromAvailable
H200141 GB1.23$4.4444
H100 SXM80 GB0.56$2.0378
A10080 GB0.29$1.048
L40S48 GB0.13$0.467
RTX 409024 GB0.11$0.39159

App

  1. Pick a model

    Open GPUs. Each model shows its memory, Credits/s, Per hour, how many are Available, and what it Needs to launch against Your balance.

  2. Add your key

    Paste your SSH public key into SSH public key. Without one, the instance gets a generated password shown only to you.

  3. Launch

    The panel shows the machine's price, quoted before launch and locked for the rental. Press Launch. The instance page opens at provisioning.

  4. Watch the meter

    When SSH and Jupyter answer, it turns running and shows Seconds run, Credits so far and the Last settlement, with the time to the next one.

SDK

rent.ts
const rented = await shader.rent({ gpu: 'h100-sxm-80gb', sshPublicKey })
const instance = await shader.waitUntilRunning(rented.id)

waitUntilRunning polls until the instance is running and returns it with its meter and connection details.

CLI

Terminal
shader rent h100-sxm-80gb --ssh-key ~/.ssh/id_ed25519.pub --wait

--wait returns once SSH and Jupyter answer, with the instance id and the SSH command.

MCP

Call rent_gpu with gpu set to h100-sxm-80gb and, optionally, ssh_public_key. Read the meter with get_instance.

#What happened

  1. Admission

    The API quoted one machine of the model at its live price and locked that rate for the rental. It checked your headroom, after what running rentals and pending generations reserve, and, for an agent, the key's caps.

  2. Provisioning

    The provider started a machine for the model.

  3. Metering

    The meter began only once SSH and Jupyter answered, so the start-up time is not charged.

  4. Settlement

    From then on, the backend settles the seconds every 60 seconds and at stop.

#The receipt

Every 60 seconds a settlement charges the seconds since the last one, and each leaves a rental_settle receipt. Each line charges its seconds at the rate locked at launch.

#Afterwards

Connect over SSH or Jupyter, and stop it when you are done. Once you are in, cat /etc/shader/meter.pub prints the key of the meter agent signing your seconds; it is the same key the instance page shows. It also stops by itself when your balance reaches zero.

#If it fails

What you seeWhyNext
CREDITS_TOO_LOWThe balance is under the 300-credit headroom; the error says by how muchDeposit
GPU_SOLD_OUT, Sold outNo free machine of that modelPick another model
QUOTE_EXPIREDThe quoted price ran out before you launchedLaunch again from a fresh quote
GPU_UNAVAILABLENo machine of that model can be quoted nowTry another model or later
AGENT_CAP_EXCEEDEDThe rate for 1 hour is above the key's per-request capRaise the cap or pick a smaller GPU
AGENT_DAILY_CAP_EXCEEDEDNot enough of the key's day is leftWait for 00:00 UTC or raise the cap
failed, with "Credits refunded"The machine never startedNothing was charged. Launch again
UPSTREAM_UNAVAILABLEThe GPU provider did not answerTry again