DEV Community

publicrecords
publicrecords

Posted on Edited on

Pay-per-call APIs for agents, no API key (MPP on Tempo)

Agents are pretty good at calling HTTP APIs. They are still bad at signing up, storing keys, and waiting on billing accounts. The Machine Payments Protocol (MPP) is a straightforward answer to that: the server answers unpaid calls with HTTP 402, the client pays the challenge in-line (we settle on Tempo in USDC.e or pathUSD), and the request completes. Invalid input is refused and is not charged.

I operate a fleet of these APIs for jobs agents actually pay for today — document conversion, web extraction, chain and wallet utilities, a cheap AI layer, and research data — plus a control-plane snapshot API that also accepts x402 on Base.

What you get

Collection What it does Start here
Doc Tools PDF, Office, OCR, speech-to-text, voice memo, meeting notes docs
Web & Data Scrape, extract, SEC, weather, FX docs
Utility Tools Tempo chain, attestation, QR, DNS, email, IP, geo, timezone, tech detect, math docs
AI Tools Chat, translation, embeddings, rerank docs
Browser Headless Chrome screenshots, JS render, page to PDF docs
Research Papers, FDA drugs, recalls, clinical trials, LEI docs
EVM Decoder Calldata and event logs, selectors, verified ABIs, any chain, no RPC docs
Speech-to-text Deepgram-compatible /deepgram/transcribe and /v1/listen at $0.008 docs
Control-plane Who controls this contract? (MPP + x402) docs

Prices are fixed and listed on each route, typically $0.0005–$0.05 per successful call. There is no account and no API key.

Call one in 30 seconds

The official CLI pays the 402 for you:

npx mppx https://mpp-tools.fmf-x402.workers.dev/mpp/dns/lookup \
  -X POST -H 'content-type: application/json' \
  -d '{"domain":"mpp.dev"}'
Enter fullscreen mode Exit fullscreen mode

TypeScript (mppx) makes global fetch handle 402 after you create a client:

import { Mppx, tempo } from 'mppx/client'
import { privateKeyToAccount } from 'viem/accounts'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount(process.env.TEMPO_PRIVATE_KEY) })],
})

const res = await fetch('https://mpp-tools.fmf-x402.workers.dev/mpp/dns/lookup', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ domain: 'mpp.dev' }),
})
console.log(await res.json())
Enter fullscreen mode Exit fullscreen mode

Python (pympp):

import asyncio
from mpp.client import Mpp
from mpp.methods.tempo import TempoAccount
from mpp.methods.tempo import client as tempo

account = TempoAccount.from_key("0x...")

async def main():
    async with Mpp(methods=[tempo.charge(account=account)]) as mpp:
        response = await mpp.fetch(
            "https://mpp-tools.fmf-x402.workers.dev/mpp/dns/lookup",
            method="POST",
            json={"domain": "mpp.dev"},
        )
        print(await response.json())

asyncio.run(main())
Enter fullscreen mode Exit fullscreen mode

An unpaid curl is a safe way to inspect the 402 — you are not charged:

curl -i -X POST https://mpp-tools.fmf-x402.workers.dev/mpp/dns/lookup \
  -H 'content-type: application/json' \
  -d '{"domain":"mpp.dev"}'
Enter fullscreen mode Exit fullscreen mode

Each origin also has llms.txt, openapi.json, and a Streamable HTTP MCP server at /mcp. Copy-paste configs are on the docs pages above.

What this is not

These are not a general web-search API, a live crypto price feed, or a live stock quote API. Those categories are crowded and, in our case, blocked by upstream licences that do not allow resale. We also do not store session transcripts from the attestation tool: you get a signed, timestamped, tamper-evident receipt and we keep nothing.

Disclosure: I build and operate these APIs.

Top comments (0)