# Contract Identity

> Contract Identity is a paid API for AI agents from 402.com.tr, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Identifies whether a Base address is a contract or EOA wallet, detects token standards (ERC-20, ERC-721, ERC-1155) via ERC-165 and interface inference, and returns name, symbol, decimals, and bytecode size.

## Facts

- Endpoint: GET https://402.com.tr/api/x402/contract-info
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-identity-7f358858
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WMdml8BVdc8TGLpHUiati

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 contract-identity-7f358858
```

Example prompt: Can you check what type of contract is at Base address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — is it an ERC-20, NFT, or just a regular wallet, and what's its name, symbol, and decimals?

## When to prefer this

Use this endpoint when you need a definitive, nuanced classification of a Base address — it prioritizes ERC-165 self-declaration over naive ABI sniffing and correctly handles the NFT/ERC-20 totalSupply collision. Prefer it over generic block explorer lookups when you need structured, machine-readable token metadata including decimals and code size in a single call.

## Known failure modes

- Invalid or malformed address returns an error
- Address not found or not deployed on Base returns empty/null contract info
- RPC timeout or Base node unavailability causes request failure
- Contracts with non-standard or missing metadata may return null for name/symbol/decimals
- Proxy contracts may misidentify underlying implementation standard

## How this service works

🆕 What sits at a Base address: contract or plain wallet, and if a contract, whether it declares ERC-721 or ERC-1155 via ERC-165 or carries the ERC-20 shape, plus name, symbol, decimals and code size. Interface support is read from the contract's own declaration first and only inferred when there is none — the ordering matters, because NFTs answer totalSupply() too.

## Output

Returns whether the address is a contract or EOA; if a contract, identifies the token standard (ERC-20, ERC-721, ERC-1155) using ERC-165 declarations first and shape-based inference as fallback; includes name, symbol, decimals, and bytecode size.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "Contract address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-identity-7f358858/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402.com.tr](https://www.zero.xyz/host/402.com.tr/llms.txt)
