Skip to content
1 minute readNewAgent-ready

Agents in a browser can pay per call

An agent running in a web page can now read the price of a call and pay it with its wallet, with no account and no key.

An agent running in a browser could not pay per call: the browser blocked the payment header and hid the payment terms from the page.

  • POST /api/compute/price answers the browser's preflight from any site and allows X-PAYMENT, PAYMENT-SIGNATURE and Idempotency-Key.
  • The 402 terms (PAYMENT-REQUIRED) and the receipt (PAYMENT-RESPONSE, X-PAYMENT-RESPONSE) are readable from the page.
  • Keys and sign-in cookies are never accepted this way, so only the agent's own payment can be sent.