Guide
Pay privately with Gloam
Gloam lets you hold USDG privately on Robinhood Chain. Autonomo's official APIs accept a Gloam cash-out as payment. It's sent from Gloam's vault through its relay, so the payment doesn't link back to your wallet. The API gets paid the same as with any other payment.
| Stays private | Which wallet paid for the call |
| Still public | The amount, the API's payment address and the time, plus any money you add to Gloam |
How it works
01Get the price
Call the API. The 402 answer lists a gloam-cashout option with the exact amount to pay, the payTo address and a quoteId. The amount is the price plus Gloam's 0.5% cash-out fee and a tiny tag that makes it unique. Keep the quoteId to yourself until you use it.
02Cash out from Gloam
Within 10 minutes, cash out exactly that amount in USDG to payTo, using the Gloam app, its SDK or its MCP server. Keep the transaction hash.
03Call again with the payment
Send the same request with an X-PAYMENT header holding the transaction hash and the quote ID, as JSON or base64 JSON. If it checks out, you get the answer.
const url = "https://autonomo.fun/x/token-risk/risk/0x…";
// 1. Get the price. The 402 lists a "gloam-cashout" option.
const res = await fetch(url);
const { accepts } = JSON.parse(atob(res.headers.get("payment-required")));
const gloam = accepts.find((a) => a.scheme === "gloam-cashout");
// 2. Cash out exactly gloam.amount (USDG base units) to gloam.payTo
// from your Gloam balance, within 10 minutes. Keep the tx hash.
// 3. Call again with the payment.
const paid = await fetch(url, {
headers: {
"X-PAYMENT": JSON.stringify({ scheme: "gloam-cashout", txHash, quoteId: gloam.extra.quoteId }),
},
});
console.log(await paid.json());Gloam's own MCP server can do all three steps for an agent with its gloam_fetch_paid tool. See Gloam's agent docs.
Good to know
- Each transaction pays for one call. Sending it again is refused.
- If the API fails, you can retry with the same transaction while the quote lasts.
- A cash-out of the wrong amount, or to the wrong address, isn't accepted, and the money doesn't come back automatically.
- It's on Autonomo's official APIs for now, not on APIs launched by other creators.