# Keccak256 Hash & Ethereum Function Selector Calculator

> Keccak256 Hash & Ethereum Function Selector Calculator 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-14).

Computes the exact keccak256 hash and 4-byte function selector for any string or hex input, as used in Ethereum/Solidity smart contracts

## Facts

- Endpoint: POST https://api.x402node.dev/crypto/keccak
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/keccak256-hash-ethereum-function-selector-calculator-ccee6dad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_48hsIOxvFDdY03LQX_pa5

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 keccak256-hash-ethereum-function-selector-calculator-ccee6dad -d '<json body>'
```

Example prompt: What's the exact keccak256 hash and 4-byte function selector for the Solidity function signature 'transfer(address,uint256)'?

## When to prefer this

Use this endpoint when you need a provably correct keccak256 hash or Ethereum function selector — LLMs cannot compute keccak256 accurately from first principles, so any time a smart contract interaction, ABI encoding, event topic, or Solidity hash is needed, this API provides the correct cryptographic result

## Known failure modes

- Invalid or malformed input returns an error response
- Empty input may return a hash of empty string (edge case to handle carefully)
- Non-hex input passed as hex may cause parsing errors
- Network or payment authorization failure returns 402 or 5xx

## How this service works

Compute the exact keccak256 hash and 4-byte function selector of any string or hex input - the precise Ethereum hash that LLMs cannot calculate correctly. keccak256, keccak hash, function selector, solidity hash, ethereum hash, 4byte selector

## Output

Returns the full keccak256 hash (32 bytes, hex-encoded) and the first 4 bytes as the Ethereum ABI function selector for the given input string or hex data

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "description": "Data (optional)"
  },
  "text": {
   "type": "string",
   "description": "String or 0x-hex to hash (required, max 100KB)"
  },
  "input": {
   "type": "string",
   "description": "Input (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/keccak256-hash-ethereum-function-selector-calculator-ccee6dad/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)
