# Getabi

> Getabi is a paid API for AI agents from stablecrypto.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches the ABI (Application Binary Interface) for a verified smart contract on a specified EVM chain

## Facts

- Endpoint: POST https://stablecrypto.dev/api/etherscan/contract/getabi
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/getabi-72dd63e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_udGbqGrNIQJJHTlmNFQDt

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 getabi-72dd63e1 -d '<json body>'
```

Example prompt: Can you fetch the ABI for the verified contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet (chain ID 1)?

## When to prefer this

Choose this endpoint when you need the ABI of a verified smart contract on any EVM-compatible chain and want a pay-per-call model without managing Etherscan API keys. Ideal for agents that need to dynamically decode or interact with contracts they discover at runtime across multiple chains like Ethereum, Polygon, and Base.

## Known failure modes

- Contract address not verified on Etherscan — returns error or empty ABI
- Invalid or unsupported chain ID — request fails with bad request error
- Malformed contract address (not a valid hex address) — validation error
- Rate limit or upstream Etherscan API failure — 429 or 5xx error
- Contract exists but is a proxy with no ABI published — may return minimal ABI

## How this service works

Pay-per-request access to CoinGecko, DefiLlama, Alchemy, and Etherscan APIs. No auth, no subscriptions.

## Output

Returns the ABI JSON array for the specified verified smart contract, including all function definitions, event signatures, input/output parameter types, and state mutability — enabling callers to programmatically encode/decode contract interactions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "description": "Verified contract address"
  },
  "chainid": {
   "type": "number",
   "description": "EVM chain ID (1=Ethereum, 137=Polygon, 8453=Base, etc.)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/getabi-72dd63e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablecrypto.dev](https://www.zero.xyz/host/stablecrypto.dev/llms.txt)
