# Token Risk Preflight / Token Safety Check

> Token Risk Preflight / Token Safety Check is a paid API for AI agents from scanpay-edge.alextaghiashvili.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-01).

Returns a deterministic on-chain risk score and safety flags for a Base or Ethereum ERC-20 token, covering contract shape, proxy detection, ownership, liquidity, and mint/blacklist heuristics.

## Facts

- Endpoint: GET https://scanpay-edge.alextaghiashvili.workers.dev/api/v1/token-preflight?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-risk-preflight-token-safety-check-2aeffe04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KArK4HtCuAUzQFVRBNTor

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability token-risk-preflight-token-safety-check-2aeffe04
```

Example prompt: Can you run a token safety preflight on the contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base and tell me the risk score, whether it has mint or blacklist functions, if the owner has been renounced, and what the Uniswap liquidity situation looks like?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, on-chain-only risk assessment of an ERC-20 token before a swap, investment, or listing decision — especially on Base or Ethereum. It is ideal for automated agent pipelines that need a structured risk score and flag set without relying on off-chain data providers or third-party audit services. Prefer it over full audit services when speed and cost matter and when on-chain heuristics (proxy detection, ownership, liquidity, dangerous selectors) are sufficient signal.

## Known failure modes

- Address is an EOA (not a contract) — check returns is_contract: false with no further analysis
- Invalid or malformed contract address returns a 4xx error
- Unsupported network or chain ID returns an error
- Contract bytecode is too large or unusual to decode — partial results with missing fields reported explicitly
- Uniswap pool data unavailable — liquidity fields reported as missing rather than safe
- Payment not included or insufficient — 402 Payment Required response per x402 protocol

## How this service works

Pay-per-call x402 APIs for AI agents: OpenAI-compatible LLM chat, perp funding and arbitrage spreads, crypto prices, gas, FX, Solana SPL mint audit, token price by contract, x402 delivery-receipt verification, web search, clean page extraction, batch tools and deterministic code-security scanning. USDC on Base or Solana, no signup, no API key, from $0.0001 a call.

## Output

Returns a JSON object including: a numeric risk_score (0–100) and risk_band label, ERC-20 token name/symbol/decimals/total_supply, owner address, is_proxy flag and EIP-1967 implementation slot value, bytecode_size, an array of named check results (each with ok boolean and detail string), detected flags for dangerous selectors (mint, blacklist, etc.), Uniswap V2/V3 liquidity observations, and a disclaimer note reminding the caller this is heuristic on-chain analysis only.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string"
      },
      "network": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "This is a heuristic preflight. Missing data is reported as missing, not as safe.",
  "flags": [],
  "owner": "0x0000000000000000000000000000000000000000",
  "token": {
   "name": "USD Coin",
   "symbol": "USDC",
   "decimals": 6,
   "total_supply": 1000000,
   "total_supply_raw": 1000000000000
  },
  "checks": [
   {
    "ok": true,
    "check": "is_contract",
    "detail": "1852 bytes of bytecode"
   },
   {
    "ok": true,
    "check": "proxy",
    "detail": "no EIP-1967 implementation slot"
   }
  ],
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "network": "base",
  "product": "scanpay.token_preflight",
  "chain_id": "eip155:8453",
  "is_proxy": false,
  "price_usd": 0.005,
  "risk_band": "high",
  "disclaimer": "On-chain observations only: not an audit, not a safety guarantee, no off-chain holder or trade analysis. Re-check before acting.",
  "risk_score": 85,
  "bytecode_size": 1852,
  "implementation": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-risk-preflight-token-safety-check-2aeffe04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scanpay-edge.alextaghiashvili.workers.dev](https://www.zero.xyz/host/scanpay-edge.alextaghiashvili.workers.dev/llms.txt)
