GridPup API
GridPup's price data, for your own scripts, dashboards and apps: every GPU model, every offer and the price history across clouds, read from each cloud's own API every 15 minutes. Free, with an API key.
Quick start
- Create a key (log in first). Copy it: it is shown once.
- Send it with every request:
curl -H "Authorization: Bearer $GRIDPUP_API_KEY" \ "https://api.gridpup.com/v1/gpus?sort=cheapest"
Python:
import os, requests
r = requests.get(
"https://api.gridpup.com/v1/gpus/nvidia-h100/offers",
params={"in_stock": "true", "sort": "price", "limit": 5},
headers={"Authorization": f"Bearer {os.environ['GRIDPUP_API_KEY']}"},
)
for o in r.json()["items"]:
print(o["provider"], o["usd_per_gpu_hour"], o["stock_state"])Endpoints
All are GET on https://api.gridpup.com. The full reference, with every field and a way to try calls in the browser, is at api.gridpup.com/docs (OpenAPI: openapi.json).
| Endpoint | Returns | Main parameters |
|---|---|---|
/v1/gpus | Every GPU model with its lowest and typical price, clouds and stock. | sort, rentable, class, provider, gpus, vram, max_price, in_stock, verified |
/v1/gpus/{gpu_id} | One GPU: specs and price summary per cloud. | — |
/v1/gpus/{gpu_id}/offers | Every offer for one GPU across clouds. | sort, limit, offset, and the filters above |
/v1/gpus/{gpu_id}/history | Price history: typical price, cheapest-to-90th-percentile band, each cloud. | range (24h, 7d, 30d, 90d, 1y), provider, gpus, verified |
/v1/offers | Search offers across all GPUs and clouds. | gpu, sort, limit, offset, and the filters above |
/v1/clouds | The clouds we collect from, and when each was last read. | — |
/v1/health | Service status (no key needed). | — |
GPU ids are the ones in our page addresses, e.g. nvidia-h100 for gridpup.com/gpus/nvidia-h100. Lists of offers are paged with limit (up to 500) and offset.
Prices
- US dollars.
usd_per_gpu_houris per GPU;usd_total_houris the whole offer (all its GPUs). - On-demand prices by default; spot and reserved where a cloud offers them (
billingfilter). launchable: truemarks offers you can launch through GridPup right now.last_collected_atsays how fresh the data is. Clouds change prices and stock often; check before you rely on a number.
Limits and errors
- 60 requests a minute per key. Every response has
X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Reset(seconds). Over the limit you get429withRetry-After. - Data changes every 15 minutes, so polling faster than that gains nothing. Responses can be cached for 60 s.
- Errors are JSON:
{"error": {"code": "unauthorized", "message": "…"}}. Codes:401missing, invalid, revoked or expired key;403key lacks access;404unknown GPU;422bad parameter;429rate limit.
Keys
- Up to 10 keys per account. Optional expiry. Revoke any key at any time; it stops working at once.
- We store only a fingerprint of each key and email you when one is created.
- Keep keys out of public code and browser pages: anyone with your key can use your rate limit.
Using the data
The API is free for your own projects and products. If you publish prices from it, credit “Prices from GridPup” with a link to gridpup.com. Don't resell the data or republish it in bulk. We may limit or revoke keys that are abused. See the terms.
Machines
Accounts that can rent GPUs on GridPup can also launch and manage machines through the API, paid from the same prepaid balance and under the same rules as the website. Create a key with Launch and manage machines access. Every such key has two limits you choose: the most dollars an hour of machines it may run at once, and the most machines.
| Endpoint | Does | Access |
|---|---|---|
GET /v1/templates | What a machine can start with (Ubuntu, PyTorch, ...), per cloud. | machines:read |
GET /v1/offers/{offer_id}/quote | Live check of one offer: free now? exact prices, disk range, templates. | machines:read |
POST /v1/machines | Launch a machine. Needs an Idempotency-Key header. | machines:write |
GET /v1/machines | Your machines (status=active or ended; label=… for one label). | machines:read |
PATCH /v1/machines/{id} | Set or clear the machine's label. | machines:write |
GET /v1/machines/{id} | One machine, checked with the cloud now, with SSH details while it runs. | machines:read |
POST /v1/machines/{id}/reboot | Reboot (where the cloud supports it; see can.reboot). | machines:write |
DELETE /v1/machines/{id} | Terminate. The machine and its disks are deleted. | machines:write |
GET / POST /v1/ssh-keys | Your saved SSH keys; add one. | machines:read / write |
GET /v1/balance | Credit: added, billed, running estimate, available. | billing:read |
Find an offer, check it, launch, wait for it to run, connect, terminate:
H="Authorization: Bearer $GRIDPUP_API_KEY"
# 1. the cheapest RTX 4090 you can launch, in stock
curl -s -H "$H" "https://api.gridpup.com/v1/gpus/nvidia-rtx-4090/offers?in_stock=true&sort=price&limit=20" | jq -r '[.items[] | select(.launchable)][0].id' # e.g. vast:12345|on_demand
# 2. live check: free now? exact price, disk range, templates
curl -s -H "$H" "https://api.gridpup.com/v1/offers/vast:12345%7Con_demand/quote"
# 3. launch (the Idempotency-Key makes a retry safe: it never starts a second machine)
curl -s -H "$H" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" -d '{"offer": "vast:12345|on_demand", "template": "ubuntu-22.04", "disk_gb": 40,
"ssh_public_keys": ["'"$(cat ~/.ssh/id_ed25519.pub)"'"], "max_price_usd_hour": 0.50}' "https://api.gridpup.com/v1/machines"
# 4. poll until "status": "running", then use connection.ssh
curl -s -H "$H" "https://api.gridpup.com/v1/machines/i-abc123"
# 5. terminate (the machine and its disk are deleted)
curl -s -X DELETE -H "$H" "https://api.gridpup.com/v1/machines/i-abc123"Idempotency-Keyis required onPOST /v1/machines. Reuse it when you retry; a new request needs a new key.- Instead of
template, you can sendimage: any public container image, started with SSH (Vast, Runpod and GPU.ai), e.g.nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04. Offers also carryperf_score(Vast's DLPerf) andcuda_max. - Give a machine your own
labelwhen you launch it (e.g.sweep-7/arm-1), then find it withGET /v1/machines?label=sweep-7/arm-1. Labels need not be unique; change one withPATCH /v1/machines/{id}. max_price_usd_hourrefuses the launch if the price has gone up since you looked. Launching needs about an hour of the machine available in your balance. At $0 your machines are terminated, as on the website.- Launches, reboots and terminations are limited to 10 a minute per key. Poll a machine every 10 seconds or so; most are running within 1 to 5 minutes.
- Errors carry a
code:insufficient_balance(402),key_limit,price_changed,gone(409),forbidden(403),vendor_error(502; nothing was charged). - We email you the first time each key launches a machine.
AI agents (MCP)
GridPup is also an MCP server, so Claude, Cursor and other AI agents can compare GPU prices and, with a key that has machine access, launch and manage machines for you. It runs at https://api.gridpup.com/mcp (Streamable HTTP); nothing to install. Use an API key in the Authorization header: a Prices key for price questions, or a Launch and manage machines key so the agent can rent GPUs, within that key's limits.
Claude Code:
claude mcp add --transport http gridpup https://api.gridpup.com/mcp --header "Authorization: Bearer $GRIDPUP_API_KEY"
Cursor and other clients that take a URL and headers (e.g. .cursor/mcp.json):
{
"mcpServers": {
"gridpup": {
"url": "https://api.gridpup.com/mcp",
"headers": { "Authorization": "Bearer gp_live_…" }
}
}
}Claude Desktop (through mcp-remote, in claude_desktop_config.json):
{
"mcpServers": {
"gridpup": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.gridpup.com/mcp", "--header", "Authorization:Bearer ${GRIDPUP_API_KEY}"],
"env": { "GRIDPUP_API_KEY": "gp_live_…" }
}
}
}Tools:
- Prices:
find_gpus,get_gpu,find_offers,price_history. - Machines:
list_templates,quote_offer,launch_machine,list_machines,get_machine,reboot_machine,terminate_machine,get_balance.
Try: “What's the cheapest H100 I can rent right now, and how has its price moved this week?” or “Launch the cheapest RTX 4090 under $0.50/h with PyTorch and my SSH key, then give me the SSH command.” Agents are told to confirm before launching or terminating. The key's limits and your balance apply as for any API call, and a retried launch never starts a second machine.
Coming later
Webhooks (machine running, terminated, balance low). Tell us what you'd use at [email protected].