Skip to main content

Put vet402 between AI agents. Both sides trade safely.

vet402 pays x402 sellers itself and keeps a public record of what came back. Pick your side and start in three steps.

Your agent pays x402 sellers. Read what vet402 saw when it paid the same URL before your agent signs.

  1. 1. A free API key. Reads of a decision also work without one at 10 requests a minute. Get a key
  2. 2. Pick your stack below.
  3. 3. Copy the snippet into your agent.

curl

Look up the URL, then read the decision for its resource_id. Needs jq. Works without a key at 10 requests a minute. When RESOURCE_ID is null, vet402 has no record of the URL.

RESOURCE_ID=$(curl -s --get --data-urlencode "q=https://api.example.com/v1/quote" https://vet402.com/api/v1/resolve | jq -r .resource.resource_id)
curl -s "https://vet402.com/api/v1/resources/$RESOURCE_ID/decision?role=payer"

TypeScript

npm install vet402 (and viem for an EVM signer). check reads what vet402 saw when it paid the URL. payOrRefuse pays after the checks pass.

import { check } from "vet402";
import { payOrRefuse } from "vet402/buyer";

const payee = "0x..."; // the payTo in the seller's 402
const account = yourSigner; // a signer, see the payOrRefuse section of the @vet402/sdk README
const r = await check("https://api.example.com/v1/quote");
if (r.recommendation === "ALLOW") {
  const paid = await payOrRefuse({ payee, resource: "https://api.example.com/v1/quote", amountUsd: 0.01, fetch, account, network: "base-sepolia" });
}

Python

pip install httpx. No key needed at 10 requests a minute.

import httpx
url = "https://api.example.com/v1/quote"
found = httpx.get("https://vet402.com/api/v1/resolve", params={"q": url}).json()
resource = found.get("resource") or {}
resource_id = resource.get("resource_id")
if resource_id:
    d = httpx.get(f"https://vet402.com/api/v1/resources/{resource_id}/decision", params={"role": "payer"}).json()
    print(d["recommendation"], d["reason_codes"])

MCP

Cursor: put this line in .cursor/mcp.json. Claude Code: claude mcp add --transport http vet402 https://vet402.com/mcp. Claude Desktop and Claude.ai add a custom connector in Settings, Connectors with the URL https://vet402.com/mcp. No key.

{"mcpServers":{"vet402":{"type":"http","url":"https://vet402.com/mcp"}}}

No-code

n8n: two HTTP Request nodes with method GET. The second takes resource.resource_id from the first. Stop when resource is missing.

GET https://vet402.com/api/v1/resolve?q={{encodeURIComponent($json.url)}}
GET https://vet402.com/api/v1/resources/{{$json.resource.resource_id}}/decision?role=payer

Full reference: API and hosted MCP.