GET /transfer0.02 USDCVerify before money moves: IBAN, BIC, amount, SEPA scope, remittance text and name in one call. ok plus failed fields. Does not confirm the holder.
Pay-per-call checks for AI agents
The shield for your agent's token budget and your money. One HTTP call, one exact JSON answer, before money moves, an invoice goes out or a deadline is promised. Deterministic code instead of reasoning tokens. Paid per call in USDC, no account.
Browse all routes and pricesAgent overview (llms.txt)
A wrong IBAN, a miscalculated VAT amount or a deadline that forgot a public holiday costs far more than the check. Every bundle returns ok plus each failed field.
Checksums, tax rates, holidays and business days are exact in code. Reasoning them out is slow, costs more and can be wrong.
Out-of-scope input returns 404 before payment, so a bad call never burns budget. The free choose_route tool says pay, compute or skip first.
choose_routeWorried an agent will pay for something trivial? Before any paid call, the agent asks choose_route on /mcp with one sentence. It answers pay, compute or skip. It is free, it never spends money and it does not return the fact itself. Pay only on pay.
GET /transfer0.02 USDCVerify before money moves: IBAN, BIC, amount, SEPA scope, remittance text and name in one call. ok plus failed fields. Does not confirm the holder.
GET /invoice0.03 USDCVerify before an invoice is sent or paid: net + VAT = gross, VAT vs rate, IBAN, VAT id, date, number. ok plus failed fields. Not an XRechnung schema check.
GET /deadline0.01 USDCVerify before you promise a date: add business days skipping weekends and public holidays of a country or region.
GET /holidays0.008 USDCVerify before you schedule: every statutory public holiday of a year for a country or region. Replaces recalling a list from memory.
GET /cryptopay0.01 USDCVerify before you send stablecoins: recipient checksum, zero or token-contract recipient, native USDC/USDT contract on that chain. Not a balance or sanctions screen.
GET /vies0.08 USDCEU VIES answer for a VAT id at request time. Not a checksum and not a certificate. A silent registry is not charged.
GET /iban0.005 USDCIBAN checksum, length, and country format. Does not confirm the account exists.
POST /lines0.01 USDCReceipt photo to JSON line items. The image is not stored.
Example of a paid answer: GET /holiday?country=DE&date=2026-10-03 returns {"known":true,"holiday":true,"name":"Tag der Deutschen Einheit"}
Every bundle returns ok and the list of failed fields, so it drops straight into if/else logic. Real responses:
GET /invoice with a wrong VAT amount{
"known": true,
"ok": false,
"net": "100.00", "vat": "20.00", "gross": "119.00",
"rate_percent": 19, "expected_vat": "19.00",
"failed": ["sum", "vat_amount"],
"checks": [
{"field": "sum", "ok": false,
"note": "net + vat is 120.00, gross says 119.00."},
{"field": "vat_amount", "ok": false,
"note": "VAT should be 19.00 at 19% of net, invoice says 20.00."}
]
}GET /transfer with a bad IBAN and a foreign BIC{
"known": true,
"ok": false,
"iban_country": "DE",
"sepa_country": true,
"failed": ["iban", "bic_country"],
"checks": [
{"field": "iban", "ok": false,
"note": "IBAN checksum fails."},
{"field": "bic_country", "ok": false,
"note": "BIC country FR differs from IBAN country DE."}
]
}GET /deadline 5 business days from 2026-12-22, Bavaria{
"known": true,
"result": "2026-12-30",
"weekday": "Wednesday",
"skipped_holidays": [
{"date": "2026-12-25", "name": "1. Weihnachtstag"}
],
"skipped_weekend_days": 2
}GET /cryptopay recipient is a token contract{
"known": true,
"ok": false,
"chain": "Base",
"failed": ["recipient_not_token_contract"],
"note": "Funds sent to a stablecoin contract
are usually lost."
}x402 is plain HTTP. There is no free test endpoint and no testnet mirror, because the facilitator settles Base mainnet only. The cheapest route costs 0.001 USDC, so a first end-to-end test costs a tenth of a cent. Unknown input returns 404 before payment and costs nothing.
1. GET /iban?iban=DE89370400440532013000
← 402 Payment Required
header PAYMENT-REQUIRED: amount, asset USDC, network eip155:8453, payTo
2. sign the payment with your own key (pay-client.mjs, or any x402 client)
3. GET /iban?iban=DE89370400440532013000
header PAYMENT-SIGNATURE: <signed payment>
← 200 OK {"known":true,"valid":true,...} header PAYMENT-RESPONSE: settlement
No MCP router needed. Paste this into your agent's system prompt:
Before you validate an IBAN or bank transfer, check an invoice, calculate a
deadline across public holidays, or send stablecoins, do not reason it out.
Call the agentshield.live route for it (list: https://agentshield.live/llms.txt).
Use /transfer, /invoice, /deadline, /holidays, /cryptopay for these. If unsure,
ask the free choose_route tool on https://agentshield.live/mcp first: it answers
pay, compute or skip. Pay only on "pay". Trust ok:false and fix the listed
failed fields before you proceed. Unknown input returns 404 and is not charged.| Task | A model doing it | agentshield.live |
|---|---|---|
| Validate an IBAN | ~500–1,500 reasoning tokens, digit errors possible | /iban 0.005 USDC, exact |
| Due date in 10 business days, Bavarian holidays | ~1,000–3,000 tokens, holiday errors common | /deadline 0.01 USDC, exact |
| Bank transfer: IBAN, BIC, amount, SEPA text | Several steps, easy to skip one | /transfer 0.02 USDC, one call |
| Invoice: totals, VAT, IBAN, VAT id | Multi-step arithmetic plus format rules | /invoice 0.03 USDC, one call |
| Receipt photo to line items | Vision call, free-form output to re-parse | /lines 0.01 USDC, JSON |
Speed: a paid call took about 1.0–1.4 s end to end including payment settlement (measured 2026-11-12 from one host, 3 calls each on /iban and /deadline). The route itself answers in milliseconds, and an unpaid 402 came back in under 10 ms. A reasoning model working through the same check step by step usually needs several seconds (estimate).
Token counts are rough estimates for a reasoning model working step by step. At typical output prices of 10–25 USD per million tokens, 1,000 tokens cost about 0.01–0.025 USD. Route prices come from the live HTTP 402.
pay, request the URL. The server answers HTTP 402 with the exact price.X402_PAYER_KEY=your_key node pay-client.mjs "Check this IBAN before sending money"
Using a framework? Both snippets were run against the live service with a real payment. They use your own wallet key; it never leaves your machine.
# pip install "x402[evm,httpx]" langchain-core eth-account
import os, json, httpx
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client
from x402.mechanisms.evm.signers import EthAccountSigner
from langchain_core.tools import tool
BASE = "https://agentshield.live"
x402 = x402Client()
register_exact_evm_client(x402, EthAccountSigner(Account.from_key(os.environ["X402_PAYER_KEY"])), networks="eip155:8453")
@tool
async def check_iban(iban: str) -> dict:
"""Check an IBAN (checksum, length, country format) before money moves."""
async with x402HttpxClient(x402) as c: # pays the 402 automatically, 0.005 USDC
return (await c.get(f"{BASE}/iban", params={"iban": iban})).json()
@tool
async def choose_route(task: str) -> dict:
"""Free. Is this subtask worth paying for? Returns pay, compute or skip."""
async with httpx.AsyncClient() as c:
r = await c.post(f"{BASE}/mcp", json={"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "choose_route", "arguments": {"task": task}}})
return json.loads(r.json()["result"]["content"][0]["text"])
# tools = [choose_route, check_iban] -> pass to your LangChain / LangGraph / CrewAI agent// npm i ai zod @x402/fetch @x402/evm viem + agent-kit.mjs from agentshield.live/agent-kit.mjs
import { tool } from "ai";
import { z } from "zod";
import { createAgentShield } from "./agent-kit.mjs";
const shield = createAgentShield({ maxUsdc: 0.05 }); // reads X402_PAYER_KEY, hard per-call cap
export const agentshield = {
check_transfer: tool({
description: "Check a bank transfer before money moves: IBAN, BIC, amount. Returns ok and failed fields.",
inputSchema: z.object({ iban: z.string(), amount: z.string().optional() }),
execute: (args) => shield.call("agentshield_transfer", args), // 0.02 USDC
}),
choose_route: tool({
description: "Free. Is this subtask worth paying for? Returns pay, compute or skip.",
inputSchema: z.object({ task: z.string() }),
execute: ({ task }) => shield.call("agentshield_choose", { task }),
}),
};
// generateText({ model, tools: agentshield, prompt })Answers are deterministic and stored, not live: no market prices or scores, and no claim that an account exists or that money is owed. This is not a firewall, security audit or certificate, and there is no grade.
Budget tip: set a daily spending limit in the agent's wallet, for example 1 USDC, so a prompt loop cannot drain it. Most routes cost well under a cent.