For AI agents

Native x402. An agent buys, builds, publishes and counts, with no human in the loop.

DreamWidget's API is an x402 resource server. Ask it for a plan and it answers HTTP 402 with the price in its headers; pay, repeat the request, and the same reply grants the plan and hands back the account and its API key. Everything after that is the ordinary API: make a widget, design it, add logos or video sources, publish, read the counts.

The whole flow, as an agent sees it

  1. Ask. POST https://dreamwidget.com/api/v1/plan with {"plan":"pro","term":"month","email":"agent@example.com"}. No key, no account.
  2. Get the 402. The reply is HTTP 402 with a PAYMENT-REQUIRED header, x402 version 2, and an accepts list: USDC on Base, USDC on Solana, XRP, HBAR or USDC on Hedera, each with the exact amount, asset, network and receiving address, and the facilitator's fee payer where the chain needs one.
  3. Pay and repeat. Sign the payment for the network you chose and repeat the request with it in the PAYMENT-SIGNATURE header. The server verifies and settles through that network's facilitator.
  4. Receive the plan and the key. The paid reply is {"granted":true,"plan":"pro","term":"month","until":"…","apiKey":"dw_live_…","paid":{…}}. A new email gets a new account; an existing account gets the plan.
  5. Build. With Authorization: Bearer dw_live_…: POST /api/v1/widgets, PATCH the settings, POST /logos or /sources, POST /publish, GET /stats. The published widget is one iframe on any page.

A live 402 to try right now: curl -i -X POST https://dreamwidget.com/api/v1/plan -H "Content-Type: application/json" -d '{"plan":"pro","term":"month","email":"agent@example.com"}'. Whole exchange with headers and payloads: the x402 guide. The API: the API guide and openapi.json. Discovery: /.well-known/x402 and llms.txt. Proven on every deploy by a check that pays a real quote on the XRP Ledger and Hedera test networks and watches the grant.

Questions

Does DreamWidget support x402 natively?

Yes. The API itself answers HTTP 402 Payment Required with a PAYMENT-REQUIRED header that names the price, the asset, the network and the receiving address, exactly as the x402 standard specifies. There is no sign-up form, no card and no pre-made API key in the loop: an agent pays the 402 and repeats the request with the signed payment in the PAYMENT-SIGNATURE header, and the same reply grants the plan and returns the account and its API key.

Can an AI agent use DreamWidget from start to finish without a human?

Yes. The paid reply to the 402 returns an API key. With it the agent creates a widget, sets its design, adds logos from URLs or video sources, publishes it to the CDN and reads its counts. The embed code the agent gets is one iframe that goes on any page. No human step exists anywhere in that path.

Which networks and assets does the 402 offer?

USDC on Base, USDC on Solana, XRP on the XRP Ledger, and HBAR or USDC on Hedera, at the same price as the card checkout. Base and Solana settle through Coinbase's facilitator, the XRP Ledger through t54's, Hedera through AMNT's.

Where can an agent discover the endpoint?

The manifest at https://dreamwidget.com/.well-known/x402, the OpenAPI document at https://dreamwidget.com/openapi.json, llms.txt at https://dreamwidget.com/llms.txt, and the 402 itself carries a Bazaar discovery declaration, so Coinbase's Bazaar lists it after the first settled payment.

Is x402 the only way an agent can pay?

No. An agent that already holds an API key from a human-bought plan can use the API under that key. x402 is for the agent that starts with nothing but a wallet.