true402
docs · api reference

API
reference.

Every endpoint is one POST that returns JSON, priced per call in USDC — no account, no API key. Pick a stall, send the body, pay the 402. Below: the full reference, plus copy-paste quickstarts for the CLI and every SDK.

§01 · base & auth

No key. The wallet pays.

Base URL https://true402.dev/api. There's no account or API key — each paid call settles with an x402 payment (USDC on Base, EIP-3009). Free GET endpoints (/v1/models, /v1/services, /v1/radar, /health, /openapi.json) need nothing. The full flow:

the x402 flow
# 1) Call any paid endpoint with NO payment — you get the price back:
curl -i -X POST https://true402.dev/api/v1/base/token-report \
  -H 'content-type: application/json' -d '{"token":"0x…"}'
# → HTTP 402  payment-required: { amount, asset: USDC, network: eip155:8453, payTo: 0x… }

# 2) Sign that USDC authorization (EIP-3009) and retry with the X-Payment header → 200 + JSON.
# Most agents never hand-roll this — use the CLI or an SDK below.
§02 · quickstart

CLI, then SDKs.

terminal (no setup)
# Zero-install terminal check — free to try (a few/day, no wallet):
npx @true402.dev/rugcheck 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
SDKs — drop into an agent
# LangChain — adds true402 tools to an agent (pays per call from a wallet):
npm i @true402.dev/langchain
#   import { createTrue402Tools } from '@true402.dev/langchain';
#   const tools = createTrue402Tools({ payerPrivateKey: process.env.PAYER_PRIVATE_KEY });

# Vercel AI SDK:
npm i @true402.dev/ai-sdk
#   import { true402Tools } from '@true402.dev/ai-sdk';

# MCP (Claude Code / Desktop / Cursor) — every stall as a tool, auto-discovered:
claude mcp add true402 -- npx -y @true402.dev/mcp-server

The SDKs handle the 402 → sign → retry loop for you, with a built-in per-call spend cap. See the agent integration guide.

§03 · endpoints

Every stall, every field.

Token safety (Base)

POST /v1/base/token-report$0.010

Composite rug/honeypot verdict — the flagship "can I ape in?" check.

body{ "token": "0x…" }
{ verdict: { rating: avoid|caution|ok, score, reasons[] }, safety, recentPulls[], recentWhaleSwaps[] }
POST /v1/token-safety$0.005

Raw safety report: ERC-20 conformance, ownership, mint, liquidity, buy/sell honeypot simulation.

body{ "token": "0x…" }
{ score, flags[], liquidity, honeypot }
POST /v1/base/address-safety$0.005

Structural profile of any EOA or contract before you send/approve/call it.

body{ "address": "0x…" }
{ isContract, isErc20, ownership, isProxy, mintable, balances, flags[] }
POST /v1/base/deployer-check$0.008

Deployer reputation — wallet age + prior-token history to catch serial ruggers.

body{ "token": "0x…" }
{ risk, flags[], deployer, priorTokens[] }

DeFi signals (Base)

POST /v1/base/new-pairs$0.003

Newly-created Base DEX pairs (Uniswap V3 + Aerodrome) — fresh launches.

body{ "since?": n, "limit?": n, "dex?": "…", "withToken?": bool }
{ pairs: [{ token, quote, pool, dex, block, ageSeconds }] }
POST /v1/base/liquidity-pulls$0.003

Liquidity-removal (rug) alerts on tracked pools — an early rug warning.

body{ "since?": n, "limit?": n, "minQuote?": n }
{ events: [{ pool, token, quoteRemoved, block }] }
POST /v1/base/whale-swaps$0.005

Large ($-value) DEX swaps for whale-following / copy-trading.

body{ "min?": n, "direction?": "buy|sell", "since?": n, "limit?": n }
{ swaps: [{ token, usdValue, direction, pool, block }] }

Web & GEO

POST /v1/seo-audit$0.015

SEO + GEO (generative-engine) audit of a web page → structured JSON report.

body{ "url": "https://…", "mode?": "…" }
{ report: { seo, geo, issues[], score } }
POST /v1/web-extract$0.005

Fetch a URL → clean text + markdown + links.

body{ "url": "https://…" }
{ title, text, markdown, links[] }
POST /v1/link-preview$0.003

Open Graph card for a URL.

body{ "url": "https://…" }
{ title, description, image, siteName }
POST /v1/robots-check$0.003

A site's AI-crawler policy + sitemaps.

body{ "url": "https://…" }
{ aiBots: {...}, sitemaps[] }
POST /v1/headers-check$0.003

HTTP security-header analysis for a URL.

body{ "url": "https://…" }
{ headers, grade, missing[] }

LLM

POST /v1/chat/completionsper-token

OpenAI-compatible chat across 6 providers / 20+ models (3% markup).

body{ "model": "…", "messages": [...] }
OpenAI chat completion object

Machine-readable: /api/openapi.json (OpenAPI 3.1) and the live catalog.

§04 · questions

Answered for machines.

How do I authenticate to the true402 API?

You don't — there is no account, API key, or token. Each paid call is settled with an x402 payment: the endpoint returns HTTP 402 with the price, you sign a USDC (EIP-3009) authorization with your wallet, and retry with the X-Payment header. The wallet is the identity. The free GET endpoints (models, services, radar, health) need nothing.

What does a call cost?

Each endpoint is a fixed price per call in USDC, listed in the reference above (roughly $0.003–0.015; chat is per-token with a 3% markup). The safety stalls (token-report, token-safety, address-safety) also have a free trial — a few calls per IP per day with no wallet.

What network and token?

USDC on Base (network eip155:8453). Payment is a gasless EIP-3009 signed authorization, so the payer needs only USDC, not native gas. A Lightning (BTC) rail is also available on some deployments.

Is there an OpenAPI spec?

Yes — the machine-readable OpenAPI 3.1 spec is served at /api/openapi.json, and a discovery manifest at /api/.well-known/x402-manifest.json. Agents can auto-generate a client from either.