Most cloud APIs assume a person: a signup form, a card, an API key pasted into a config file. An agent that needs a machine for an hour has none of those. It has a wallet.
Agentgates sells confidential VMs (Intel TDX) by the hour to exactly that buyer. There is no account. The wallet that pays owns the machine, reads its state, renews it and destroys it.
The 402 is the quote
Ask for a machine with no payment and the API answers 402 Payment Required with the exact price on every network it accepts. Asking is free and repeatable: nothing runs and nothing is charged.
curl -s -X POST https://api.agentgates.ai/api/compute/deployments \ -H 'content-type: application/json' \ -d '{"plan":"compute.starter","hours":1,"image":"nginx:alpine"}' | jq -r '.accepts[] | "\(.network): \((.maxAmountRequired | tonumber) / 1000000) USDC"' Each entry of accepts is one network's own offer: the amount in USDC atomic units, the token contract and the address to pay. The plans and their live prices are in GET /api/compute/catalog.
Pay that amount, send the same request again
Sign the amount (an EIP-3009 transfer authorization on Base or Polygon, a transfer on Solana) and resend the same request with the payment attached. The official x402 v2 client does both steps:
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch'; import { ExactEvmScheme } from '@x402/evm'; import { privateKeyToAccount } from 'viem/accounts'; const pay = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(privateKeyToAccount(process.env.EVM_PRIVATE_KEY)) }], }); const res = await pay('https://api.agentgates.ai/api/compute/deployments', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ plan: 'compute.starter', hours: 1, image: 'nginx:alpine', port: 80 }), }); console.log(await res.json()); // { deploymentId, status: "provisioning", ... } Settlement confirms on chain, the machine provisions, and the billed clock starts when it reads running, not at payment. A wallet that cannot cover the amount is refused before anything moves: the answer says how much it needs and how much it holds.
The full example, which prints the price and pays only with --yes, is in the repo.
Why confidential
The machine's memory and disk are encrypted by the processor, and every machine carries a remote-attestation quote with a public proof page, so you can check the hardware before you hand it a secret. Environment values you send are sealed to the machine and never stored.
Keep it running
Watch expiresAt and renew with POST /api/compute/deployments/{id}/renew and {"hours": 1}, paid the same way. Renewals stack on the end of the clock, so an agent can keep a machine alive an hour at a time.
For agents
- The contract, written for software:
/api/compute/docs - An MCP server with no sign-in that lists plans and prices a machine:
https://mcp.agentgates.ai/compute - Skills for coding agents:
npx skills add agentgates-ai/agentgates - Every price, read live: agentgates.ai/pricing


