AmpleRun GPU rentals
v0.1.1Find, price, rent and stop GPUs on AmpleRun.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_agent_account_challenge Start registering this agent's own AmpleRun account
Step 1 of 2. Returns an EIP-4361 (Sign-In with Ethereum) message for a wallet address this agent controls, valid five minutes, single use. Signing it accepts the AmpleRun Terms version it names. Sign the message exactly as returned with personal_sign (EIP-191), then call register_agent_account with message and signature. Never send a private key to any tool.
| Parameter | Type | Description |
|---|---|---|
address | string | The agent's wallet address (0x...). Defaults to this server's wallet when it has one. |
register_agent_account Register this agent's own AmpleRun account
Step 2 of 2. Opens an AmpleRun account for this AI agent, tagged as agent-created, with its wallet as the verified payout wallet, and returns an API key (shown once; keep it secret). The same wallet again returns the same account and a new key. There is no free credit: renting needs a deposit first. Pass message and signature from get_agent_account_challenge. scopes defaults to ["renter"]; add "host" to host machines.
| Parameter | Type | Description |
|---|---|---|
agent * | object | |
message | string | The challenge message, exactly as returned. |
scopes | array | |
signature | string | 0x-prefixed EIP-191 signature of message. |
list_templates List GPU templates
List published AmpleRun templates: pinned container images a rental runs, such as an inference server with fixed model weights or a PyTorch or Jupyter runtime. Returns each template's id, slug (template_id), name, kind, engine, minimum VRAM in bytes and minimum GPU count, plus next_cursor. Read-only; no API key needed. search_offers finds machines for a template.
| Parameter | Type | Description |
|---|---|---|
cursor | string | next_cursor from the previous page. |
gpu_vram_gib | integer | Only templates that fit on a GPU with this much VRAM, in GiB (e.g. 24). |
kind | string | model: an inference server with pinned weights; classical: a general runtime; custom: other images. |
limit | integer | Page size, 1 to 100. |
search_offers Search GPU offers
Search GPU machines that can be rented now on AmpleRun. gpu_model, gpu_count and max_rate_micro_per_hour filter on the server. min_vram_gib and region filter each fetched page here because the API has no such filters, so a page can return fewer than limit matches: scanned is how many offers were checked, and next_cursor continues. Prices are micro-units per hour for the whole machine, fee included; cheapest first. With template, each offer carries fit {fits, reason}. Read-only; no API key needed.
| Parameter | Type | Description |
|---|---|---|
cursor | string | next_cursor from the previous page. |
gpu_count | integer | Minimum number of GPUs in the machine. |
gpu_model | string | Case-insensitive part of the GPU model name, e.g. "4090" or "A100". |
limit | integer | Page size, 1 to 100. |
max_rate_micro_per_hour | string | Highest machine price per hour in micro-units, e.g. "500000" for 0.50 USDC/h. |
min_vram_gib | integer | Minimum VRAM per GPU in GiB. Offers with unmeasured VRAM are excluded. |
region | string | Case-insensitive part of the host's cloud region, e.g. "us-east". Offers without a reported region are excluded. |
template | string | Template slug such as "pytorch-cuda", or its id (UUID), from list_templates. |
get_quote Get a rental quote
Price a rental without committing: creates a free, non-binding AmpleRun quote (valid 60 seconds; nothing is reserved or charged) for a template on an offer, capped by budget_micro. Returns the quote exactly as the API sent it plus fee_split: the most the rental can cost and how that divides into the platform fee (platform_fee_bps) and the host's share. Needs AMPLERUN_API_KEY with the renter scope. create_rental quotes again when it reserves, so this step is optional.
| Parameter | Type | Description |
|---|---|---|
budget_micro * | string | Spending cap in micro-units of the asset ("1000000" = 1 USDC). The rental is never charged more than this. |
duration_limit_s * | integer | Maximum runtime in seconds (60 to 31536000), e.g. 7200 for two hours. |
offer_id * | string | offer_id from search_offers. |
template * | string | Template slug such as "pytorch-cuda", or its id (UUID), from list_templates. |
asset | string | Balance to pay from. USDC when omitted. |
create_rental Rent a GPU (spends balance)
Rent a GPU on AmpleRun: quotes the template on the offer and reserves the machine in one step, holding up to budget_micro from the account balance. budget_micro is required and is a hard cap: the rental is never charged more, and metering starts only once the machine is verified ready. Returns rental_id, state, the quote, fee_split and the idempotency_key used; retrying with the same idempotency_key never creates a second rental. get_rental reports state and access. Spends money. Write tool: refused unless the server was started with AMPLERUN_MCP_ALLOW_SPEND=1 (the default is read-only).
| Parameter | Type | Description |
|---|---|---|
budget_micro * | string | Spending cap in micro-units of the asset ("1000000" = 1 USDC). The rental is never charged more than this. |
duration_limit_s * | integer | Maximum runtime in seconds (60 to 31536000), e.g. 7200 for two hours. |
offer_id * | string | offer_id from search_offers. |
ssh_public_key * | string | One-line OpenSSH public key (the .pub file), e.g. "ssh-ed25519 AAAA... you@laptop". Installed for SSH access. |
template * | string | Template slug such as "pytorch-cuda", or its id (UUID), from list_templates. |
asset | string | Balance to pay from. USDC when omitted. |
idempotency_key | string | UUID that makes retries safe. Generated when omitted and returned in the result. |
get_rental Get rental status and access
Get one AmpleRun rental by rental_id: state, cumulative charge (micro-units), rate and funded-through time. While it is RUNNING (verified ready), and read-only for a limited window after STOPPED, also returns access: endpoints, SSH host-key fingerprint, a ready-made command and, for model templates, the endpoint's per-rental API key. Read-only. list_rentals finds rental ids.
| Parameter | Type | Description |
|---|---|---|
rental_id * | string | rental_id from create_rental or list_rentals. |
list_rentals List my rentals
List the account's AmpleRun rentals with state, charge so far (micro-units), rate and funded-through time. Ordered by id, not by time; page with next_cursor. Read-only. get_rental gives details and access for one rental.
| Parameter | Type | Description |
|---|---|---|
cursor | string | next_cursor from the previous page. |
limit | integer | Page size, 1 to 100. |
stop_rental Stop a rental
Stop an AmpleRun rental: ends the workload and its metering. Files inside the machine stay reachable read-only only for a limited retrieval window. Stopping again is harmless. Returns rental_id and the new state (STOPPING or a later state). Write tool: refused unless the server was started with AMPLERUN_MCP_ALLOW_SPEND=1 (the default is read-only).
| Parameter | Type | Description |
|---|---|---|
rental_id * | string | rental_id from create_rental or list_rentals. |
idempotency_key | string | UUID that makes retries safe. Generated when omitted. |
reason | string | Recorded with the stop. |
get_balance Get account balance
Get the AmpleRun account's USDC and USDT balances as micro-unit strings: spendable (available for new rentals), held by live rentals, pending, disputed and withdrawable, plus the last 30 days' spend. Read-only; needs AMPLERUN_API_KEY.
host_this_machine Earn with this machine's GPU
Explains how to add the GPU of the machine this agent runs on to AmpleRun, so its owner earns from rentals. Returns the one-line installer command, the steps and the earnings links. It runs nothing itself. The installer needs root, so ask the machine's owner before running it, and the owner must approve the machine from the approve_url it prints: nothing is listed without that approval.
top_up Get top-up payment instructions
Get what it takes to top up the AmpleRun USDC balance by amount_micro with x402: the payment requirements (network, USDC contract, treasury payTo, amount, EIP-712 domain). A wallet signs them as an EIP-3009 transferWithAuthorization and repeats POST /api/v1/billing/x402/top-up with the PAYMENT-SIGNATURE header (@amplerun/sdk does this with its x402 option). This server holds no wallet, so it pays nothing; an operator who configures AMPLERUN_MCP_WALLET_KEY_FILE and allows spending lets it pay.
| Parameter | Type | Description |
|---|---|---|
amount_micro * | string | Top-up amount in micro-USDC, e.g. "5000000" for 5 USDC. |