# EVM Bytecode Size Checker

> EVM Bytecode Size Checker is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Returns the bytecode size of an address on up to 7 EVM chains, distinguishing EOAs (size=0) from smart contracts (size>0).

## Facts

- Endpoint: GET https://api.x402node.dev/chain/code-size
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-bytecode-size-checker-a7e6fb7d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ihTqj2YngeKrbZNIgWbuK

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 evm-bytecode-size-checker-a7e6fb7d
```

Example prompt: Is 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 a wallet or a smart contract? Check across all available EVM chains and tell me the bytecode size.

## When to prefer this

Use this endpoint when you need to quickly determine whether an Ethereum-style address is a wallet (EOA) or a deployed smart contract before interacting with it programmatically — especially when operating across multiple EVM chains at once. Prefer this over full ABI fetching or Etherscan lookups when you only need a fast binary wallet-vs-contract check plus a rough complexity signal from byte count.

## Known failure modes

- Invalid or malformed Ethereum address returns an error response
- Address not found or chain unavailable may return null or zero for that chain
- Unsupported chain identifier returns an error
- Network timeout on a specific chain may yield partial results

## How this service works

Bytecode size of an address across 7 EVM chains - zero means a regular wallet (EOA), non-zero means a contract with the byte count indicating complexity - a fast primitive for agents to distinguish wallets from contracts before interacting. code size, is contract, bytecode size, eoa or contract, contract bytecode, account code

## Output

Returns the bytecode size (in bytes) of the given address on each supported EVM chain. A size of 0 means it is a regular wallet (EOA); any non-zero value means it is a deployed smart contract, with the byte count indicating relative complexity. Results are returned per chain.

## Example request

```json
{
 "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"
}
```

## 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": {
      "chain": {
       "type": "string",
       "description": "ethereum, base (default), arbitrum, optimism, polygon, bsc, avalanche"
      },
      "address": {
       "type": "string",
       "description": "Address (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-bytecode-size-checker-a7e6fb7d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
