Token safety report API for AI agents on Base, paid per request in USDC via x402.
Send any ERC-20 token address on Base. Get back a JSON safety report with verified status, ownership, mint authority, a 0–100 score, and a recommendation (OK / CAUTION / AVOID / UNKNOWN).
Designed to be called by AI agents (base-mcp, Bankr, Virtuals, custom) before they recommend a token purchase to a human.
curl https://basesafe-x402.baseagentx402.workers.dev/preview/0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
Returns the same JSON report as the paid endpoint. Use this during v0.1 while the x402 ecosystem expands payment support (see Status below).
GET /check/0xToken402 Payment Required with payment requirements (network, asset, amount, payTo)transferWithAuthorization signatureX-PAYMENT: <signature>From a Claude agent (base-mcp): ask Claude to call the endpoint and pay the 1 cent USDC via its x402 capability.
From your own code (TypeScript):
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment(
"https://basesafe-x402.baseagentx402.workers.dev/check/0xToken"
);
console.log(await res.json());
{
"token": "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed",
"chain": "base",
"basics": {
"name": "Degen",
"symbol": "DEGEN",
"decimals": 18,
"totalSupply": "36965935.99..."
},
"contract": {
"verified": true,
"isProxy": false,
"sourceLanguage": "Solidity (multi-file)",
"compiler": "v0.8.20+commit.a1b79de6"
},
"ownership": {
"owner": "0x0000000000000000000000000000000000000000",
"renounced": true,
"hasMintFunction": false
},
"score": 100,
"flags": [],
"recommendation": "OK",
"generatedAt": "2026-05-28T06:00:00.000Z"
}
v0.2 checks — verified, isProxy, owner, renounced, hasMintFunction, Aerodrome WETH+USDC liquidity. Coming next: LP lock status, top-holders concentration, honeypot simulation.
Protocol — basesafe speaks x402 v2 and settles through the Coinbase Developer Platform facilitator. Pay with an EOA (ECDSA, viem privateKeyToAccount) using @x402/fetch v2.