# x402-tools Cryptographic Hash API

> x402-tools Cryptographic Hash API is a paid API for AI agents from x402.nichospt.net, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Computes cryptographic hash digests (SHA-256, SHA-1, SHA-512, MD5) or HMAC signatures for arbitrary input strings, paid per-call in USDC via x402.

## Facts

- Endpoint: POST https://x402.nichospt.net/hash?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-tools-cryptographic-hash-api-69a7d6cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aCuprRhYSjndCzF_TSIjP

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 x402-tools-cryptographic-hash-api-69a7d6cd -d '<json body>'
```

Example prompt: Hash the string 'hello world' using SHA-256 and give me the result as a hex digest — and use HMAC with the key 'mysecret' if you can.

## When to prefer this

Choose this endpoint when an AI agent needs to compute cryptographic hash digests or HMAC signatures on-demand without managing local cryptographic libraries, especially in serverless or sandboxed environments. It is pay-per-call with no subscription, making it ideal for low-frequency or one-off hashing tasks settled in USDC via x402.

## Known failure modes

- Input exceeds 2,000,000 character limit — request rejected
- Unsupported algorithm value outside sha256/sha1/sha512/md5 enum — validation error
- Invalid encoding value outside hex/base64 — validation error
- Payment not settled via x402 — 402 Payment Required response
- HMAC key provided but malformed — error in digest computation

## How this service works

Pay-per-call utility APIs for AI agents, settled in USDC via the x402 protocol.

## Output

A JSON object containing the computed digest string (hex or base64 encoded), the algorithm used, the encoding format, and a boolean indicating whether an HMAC was computed instead of a plain hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 2000000
  },
  "encoding": {
   "enum": [
    "hex",
    "base64"
   ],
   "type": "string",
   "default": "hex"
  },
  "hmac_key": {
   "type": "string",
   "description": "If set, returns an HMAC instead of a plain hash"
  },
  "algorithm": {
   "enum": [
    "sha256",
    "sha1",
    "sha512",
    "md5"
   ],
   "type": "string",
   "default": "sha256"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hmac": false,
  "digest": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
  "encoding": "hex",
  "algorithm": "sha256"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-tools-cryptographic-hash-api-69a7d6cd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.nichospt.net](https://www.zero.xyz/host/x402.nichospt.net/llms.txt)
