Paid x402 routes

x402 API finder and Base reads

Four paid routes, each settled in USDC on Base through x402 with no account or API key. The finder returns paid x402 APIs for one task that answered a live payment challenge just now. The three Base reads return live public chain data. A call settles only when it produced a result.

Routes and prices

RoutePriceSettles only when
POST /api/x402/find-api
GET /api/x402/find-api?task=
0.005 USDCat least one live match is found
GET /api/x402/base/balances?address=0.002 USDCthe read succeeded
GET /api/x402/base/tx-check?hash=0.002 USDCthe transaction was found and mined
GET /api/x402/base/gas0.0015 USDCthe read succeeded

An unsigned request always gets the HTTP 402 challenge, whatever its input. A signed request is validated first, then its payment is verified with the facilitator, then the work runs, and only then is the payment settled. Bad input returns 400, a payment that does not verify returns 402, no live match or an unknown transaction returns 404, and an unavailable RPC returns 503, each with payment_settled: false. A signed HEAD request is refused with 405 because it has no body to deliver.

A paid result always arrives with its payment. When the facilitator settles, the result carries payment.txHash and a PAYMENT-RESPONSE header. When the settle call times out or fails without a clear answer, the transfer may still land, so the result is delivered anyway with HTTP 200 and payment.status: "unconfirmed", and Ontario logs it for reconciliation. When the facilitator refuses the settlement outright, the answer is 402 with stage: "settle" and payment_settled: false, and no result is delivered.

How the finder works

Probe User-Agent and opt-out

Finder probes to a provider's endpoint carry this User-Agent:

OntarioProtocol-x402Finder/1.0 (+https://ontarioprotocol.com/docs/x402-api-finder; unpaid probe, no payment attached)

Reads of the Coinbase catalog for Ontario's copy carry OntarioProtocol-x402FinderIndex/1.0 (+https://ontarioprotocol.com/api/x402/find-api; public catalog read); they go to Coinbase, not to providers.

Opt-out: email hello@ontarioprotocol.com with the host name. A host on the finder's opt-out list, and its subdomains, is neither probed nor returned in results.

Optional Jev re-rank and where task text goes

The re-rank is off by default, and then no task text or candidate data goes to TypeSafe. Separately, whenever the live search fallback runs, the task text is sent as a search query to Coinbase CDP Bazaar and Agentic Market. When the operator enables the re-rank, after the probes Ontario sends the task text and up to 5 live candidates' public names, endpoints and descriptions to TypeSafe (api.typesafe.ai) for a task-fit opinion, with a 4 s deadline and a daily call quota. Task text that looks like a credential, email address, private key or query-bearing URL is never sent.

Jev can move one live match to rank 1. It cannot add an endpoint or change a price, budget or network check. If Jev finds no fit and the best live match covers less than 35% of the task terms, the call returns no match and is not charged. Any Jev failure keeps the deterministic order. Each result states ranking_method (jev, deterministic or deterministic_fallback); when Jev was called, jev.disclosure reads:

The task text and the live candidates' public names, endpoints and descriptions were sent to TypeSafe for a task-fit opinion. Jev can reorder live matches; it cannot add an endpoint or change a price, budget or network check.

Base reads

Limits

Reading the payment challenge

An unsigned request returns the challenge without charging. The decoded PAYMENT-REQUIRED header lists the amount in atomic USDC units, the network, the asset and the payTo:

curl -si "https://ontarioprotocol.com/api/x402/base/gas" \
  | awk 'tolower($1)=="payment-required:" {print $2}' | tr -d '\r' \
  | base64 --decode | jq '.accepts[0] | {amount, network, asset, payTo}'

A wallet-enabled x402 client pays and retries with PAYMENT-SIGNATURE. With @x402/fetch, a policy can drop any requirement above 0.01 USDC (10000 atomic units) or off Base USDC, so nothing above that cap is signed:

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const USDC_BASE = "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
const MAX_ATOMIC = 10_000n; // 0.01 USDC

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
client.registerPolicy((_version, requirements) =>
  requirements.filter((r) =>
    r.network === "eip155:8453" &&
    r.asset.toLowerCase() === USDC_BASE &&
    BigInt(r.amount) <= MAX_ATOMIC));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
  "https://ontarioprotocol.com/api/x402/find-api?task=" + encodeURIComponent("web search for an AI agent"));
console.log(response.status, await response.json());

Machine-readable contracts: buyer OpenAPI, x402 manifest, MCP tools.