Skip to main content
Everything below is copy-paste. The CLI talks to https://pay.u-kiyo.ai and prints JSON. An account-balance rental is charged at the listed hourly price multiplied by the time the instance is ACTIVE, rounded down to the cent. Data transfer is included. Nothing accrues after termination. A rental that never delivers costs $0.00.
python3 and python run PyTorch. On the instance, python3, python, pip and pip3 all use the image’s PyTorch environment (torch 2.14.1 with CUDA 13), in an interactive shell and over non-interactive SSH alike: ssh host python3 -c "import torch; print(torch.cuda.is_available())" prints True. The interpreter itself is /venv/main/bin/python, also returned as pythonPath in the rental status. Do not build a new environment to get PyTorch, and do not call /usr/bin/python3 or /opt/miniforge3 directly: they have no torch.

1. Install

Current version 0.3.2, MIT licensed. Requires Node.js 24 or newer, plus native OpenSSH for exec.
No install at all — run it straight from the registry:
Not root, or npm install -g fails with EACCES? Use a user-owned prefix instead of sudo:
Listing inventory needs no account at all:

2. Create an account and an agent key

Read the current Terms version first — the CLI will not infer it:
Read the Terms and Privacy notice, then sign up with that exact version:
No email, browser or Telegram. The scoped agent key is written to ~/.ukiyo/credentials.json with 0600 permissions and is shown once. Never copy an owner token into an agent’s environment. To attach to an existing human-owned account instead, run ukiyo connect and have its owner approve the printed URL.

3. Fund with USDC on Base (x402)

Minimum $5.00, maximum $500.00.
This authorizes the current Terms and funds through your configured wallet. Set UKIYO_MACHINE_CONFIG to a private local file holding the origin, method, network, asset, recipient, perPaymentMinor, totalMinor, an absolute wallet-key path and an absolute state directory. Never put wallet keys in command arguments or chat. To inspect the challenge without paying, add --plain: the CLI prints the advertised rails and the Base 402 challenge and stops, so another signer can complete it.
Prefer a card? ukiyo topup link --amount 5 --json returns a hosted checkout URL for a human to open. The rails path needs no human.

4. Choose a GPU type

Each row is a GPU type, not a machine: gpuModel, gpuCount, pricePerHourMinor (cents per hour; for example, 84 would mean $0.84/h), minimumCreditMinor (the balance needed to start — ten minutes at that price) and availableOffers. You pick the type; Ukiyo picks the machine.

5. Rent by GPU type

--wait waits up to 900 seconds by default, the same as the server’s 15-minute limit (CLI 0.3.1 waited 600; upgrade if ukiyo --version shows it). --wait blocks until ACTIVE, usually 1 to 4 minutes and at most 15: Ukiyo tries up to three hosts. If none delivers within 15 minutes, Ukiyo fails the rental itself and charges $0.00 — keep polling; there is no need to cancel. ACTIVE means the GPU is verified working and SSH is authenticated, not merely that a machine was allocated. Supported counts are 1, 2, 4 and 8. Add --max-hourly-price to cap the rate, and --idempotency-key so a retry cannot rent twice:
Keep the printed rentalId and deploymentId. Check either later with:
If a rental fails you were charged nothing — rent again. If the first host fails, Ukiyo tries up to two more of the same type, including hosts listed at up to 160% of your price; you still pay the listed price you were quoted.

6. Get SSH access

Prefer exec: it uses the private key without printing it, and pins the host key locally on first use.
If you genuinely need the key material, ukiyo credentials <deploymentId> returns it. The response contains a private key, every reveal is audited server-side, and CLI output redacts the key unless you ask for raw JSON. Never redirect it into a file or transcript the user did not ask for.

7. Confirm the GPU works

PyTorch lives in the image’s virtual environment. python3 works too; the full path is shown here:
Expect 2.14.1+cu130 13.0 True.

8. Terminate

--yes is required: termination is irreversible and destroys everything on the instance. Copy your work off first. Billing stops at termination and the figure you then see is final.

Output shape, and when --wait times out

ukiyo balance --json --ledger-limit <0 to 100> sets how many ledger entries are returned (default 20). Poll status on ukiyo rental <rentalId> --json: PROVISIONING, then ACTIVE; FAILED and TERMINATED are final. When ACTIVE, ukiyo status and ukiyo rental print ssh with host, port and username; for the key use ukiyo credentials <deploymentId> --save-key <path> (or exec). quote.totalMinor is 0 because billing is per second; the rate is quote.hourlyPriceMinor. The JSON each command prints is on Statuses and response shapes. The REST API wraps results as {"data": {...}}; the CLI prints the contents of data at the top level. So REST’s data.deployment.unitPriceMinor is deployment.unitPriceMinor in CLI output, and data.rentalId is just rentalId. If --wait hits its timeout while the rental is still PROVISIONING, the CLI exits 3 — but the rental keeps going server-side. Do not rent again with a new key. Either keep waiting on the same rental, or cancel it:
Re-running ukiyo rent with the same --idempotency-key is also safe: it returns the original rental.

Exit codes

0 success · 1 error · 2 usage error, invalid budget, or a missing confirmation · 3 --wait timed out. Every command accepts --json; errors print a JSON object with code, message and requestId. Set UKIYO_API_URL to target another environment, and UKIYO_API_TOKEN to override the stored credential.

How billing works

  • Unit: usage accrues continuously while the instance is ACTIVE (millisecond precision) at the listed hourly price. The charge is floor(hourly cents × active seconds ÷ 3600) — whole cents, always rounded down. Example only: 109 seconds at 92¢/h is 2.79¢, charged as 2¢.
  • Hold versus charge: starting a rental needs ten minutes of credit at that GPU’s price (minimumCreditMinor). That amount is held, not charged; the hold extends as you run and is released at termination. You pay only the charge above.
  • Final: the charge is fixed at termination (chargeFinal: true). Nothing accrues afterwards, data transfer is included, and a rental that never reaches ACTIVE costs $0.00.
  • On the x402 no-account path the payment is a cap you authorize; the unused remainder returns to the paying wallet in USDC automatically, usually 7 to 12 minutes after termination (allow up to 30).

What is preinstalled

The image is vastai/pytorch:cuda-13.0.3-auto. python3 and python run PyTorch; the interpreter is /venv/main/bin/python. It ships CUDA 13, PyTorch 2.14.1+cu130, torchvision, numpy, pillow, requests and Jupyter. Run /venv/main/bin/pip list for the exact set. For model work, install what you need first:

Copying files off the machine

Use the same host and port as your SSH session, before you terminate:

GPU names

Use the spaced form in requests: RTX 4090, RTX 6000 Ada, A100 PCIe, A100 SXM4. The catalogue also echoes a compact gpuModel such as RTX4090 — that is a display value, not an input.

Where the price is

The rental create response carries it: data.deployment.unitPriceMinor is the hourly rate in cents for the machine you were given (84 = $0.84/h). GET /api/v1/rentals/<rentalId> returns the same field, and chargedMinor with chargeFinal: true once the rental ends. Other connectors: x402 with no account · HTTP API · MCP · Agent Skill