Rentals
Start a quoted machine or cluster, watch it, extend it and stop it.
Start a rental
/api/v1/rentalsNeeds an API keyStarts what a quote priced. Needs a key with a GPU daily limit.
| Field | Type | Required | What it is |
|---|---|---|---|
quote_id | string | Yes | From POST /quotes, within 60 seconds |
ssh_key | string | Yes | Your SSH public key, one line. See SSH keys |
app | string | No | pytorch (the default), jupyter, comfyui, ollama or stable-diffusion. See Apps |
ttl_hours | number | No | Hours until it stops by itself: 1 to 168, 24 by default |
data | boolean | No | Mount /data. Only where the quote's data_allowed is true |
Send an Idempotency-Key header so a retry never starts a second machine. See Safe retries.
curl https://bflops.com/api/v1/rentals \
-H "Authorization: Bearer $BFLOPS_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: train-2026-11-27" \
-d '{"quote_id": "q_9d2c4e1f0a7b4c8e9f1a2b3c4d5e6f70", "ssh_key": "ssh-ed25519 AAAA... you@laptop", "ttl_hours": 4}'It answers 201 at once with the rental in starting. The same request again answers 200 with the same rental.
The rental
{
"rental": {
"id": 1042,
"status": "running",
"kind": "on_demand",
"gpu_model": "H100 SXM",
"gpus": 8,
"nodes": 1,
"cluster": false,
"data": false,
"app": "pytorch",
"per_hour_usd": "17.52",
"cost_usd": "2.92",
"billed_seconds": 600,
"ssh": "ssh -p 40022 root@203.0.113.7",
"tunnel": {
"command": "ssh -N -L 8888:localhost:8888 -p 40022 root@203.0.113.7",
"url": "http://localhost:8888"
},
"node_access": [],
"requested_at": "2026-11-27T09:30:12.000Z",
"started_at": "2026-11-27T09:31:40.000Z",
"ends_at": "2026-11-27T13:31:40.000Z",
"ended_at": null,
"end_reason": null,
"price_rise": null,
"can_stop": true,
"can_extend": true
}
}| Field | What it means |
|---|---|
status | starting, running, paused (billing paused: no check passed for 10 minutes), stopping, ended or failed (never billed) |
ssh, tunnel | How to connect, once running. null before |
node_access | For a cluster: each node's rank, ssh and private_ip |
cost_usd, billed_seconds | What it has cost so far, and the seconds billed |
ends_at | When it stops by itself; null for one started on the site |
end_reason | Why it ended. See below |
price_rise | A coming price change: the new per_hour_usd and at when it applies |
Why a rental ended
end_reason | Meaning |
|---|---|
renter_stop | You or your key stopped it |
balance_empty | Your balance ran out |
spend_cap | A daily limit was reached |
ended_on_time | ttl_hours ran out |
preempted | An interruptible machine was taken back |
stopped_by_host | The machine stopped on its host's side |
key_revoked | The key that started it was revoked |
paused | New machines were paused for safety |
policy | It broke our Terms |
canceled | It was cancelled before it started |
start_failed | It failed to start. Never billed |
List rentals
/api/v1/rentalsNeeds an API keyYour rentals, newest first, in data. Add ?status=active for those still going, and limit (1 to 200, 50 by default).
One rental
/api/v1/rentals/{id}Needs an API keyAnswers { "rental": { ... }, "events": [ ... ] }. Each event has a kind and an at time, with details such as reason where they apply. Read it every 10 seconds or so while it starts.
Stop a rental
/api/v1/rentals/{id}/stopNeeds an API keyBilling ends at once. The machine is deleted with everything outside /data, and status turns ended shortly after. Stopping again changes nothing. No body.
Extend a rental
/api/v1/rentals/{id}/extendNeeds an API keyAdds hours to ends_at of a machine a key started, while it is starting or running. It never goes past 7 days from now. Takes an Idempotency-Key.
{ "hours": 12 }hours is 1 to 168. A rental started on the site cannot be extended: it runs until you stop it. Such a call gets 409 not_extendable.
Errors you may get
| Code | Status | What to do |
|---|---|---|
read_only_key | 403 | Give the key a GPU daily limit on API keys |
expired, price_moved, quote_used | 409 | Get a new quote and start again |
balance_short | 402 | Top up, then start again |
machine_unavailable | 409 | Someone else rented it first. List again |
agent_cap | 429 | The key runs 4 machines or 1 cluster already. Stop one first |
key_daily_limit | 429 | Wait for the next UTC day, or raise the limit |
data_unavailable, data_in_use | 409 | See Keep files with /data |
All codes: Errors.