# Base ERC-20 Token Preflight Check

> Base ERC-20 Token Preflight Check is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.075/call, status unknown (last checked 2026-09-15).

Inspects a Base network ERC-20 token contract address and returns a safety assessment including risk score, risk level, and flags covering identity, activity, provenance, and product metadata.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/base/token-preflight
- Price: $0.075/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-erc-20-token-preflight-check-1a9843fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DghCe8gb7tsUH9vtv9FUK

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 base-erc-20-token-preflight-check-1a9843fa
```

Example prompt: Before I swap into it, run a preflight safety check on the Base token at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — I want to know the risk score, risk level, and any flags.

## When to prefer this

Use this endpoint when an AI agent needs to vet a specific Base network ERC-20 token contract before executing a swap, approval, or transfer — especially when the token is unfamiliar or user-provided. Prefer this over generic blockchain explorers when you need a machine-readable, structured risk score and flags rather than raw on-chain data.

## Known failure modes

- Invalid or non-ERC-20 contract address returns an error or empty assessment
- Token address not found on Base mainnet returns null or unknown risk data
- Malformed 0x address that fails the regex pattern returns a 400-style validation error
- Timeout or upstream data provider unavailability returns a service error
- Contract with no on-chain history may return sparse assessment with no flags

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

A JSON object containing the network identifier (eip155:8453), a product label, and an assessment object with a risk_score (numeric), risk_level (e.g. 'low'), and a flags array listing any detected issues, plus optional identity, activity, and provenance sub-objects about the token contract.

## 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": [
      "token"
     ],
     "properties": {
      "token": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Base ERC-20 token contract to inspect."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "base-token-preflight",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-erc-20-token-preflight-check-1a9843fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
