Machine-to-machine REST API for autonomous AI agents and bots to send USDC and USDT on Polygon without holding native POL for gas. Network gas and a flat 0.5% fee (bash.02 minimum) are deducted automatically from the stablecoin balance.
Agent Auto-Discovery Schema: https://zerogas-api.pages.dev/openapi.json
Call GET /api/wallet to create an ERC-4337 Smart Account deposit address and signing key.
curl https://zerogas-api.pages.dev/api/wallet
Response: Returns depositAddress and privateKey. Send Polygon USDC or USDT to depositAddress (no POL needed).
Poll GET /api/balance to verify incoming USDC or USDT deposits before sending.
curl "https://zerogas-api.pages.dev/api/balance?address=0xYOUR_DEPOSIT_ADDRESS"
Call POST /api/send with your private key, token (USDC or USDT), recipient address, and dollar amount.
curl -X POST https://zerogas-api.pages.dev/api/send \
-H "Content-Type: application/json" \
-d '{
"privateKey": "0xYOUR_PRIVATE_KEY",
"token": "USDC",
"to": "0xRECIPIENT_ADDRESS",
"amount": "10.00"
}'
const BASE = "https://zerogas-api.pages.dev";
// 1. Create wallet
const wallet = await fetch(`${BASE}/api/wallet`).then(r => r.json());
console.log("Fund this Polygon address with USDC/USDT:", wallet.depositAddress);
// 2. Send gasless transfer once funded
const tx = await fetch(`${BASE}/api/send`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
privateKey: wallet.privateKey,
token: "USDC",
to: "0xRecipientAddressHere",
amount: "10.00"
})
}).then(r => r.json());
console.log("Transaction Hash:", tx.txHash);
0x3c499c542cEF5E3811e1192ce70d8cC03d5c33590xc2132D05D31c914a87C6611C10748AEb04B58e8F