GET A QUOTE
The 402 is the quote.
Request a purchase without authentication. The response tells your agent what to pay, where to pay it, and when the quote expires.
# Base Sepolia bearer-key purchase. HTTP 402 is the quote, not a successful payment.
# Run in a private working directory. The response contains a recovery secret.
umask 077
curl -sS -X POST https://api.agentrouter.cc/v1/purchase \
-H 'Content-Type: application/json' -d '{}' \
-o quote.json -w 'HTTP %{http_code}\n'
# Expect 402 with scheme, network, asset, payTo, maxAmountRequired, resource,
# nonce, validAfter, validBefore and recoveryCapability. Stop on any other response.
# Amount is a decimal string in token base units; timestamps are JSON integers.
# recoveryCapability is a private 64-character lowercase hex string.
# Use the quote's actual amount/asset/receiver; never substitute sample payment values.
# Keep quote.json privately for signing and lost-delivery recovery. Never print it into
# an agent conversation, commit it, or place it under a served directory.