Developer reference
One service, one paid endpoint, one price. Everything below is generated from the running implementation.
Endpoint
POST /api/verify
Price
$0.03 USDC / request
Network
Algorand
USDC ASA
10458941
Scoring model
Every target starts at 100. Penalties apply only to checks that actually completed; a check that cannot be completed returns unknown, lowers confidence, and is never treated as evidence of safety.
| No HTTPS | -20 |
| Invalid / unverified TLS | -30 |
| Raw IP address host | -15 |
| Suspicious URL pattern | -15 |
| Credentials embedded in URL | -15 |
| Excessive redirects | -10 |
| HTTPS to HTTP downgrade redirect | -15 |
| Unreachable host | -25 |
| Punycode hostname | -10 |
| Unusual port | -10 |
| Overlong URL | -5 |
curl
shell
# 1. Unpaid request -> HTTP 402 with the payment requirements
curl -i -X POST https://<your-host>/api/verify \
-H 'content-type: application/json' \
-d '{"url":"https://destination-to-check.example"}'
# Response: HTTP/1.1 402 Payment Required
# PAYMENT-REQUIRED: <base64 payment requirements>
# { "error": "payment_required", "price": "$0.03", "asset": "USDC", ... }
# 2. Re-send the same request with the signed payment
curl -i -X POST https://<your-host>/api/verify \
-H 'content-type: application/json' \
-H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \
-d '{"url":"https://destination-to-check.example"}'
# Response: HTTP/1.1 200 OK
# PAYMENT-RESPONSE: <base64 settlement response>TypeScript
typescript
import { x402Client } from "@x402/core/client";
import { x402HTTPClient } from "@x402/core/http";
import { ExactAvmScheme } from "@x402/avm/exact/client";
// signer: { address, signTransactions } — any Algorand wallet signer
const core = new x402Client().register("algorand:*", new ExactAvmScheme(signer));
const client = new x402HTTPClient(core);
const endpoint = "https://<your-host>/api/verify";
const body = JSON.stringify({ url: "https://destination-to-check.example" });
const headers = { "content-type": "application/json" };
// 1. Ask -> 402
const unpaid = await fetch(endpoint, { method: "POST", headers, body });
const required = client.getPaymentRequiredResponse(
(name) => unpaid.headers.get(name),
await unpaid.json(),
);
// 2. Sign the USDC payment (ASA 10458941 on algorand:<caip2>)
const payload = await client.createPaymentPayload(required);
// 3. Retry with the payment -> verification runs, then settles
const paid = await fetch(endpoint, {
method: "POST",
headers: { ...headers, ...client.encodePaymentSignatureHeader(payload) },
body,
});
const result = await paid.json();
const settlement = client.getPaymentSettleResponse((n) => paid.headers.get(n));
console.log(result.trust_score, result.interaction_recommendation, settlement.transaction);Paid response
json
{
"service": "AgentTrust Verify",
"status": "verified",
"target": "https://destination-to-check.example",
"risk_level": "LOW", // LOW 80-100 | MEDIUM 60-79 | HIGH 0-59
"trust_score": 90,
"confidence": 0.92, // completed checks / total checks
"interaction_recommendation": "PROCEED_WITH_NORMAL_CAUTION", // | REVIEW | AVOID
"checks": [{ "id": "https", "label": "HTTPS", "status": "pass", "detail": "..." }],
"deductions": [{ "reason": "Punycode hostname", "points": 10 }],
"evidence": ["HTTPS is enabled."],
"limitations": ["This score evaluates observable technical URL/domain signals and is not proof of identity, legitimacy or complete safety."],
"redirect_chain": ["https://destination-to-check.example"],
"checked_at": "2026-01-01T00:00:00.000Z",
"payment": {
"settled": true,
"network": "algorand:<caip2>",
"asset": "USDC",
"asset_id": 10458941,
"price": "0.03",
"payTo": "<payTo address>",
"facilitator": "GoPlausible",
"tag": "x402-global-challenge",
"transaction": "<algorand transaction id>",
"payer": "<payer address>"
}
}Agent discovery
- /.well-known/x402x402 resource descriptor with payment requirements
- /openapi.jsonOpenAPI 3.1 description of the paid endpoint
- /llms.txtPlain-text guide for language-model agents
Errors
- 402 — no payment, invalid payment, or settlement failure. Verification does not run.
- 400 — the target URL is malformed or rejected by SSRF protection (loopback, private, link-local, metadata, non-HTTP scheme).
- 500 — the service refuses to run because its payment configuration is invalid. There is no simulated fallback.