Skip to content

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.

USDC and USDT amounts use decimal strings of micro-units in the API:

"1000000" = 1 unit of the selected stablecoin
"2500000" = 2.5 units

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

BalanceMeaning for your workflow
spendable_microCredit available to fund new work
held_micro / active_hold_microCredit held by live rentals; these describe the same live-job hold
pending_microPending transfer or withdrawal amounts, not new spending capacity
confirming_microCredit still subject to finality restrictions
disputed_microAmount under an open dispute hold
withdrawable_microCredit currently eligible for withdrawal checks

Read the service’s current balances rather than maintaining a competing client-side ledger.

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.

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