# Base Address Bytecode Inspector

> Base Address Bytecode Inspector is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-23).

Returns bytecode size, contract status (is_contract), and a keccak256 hash of the first bytes for a given Base mainnet address, with an optional truncated bytecode preview.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/base-code?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-address-bytecode-inspector-48815083
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-c9dD3740JsMMqyUHBqZ8

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-address-bytecode-inspector-48815083 -d '<json body>'
```

Example prompt: Can you check the Base mainnet address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 and tell me whether it's a smart contract, what its bytecode size is, and give me the keccak256 hash of its bytecode?

## When to prefer this

Use this endpoint when you need lightweight, read-only on-chain metadata about a Base mainnet address — specifically contract detection, bytecode size, and a keccak256 fingerprint — without running a full Ethereum node or using a heavy RPC provider SDK. Ideal for agents that need a quick contract/EOA check or bytecode integrity fingerprint as part of a larger workflow. The sandbox endpoint (/v1/sandbox/base-code) is available for free testing before committing the $0.002 USDC per-call fee.

## Known failure modes

- Invalid or malformed address returns an error
- Address not on Base mainnet (e.g. Ethereum mainnet address) may return empty/EOA result incorrectly interpreted as non-contract
- Network timeouts or RPC unavailability may cause request failure
- Missing required 'address' field in request body returns a validation error
- Payment not included or insufficient USDC triggers 402 Payment Required — use /v1/sandbox/base-code for free testing

## How this service works

Call when an agent needs bytecode size, is_contract, and a keccak256 hash of the first bytes for one Base address. include_bytecode returns a truncated preview. An empty account is is_contract false. Read-only. No spend. Send JSON {"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}. Exact $0.002 USDC on Base. Try unpaid POST /v1/sandbox/base-code first.

## Output

Returns a JSON object with: bytecode size (integer, in bytes), is_contract (boolean, true if the address has deployed code), and a keccak256 hash of the first bytes of the bytecode. If include_bytecode is true, also returns up to 128 bytes of raw bytecode as a preview. Empty accounts (EOAs with no code) return is_contract: false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "examples": [
    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
   ],
   "description": "Address on Base mainnet. Example: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Returns size, is_contract, and a keccak of the first bytes."
  },
  "include_bytecode": {
   "type": "boolean",
   "description": "When true, include at most 128 bytes of bytecode. Example: false. Default is false. The hash is still returned."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-address-bytecode-inspector-48815083/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
