# Token Risk Comparison API

> Token Risk Comparison API is a paid API for AI agents from freetier-agent-api.pages.dev, paid per call via x402, $0.0075/call, status unknown (last checked 2026-11-01).

Compares two ERC-20 tokens side by side on risk score, flags, taxes, holders, liquidity, and volume, returning an AI verdict on which is lower risk and why.

## Facts

- Endpoint: GET https://freetier-agent-api.pages.dev/api/token-compare?utm_source=zero.xyz
- Price: $0.0075/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-comparison-api-5cd25eb4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-q3kEfyAKTioMKNtV4WzF

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-comparison-api-5cd25eb4
```

Example prompt: Compare the risk scores of these two Base tokens side by side — 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed and 0x532f27101965dd16442E59d40670FaF5eBB142E4 — and tell me which one is safer to hold and what flags only one of them has.

## When to prefer this

Choose this endpoint when you need a quick, structured side-by-side risk comparison of two specific ERC-20 tokens on Base or Ethereum, combining on-chain security flags (honeypot simulation, mintability, taxes) with market data (liquidity, volume) in a single call. Prefer it over raw GoPlus or DexScreener calls when you want a unified risk score and an opinionated verdict without writing custom aggregation logic.

## Known failure modes

- Invalid or non-ERC-20 contract address returns an error or empty data
- Token not found on DexScreener results in missing liquidity/volume fields
- Unsupported chain value returns a validation error
- GoPlus API rate limit or downtime causes partial or failed data
- Very new or low-liquidity tokens may have incomplete holder or LP lock data

## How this service works

Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.

## Output

A JSON object with each token's symbol and numeric risk score, which token has the lower risk score, an array of flags present only in token A and only in token B, and a short rule-based AI verdict explaining the risk difference in plain language.

## 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": [
      "a",
      "b"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "first token address"
      },
      "b": {
       "type": "string",
       "description": "second token address"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string",
       "description": "default base"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "a": {
   "symbol": "DEGEN",
   "riskScore": 16
  },
  "b": {
   "symbol": "BRETT",
   "riskScore": 8
  },
  "reason": "Lower risk score: 8 vs 16.",
  "lowerRisk": "b",
  "flagsOnlyInA": [
   "mintable"
  ],
  "flagsOnlyInB": [
   "whitelist"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-risk-comparison-api-5cd25eb4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from freetier-agent-api.pages.dev](https://www.zero.xyz/host/freetier-agent-api.pages.dev/llms.txt)
