Budgets and receipts
A rental budget is a spending cap, not a promise that the entire amount will be charged. The service holds funded budget, meters accepted runtime after verified readiness, and reports the resulting charge through billing and a receipt.
Use integer money values
Section titled “Use integer money values”USDC and USDT amounts use decimal strings of micro-units in the API:
"1000000" = 1 unit of the selected stablecoin"2500000" = 2.5 unitsUse BigInt or a decimal library for calculations. Do not convert monetary strings to binary floating-point numbers and send rounded results back to the API. Keep the chosen asset with every amount.
Read balances by purpose
Section titled “Read balances by purpose”| Balance | Meaning for your workflow |
|---|---|
spendable_micro | Credit available to fund new work |
held_micro / active_hold_micro | Credit held by live rentals; these describe the same live-job hold |
pending_micro | Pending transfer or withdrawal amounts, not new spending capacity |
confirming_micro | Credit still subject to finality restrictions |
disputed_micro | Amount under an open dispute hold |
withdrawable_micro | Credit currently eligible for withdrawal checks |
Read the service’s current balances rather than maintaining a competing client-side ledger.
Review rate, cap, and fee
Section titled “Review rate, cap, and fee”machine_rate_micro_per_hour is the rate for the whole machine. A quote reports estimated_total_micro, budget_micro, and platform_fee_bps. The current published platform fee is 10%, included in the listed charge rather than added on top; the quote freezes the actual applicable basis points.
The funded budget caps the rental’s charge. An explicit budget extension is a new authorization that adds funds; a client must not silently extend because a task ran longer than expected. Metering begins at verified readiness. Use the receipt for the actual accepted runtime and fee split.
Read the receipt
Section titled “Read the receipt”After stopping, request GET /api/v1/billing/receipts/{job_id}. Important fields include accepted_runtime_ms, charge_micro, fee_micro, host_micro, funded_budget_micro, platform_fee_bps, and journal entries.
Compare the receipt to the rental ID and chosen asset. Keep a redacted record for your task accounting. If the result is unexpected, use support with the rental and request IDs; do not publish account credentials or a full unredacted access response.
Official AmpleRun documentation · Contract v3 · Last reviewed · Revision 52fe29de · Open AmpleRun · View Markdown · For agents