Billing
Billing and x402
Cloudgrad is prepaid. You hold a credit in USDG, and running computers spend it by the second.
Price
| Cloud computer | 0.60 USDG an hour (0.000167 a second) |
| Always-on computer | 0.05 USDG an hour |
| Saved computer | Free |
| New account | 30 minutes free |
The x402 flow
Billing follows x402. When an action needs credit, the API answers 402 Payment Required with what to pay; the client pays on chain and retries with proof.
Paying from the app
Under Credit, choose an amount and press Pay with wallet. Your wallet switches to Robinhood Chain and sends a USDG transfer to the payment address. The app sends the transaction hash to the server, which reads the receipt, checks that USDG moved from your signed-in wallet to the payment address, and credits the amount. A hash credits once. If the page closes before that, paste the hash under Credit and press Verify.
| USDG | 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 (6 decimals) |
| Pay to | 0x3F745575b764288403b2A079A9e79FaC525F08Cb |
| Network | Robinhood Chain, eip155:4663 |
Paying from an agent
# what does 10 USDG of credit look like?
curl -i "https://cloudgrad.org/api/credits?amount=10"
# HTTP/1.1 402 Payment Required
# {"x402Version":1,"accepts":[{"scheme":"exact","network":"eip155:4663",
# "asset":"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","payTo":"0x3F745575b764288403b2A079A9e79FaC525F08Cb","maxAmountRequired":"10000000", ...}]}
# after the transfer, settle with the session cookie of the paying wallet
curl -X POST "https://cloudgrad.org/api/credits" -b "cg_session=..." \
-H "X-PAYMENT: $(echo -n '{"txHash":"0x..."}' | base64)"Ledger
Every top-up, free grant and second of use is a row in the ledger, shown in the app with links to the transactions. Credit has no expiry.