Docs / buying with x402

Buying from AIPayGen with x402

Everything an agent or a reviewer needs to pay for a call, check the receipt, and recover if something goes wrong.

This page is about AIPayGen's own tools. Buying a page from a site that charges AI crawlers works differently (no replay, a delivery check): see for AI companies.

What you pay, where, and to whom

Paid endpointsGET or POST https://aipaygen.com/v1/{tool} for 86 paid tools. Example: POST https://aipaygen.com/v1/dns_lookup with {"domain":"example.com"}, $0.001 a call.
PricesFixed per tool, in USD. Each tool's price is in its 402 quote, in /v1/tools, and in x-payment-info in openapi.json.
Network and assetBase mainnet (eip155:8453), USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, 6 decimals
Pay to0xebA22e8CD05Cb72A2F913099D6cCA666DD6D35B0
Schemex402 v2, exact (USDC transferWithAuthorization)
Facilitatorhttps://api.cdp.coinbase.com/platform/v2/x402 (verifies and settles every payment; also listed in /.well-known/x402)
Free callsEvery caller gets 3 free calls a day on tools priced $0.005 or less. To skip them and always pay, send X-AIPayGen-Free: off.
Official X profile@aipaygen

The flow

  1. Call the tool. Unpaid, you get 402 Payment Required with a PAYMENT-REQUIRED header (base64 JSON quote: price, asset, network, pay-to).
  2. Sign the quote with any x402 client and resend the same request with the PAYMENT-SIGNATURE header.
  3. We verify the payment, run the tool, and only if it succeeds settle the payment, then return the result.
Code2 lines
curl -i -X POST https://aipaygen.com/v1/dns_lookup -H "content-type: application/json" \
  -H "X-AIPayGen-Free: off" -d '{"domain":"example.com"}'     # 402 + PAYMENT-REQUIRED

Your receipt

See it working: our live agent buys three calls this way twice a day and lists every receipt (an operator test, labeled as one).

When something goes wrong

The tool failsThe payment is not settled, so you are not charged. Retry with the same signed payment.
Settlement failsYou get a 402 again and no result; nothing is charged. Retry with the same payment or a new one.
You paid but the response was lostResend the exact same request with the same PAYMENT-SIGNATURE within an hour. You get the same result and receipt again (receipt.replay: true) with no new charge.
The same payment sent twice at onceOnly one runs and settles; the other is refused (409 PAYMENT_ALREADY_USED) and costs nothing.
Anything elseEmail hello@aipaygen.com with the transaction hash.

Never share your private keys. A signed payment is single-use and only pays the quoted amount to the quoted address.