Skip to content

Search bFLOPS

Pages, GPUs on the list, your machines and actions.

Language中文

Rentals

Start a quoted machine or cluster, watch it, extend it and stop it.

View as Markdown

Start a rental

POST/api/v1/rentalsNeeds an API key

Starts what a quote priced. Needs a key with a GPU daily limit.

FieldTypeRequiredWhat it is
quote_idstringYesFrom POST /quotes, within 60 seconds
ssh_keystringYesYour SSH public key, one line. See SSH keys
appstringNopytorch (the default), jupyter, comfyui, ollama or stable-diffusion. See Apps
ttl_hoursnumberNoHours until it stops by itself: 1 to 168, 24 by default
databooleanNoMount /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

201
{
  "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
  }
}
FieldWhat it means
statusstarting, running, paused (billing paused: no check passed for 10 minutes), stopping, ended or failed (never billed)
ssh, tunnelHow to connect, once running. null before
node_accessFor a cluster: each node's rank, ssh and private_ip
cost_usd, billed_secondsWhat it has cost so far, and the seconds billed
ends_atWhen it stops by itself; null for one started on the site
end_reasonWhy it ended. See below
price_riseA coming price change: the new per_hour_usd and at when it applies

Why a rental ended

end_reasonMeaning
renter_stopYou or your key stopped it
balance_emptyYour balance ran out
spend_capA daily limit was reached
ended_on_timettl_hours ran out
preemptedAn interruptible machine was taken back
stopped_by_hostThe machine stopped on its host's side
key_revokedThe key that started it was revoked
pausedNew machines were paused for safety
policyIt broke our Terms
canceledIt was cancelled before it started
start_failedIt failed to start. Never billed

List rentals

GET/api/v1/rentalsNeeds an API key

Your rentals, newest first, in data. Add ?status=active for those still going, and limit (1 to 200, 50 by default).

One rental

GET/api/v1/rentals/{id}Needs an API key

Answers { "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

POST/api/v1/rentals/{id}/stopNeeds an API key

Billing 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

POST/api/v1/rentals/{id}/extendNeeds an API key

Adds 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.

Body
{ "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

CodeStatusWhat to do
read_only_key403Give the key a GPU daily limit on API keys
expired, price_moved, quote_used409Get a new quote and start again
balance_short402Top up, then start again
machine_unavailable409Someone else rented it first. List again
agent_cap429The key runs 4 machines or 1 cluster already. Stop one first
key_daily_limit429Wait for the next UTC day, or raise the limit
data_unavailable, data_in_use409See Keep files with /data

All codes: Errors.