# PayAI Crypto Hash Utility

> PayAI Crypto Hash Utility is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes cryptographic hashes and Ethereum-specific derived values (keccak256, sha256, 4-byte function selector, event topic0, ENS namehash/labelhash) from a string or hex input.

## Facts

- Endpoint: GET https://payai.agentstools.dev/crypto/hash
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-crypto-hash-utility-fc60b6fe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d-gJlITgUPIU6-D_rNm5S

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 payai-crypto-hash-utility-fc60b6fe
```

Example prompt: What's the keccak256 hash of the UTF-8 string 'Hello, World!' and also give me the 4-byte ABI function selector for 'transfer(address,uint256)'?

## When to prefer this

Use this endpoint when an AI agent needs to compute Ethereum-ecosystem cryptographic primitives — especially ENS namehash/labelhash or Solidity ABI selectors — without running local code. Prefer it over generic hash libraries when the agent needs selector or event topic0 derivation from human-readable Solidity signatures, or ENS name resolution primitives.

## Known failure modes

- Missing required 'algo' or 'input' query parameters — returns 400 Bad Request
- Invalid algo enum value — returns 400 with validation error
- Malformed 0x-hex input when encoding=hex is specified — returns 400 or incorrect result
- Input string too long or malformed for the selected algorithm — may return 400 or 500
- Payment not provided or insufficient — returns 402 Payment Required

## How this service works

Compute keccak256/sha256, a 4-byte function selector, an event topic0, or an ENS namehash/labelhash from a string or hex input.

## Output

Returns a hex-encoded hash or derived value corresponding to the requested algorithm — e.g. a 32-byte keccak256 digest, a 4-byte function selector, a 32-byte event topic0, or the ENS namehash/labelhash for the given input string.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "algo",
      "input"
     ],
     "properties": {
      "algo": {
       "enum": [
        "keccak256",
        "sha256",
        "selector",
        "event_topic",
        "namehash",
        "labelhash"
       ],
       "type": "string"
      },
      "input": {
       "type": "string",
       "description": "String / signature / ENS name / 0x-hex"
      },
      "encoding": {
       "enum": [
        "utf8",
        "hex"
       ],
       "type": "string",
       "description": "How to read `input` for keccak256/sha256 (default utf8)"
      }
     }
    }
   },
   "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/payai-crypto-hash-utility-fc60b6fe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
