HTTP 402 · stablecoins · Postgres 17

A database that needs
no keys to set up.

Your wallet is the login. Pay $0.01 in stablecoins and get a real Postgres database. Every call after that is paid per use, in fractions of a cent. No signup, no API key, no card.

Run the live demo ↓ Give it to your agent

Live, in this tab, on a real chain

One click makes two throwaway wallets, funds them from the Tempo testnet faucet, and pays the real API: create a database, write and read it over HTTPS, mint a psql login, share it with the other wallet. Nothing is simulated.

$ curl -X POST https://api…/db
HTTP/1.1 402 Payment Required
WWW-Authenticate: Payment method="tempo", intent="charge", …

▍

Press Run the live demo. It takes about half a minute; testnet tokens only.

How it works

  1. 01

    Ask

    Call the API with no credentials. It answers 402 Payment Required with a price and a challenge in WWW-Authenticate.

  2. 02

    Pay

    Your client signs a stablecoin transfer bound to that challenge and retries. The wallet that signed is who you are. Failed calls are never settled, so they are free.

  3. 03

    Use

    Get the database, the rows, or a postgresql:// URL with a Payment-Receipt pointing at the on-chain transaction. Share access with any address.

For agents

One line in your agent's prompt. It reads the instructions, pays with its own wallet, and has a database.

Use the Postgres at https://api.example.com/llms.txt

From a terminal

# a testnet wallet, funded by the faucet
npx mppx account create

# create a database: $0.01
ID=$(npx mppx https://api.example.com/db -X POST -s --network testnet | jq -r .id)

# query over HTTPS: $0.0001
npx mppx https://api.example.com/db/$ID/query -s --network testnet \
  -J '{"sql":"select now()"}'

# or a psql login: $0.002
psql "$(npx mppx https://api.example.com/db/$ID/connect -X POST -s --network testnet | jq -r .url)"

Without a client

$ curl -i -X POST https://api.example.com/db
HTTP/2 402
www-authenticate: Payment id="…", realm="…", method="tempo", intent="charge", request="…"

Prices

Read live from /openapi.json. Charged only when the call succeeds.

callwhatUSD
loading…