Rent a GPU by API
Search offers by API or MCP. If a GPU is bookable, review a quote and use a capped agent key to book a rental or submit a job.
Last inventory check
The last inventory check found no bookable GPU offers. See who can sign up and pay.
Check the live public offer feed. No API key is needed. Look for bookable: true. A fresh quote confirms whether the offer is still available.
From offer to receipt
Use https://prod-api.x9si.com. Find a bookable offer before adding funds, whether it comes from X9 or another provider. Create a renter account and a capped API key. For a direct X9 offer, you can review the quote before adding funds and then fund the booking. A resale quote can require eligible wallet funds before X9 issues it.
- Search
GET /v1/offers?source=alland choose an offer markedbookable. - Call
POST /v1/quoteswith the offer ID, image and maximum runtime. For metered resale, set a positiveextras_cap_usd. Check the compute price and any transfer hold. - Call
POST /v1/instanceswith the quote ID. Stop the rental when done. CheckGET /v1/resources/{id}until the rental has ended and transfer has settled, then readGET /v1/receipts/{id}for the final receipt.
See the six calls and the API reference.
Set X9_API_URL to the base URL of your X9 API, without a trailing slash. Use the production API at https://prod-api.x9si.com. Run in Bash with curl and jq.
Offer search needs no X9 key. Quote, rent, stop and receipt send Authorization: Bearer with your capped X9_API_KEY. JSON writes send Content-Type: application/json and an Idempotency-Key. Set and save a unique X9_RUN_ID before you start, such as one from uuidgen.
The example searches for a consumer GPU with at least 16 GB of memory. It does not estimate the memory your model needs. It searches bookable offers from X9 hosts only and follows next_cursor until it finds a match or runs out of pages. For resold GPUs, review the transfer hold in the first rental guide.
This example can automatically book a live rental. Make sure your wallet has enough credit for the hold. It sets a $0.99 cap and requests a stop right away. You may still be charged for billable time before the stop.
Save the run ID and original quote ID. If booking times out, retry only the booking request with the same quote ID, API key and idempotency key. If the stop fails, retry it for the same rental with the original stop key. Confirm the rental ended and any transfer settlement finished before treating the receipt as final.
#!/usr/bin/env bash
set -euo pipefail
: "${X9_API_URL:?Set X9_API_URL to your X9 endpoint}"
: "${X9_API_KEY:?Set X9_API_KEY to the capped renter key}"
K=(-H "Authorization: Bearer $X9_API_KEY")
: "${X9_RUN_ID:?Set and save a unique ID for this rental attempt}"
page=()
while true; do
offers=$(curl -fsS -G "$X9_API_URL/v1/offers" "${page[@]}" \
--data-urlencode 'source=x9' --data-urlencode 'gpu_class=consumer' \
--data-urlencode "min_vram_gb=16" --data-urlencode 'max_price_hr=0.99' \
--data-urlencode 'sort=price')
offer_id=$(jq -r 'first(.offers[] | select(.bookable and .gpu_count == 1)
| .offer_id) // ""' <<< "$offers")
if [[ -n "$offer_id" ]]; then break; fi
cursor=$(jq -r '.next_cursor // ""' <<< "$offers")
if [[ -z "$cursor" ]]; then
echo 'No matching bookable single GPU. No rental was made.' >&2
exit 1
fi
page=(--data-urlencode "cursor=$cursor")
done
quote_body=$(jq -nc --arg id "$offer_id" \
'{offer_id:$id,image:"ubuntu:24.04",max_runtime_s:3600,max_spend_usd:"0.99"}')
quote=$(curl -fsS "${K[@]}" "$X9_API_URL/v1/quotes" \
-H 'Content-Type: application/json' -H "Idempotency-Key: $X9_RUN_ID-quote" \
-d "$quote_body")
jq '{quote_id,price_hr_all_in,worst_case_usd,expires_in_s}' <<< "$quote"
quote_id=$(jq -er 'select((.worst_case_usd | tonumber) <= 0.99) | .quote_id' <<< "$quote")
printf 'Quote ID %s\n' "$quote_id" >&2
rental_body=$(jq -nc --arg id "$quote_id" '{quote_id:$id}')
rental=$(curl -fsS "${K[@]}" "$X9_API_URL/v1/instances" \
-H 'Content-Type: application/json' -H "Idempotency-Key: $X9_RUN_ID-rent" \
-d "$rental_body")
resource_id=$(jq -er '.resource_id' <<< "$rental")
printf 'Rental ID %s\n' "$resource_id"
# This example stops right away. Save files before stopping a real workload.
curl -fsS "${K[@]}" "$X9_API_URL/v1/resources/$resource_id/actions" \
-H 'Content-Type: application/json' -H "Idempotency-Key: $X9_RUN_ID-stop" \
-d '{"action":"stop"}' | jq '{status,final_cost_usd,settlement_pending}'
# Allow up to a minute here. If settlement takes longer, keep polling this resource.
for (( check=0; check<5; check++ )); do
resource=$(curl -fsS "${K[@]}" "$X9_API_URL/v1/resources/$resource_id")
if jq -e '(.status == "stopped" or .status == "failed" or .status == "host_lost"
or .status == "succeeded" or .status == "cancelled")
and (.settlement_pending != true)' <<< "$resource" > /dev/null; then
break
fi
if (( check == 4 )); then
echo "No final receipt yet. Check GET /v1/resources/$resource_id again before reading the final receipt." >&2
exit 1
fi
sleep "$(jq -r '.poll_after_s // 15' <<< "$resource")"
done
curl -fsS "${K[@]}" "$X9_API_URL/v1/receipts/$resource_id" \
| jq -e 'select(.extras == null or .extras.settled == true)
| {resource_id,status,price_hr,total_usd,line_items,extras}'
Illustrative receipt for a rental stopped before it became ready. The amounts are examples, not current prices.
{
"resource_id": "rnt_[redacted]",
"status": "stopped",
"price_hr": "0.600000",
"total_usd": "0.000000",
"line_items": []
}Need a key first? Start with renter signup in the first rental walkthrough. See X9 pricing and fees or compare Vast.ai, Runpod and Lium.
The spend cap
Create a capped renter key with POST /v1/keys. X9 checks the applicable limits before booking. The agent cannot raise them.
| Cap | Meaning |
|---|---|
lifetime_usd | Lifetime cap on charges and outstanding holds. USD as a decimal string with up to six places. See the operation for any narrower amount rules. |
hourly_usd | Cap on holds placed in the last 60 minutes, even if released. USD as a decimal string with up to six places. See the operation for any narrower amount rules. |
max_gpu_class | Highest GPU class this key may quote or book: consumer < workstation < datacenter (unknown models count as datacenter). |
expires_at | Future RFC 3339 timestamp with timezone. Expiry stops the key, not a running rental. Use another spending key on the same account if needed to stop it. |
- A rental quote is free and shows the maximum hold. It lasts up to 120 seconds, but a provider price increase can invalidate an unexpired resale quote.
- Unused compute funds are released when the rental ends. A resale transfer hold ends at settlement or at the resale transfer deadline, whichever comes first.
- Where the API requires an
Idempotency-Key, use it again with the same arguments and account key when retrying the same request.
Vast.ai market prices for comparison
Median hourly compute per GPU among Vast.ai listings sampled on 19 Nov 2026. These are not X9 prices.
| GPU | Vast median per GPU hour | Middle half of listings | Listings (GPUs) |
|---|---|---|---|
| RTX 3090 | $0.201 | $0.168 to $0.231 | 64 (98) |
| RTX 4090 | $0.480 | $0.467 to $0.587 | 60 (212) |
| RTX 5090 | $0.600 | $0.507 to $0.697 | 64 (94) |
| A100 80GB SXM | $1.173 | $1.005 to $1.508 | 26 (66) |
| A100 80GB PCIe | $0.867 | $0.867 to $0.867 | 9 (16) |
| H100 SXM | $2.333 | $1.733 to $3.333 | 15 (30) |
| H100 PCIe | $2.558 | $2.533 to $2.800 | 6 (7) |
| H100 NVL | $3.400 | $3.092 to $3.413 | 7 (8) |
Source: Vast.ai public search API, on demand listings, verified and unverified, price per GPU hour without storage or bandwidth, sampled on 19 Nov 2026. This sample returned 64 listings for each of RTX 3090 and RTX 5090 and may be incomplete. Prices may have changed.
For each model, see estimated host earnings and memory for model weights: GPU pages.
The X9 quote includes the platform fee. Some resold offers also charge for transfer. See the terms for pricing.
When compute is billed
- If the machine never becomes ready, there is no compute charge. Once it becomes ready, X9 bills from when it first saw the machine running.
- Startup and downloads before X9 first sees the machine running are free. An X9 service or tunnel outage does not reduce the opening charge once the machine becomes ready.
- After readiness, X9 usually leaves detected downtime off the bill. On resold machines, some monitoring gaps can still be billed. See Terms sections 4.3, 4.5 and 4.12 for the full conditions.
- GET /v1/receipts/{id} shows charges, totals, the end reason and a timeline of recorded compute charges and interruptions. The timeline may omit unrecorded time. See the billing rules for when interruptions on resold machines can still be billed.
Questions renters ask
Can my agent rent a GPU on X9 today?
The last inventory check found no bookable GPU offers. If a matching offer is bookable, request a quote before booking.
How does the spend cap work?
Set a lifetime spending limit, an hourly limit, a maximum GPU class and an expiry for the agent key. X9 checks the applicable limits before booking. The agent cannot raise them.
What will a GPU cost on X9?
GPU pages show prices from the latest inventory check when available. Request a fresh quote to confirm hourly compute and any transfer charges.
What if the GPU breaks during a rental?
After readiness, X9 usually leaves detected downtime off the bill. On resold machines, some monitoring gaps can still be billed. See https://x9si.com/rules/#refunds for the conditions.
Can I leave?
Yes. X9 does not charge an exit fee or require exclusivity. See the rules for account closure, exports and refunds of eligible unused credit.