For agents
A priced interface, readable and payable by software.
Endpoints
What is reachable.
| Method | Path | Price | Returns |
|---|---|---|---|
| GET | /api/v1 | Free | Index. What exists, what it costs, how to pay. |
| GET | /api/v1/catalog | Free | Tool catalogue with development status. |
| GET | /api/v1/pricing | Free | Plans, usage rates and accepted chains. |
| GET | /.well-known/x402 | Free | Payment requirements, without walking into a 402 first. |
| POST | /api/v1/demo | $0.01 | Exercises the payment rail end to end. |
Protocol
How payment works.
01
Request without payment
The endpoint answers 402 with an `accepts` array: network, asset, amount in atomic units, recipient, and the EIP-712 domain to sign against.
02
Sign an authorisation
The caller signs an EIP-3009 `transferWithAuthorization` for the stated amount. Signing costs no gas and moves nothing on its own.
03
Retry with X-PAYMENT
The signed payload goes back base64-encoded in the `X-PAYMENT` header.
04
Verification, then work
A facilitator checks the signature and the caller's balance before the handler runs.
05
Settlement after success
Only a successful response is settled onchain. A request that fails is never charged. The transaction is returned in `X-PAYMENT-RESPONSE`.
Example
# 1. Ask what it costs
curl -s -X POST https://psri.ai/api/v1/demo -d '{}'
# → 402 Payment Required
# {
# "x402Version": 1,
# "error": "invalid_payment",
# "accepts": [{
# "scheme": "exact",
# "network": "base-sepolia",
# "maxAmountRequired": "10000",
# "payTo": "0x707ba88e6428f0CFb7cf37C46FdA1ba6775469c7",
# "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
# }]
# }
# 2. In practice, a client library signs and retries for you:
# npm install x402-fetch viemChains
Why agent payments settle on Base only.
- Bitcoincannot carry x402
- Suited to subscription payments, where a single settlement per month absorbs the fee and confirmation time. Not suited to per-use billing, and x402 cannot operate here at all: the protocol depends on EIP-3009 signed authorisations, which require smart contracts.
- Ethereumcannot carry x402
- Suited to subscription payments. Mainnet gas makes per-call billing uneconomic — a settlement can cost more than the call it pays for — and x402 does not list Ethereum mainnet among its supported networks.
- Basex402
- The settlement layer for everything usage-based. Fees are low enough that a single API call can carry its own payment, which is what makes agent-driven pay-per-use viable at all.
- Solanacapable, not enabled
- Accepted for subscription payments. x402 does support Solana, so agent payments could settle here too — PSRI keeps them on a single chain for now, because one settlement path is one path to get right.
Contact
Building an agent that would use this?
What an agent needs from a safety data source is not obvious, and guessing it would waste everyone’s time. If you are building something that would consume this, the interface can still be shaped around it.
support@psri.ai