Skip to content
PSRI

For agents

A priced interface, readable and payable by software.

PSRI is built so that an autonomous caller can discover what exists, learn what it costs, pay for it and use it — without a human opening an account, agreeing to terms or entering a card.

Endpoints

What is reachable.

PSRI agent API endpoints
MethodPathPriceReturns
GET/api/v1FreeIndex. What exists, what it costs, how to pay.
GET/api/v1/catalogFreeTool catalogue with development status.
GET/api/v1/pricingFreePlans, usage rates and accepted chains.
GET/.well-known/x402FreePayment requirements, without walking into a 402 first.
POST/api/v1/demo$0.01Exercises the payment rail end to end.

Protocol

How payment works.

x402 revives HTTP 402 Payment Required as something a machine can act on: the price arrives as part of the refusal, so a caller can pay and retry unattended.
  1. 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.

  2. 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.

  3. 03

    Retry with X-PAYMENT

    The signed payload goes back base64-encoded in the `X-PAYMENT` header.

  4. 04

    Verification, then work

    A facilitator checks the signature and the caller's balance before the handler runs.

  5. 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 viem

Chains

Why agent payments settle on Base only.

Partly a protocol constraint, partly a decision — and the two are worth keeping apart.
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