# x402 Hash API

> x402 Hash API is a paid API for AI agents from x402-hash-api.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes SHA-256 or SHA-512 cryptographic hash digests of input data with configurable encoding

## Facts

- Endpoint: POST https://x402-hash-api.vercel.app/api/v1/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/x402-hash-api-198996b1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Kcqlk1s07wQekKZe_PX2i

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-hash-api-198996b1 -d '<json body>'
```

Example prompt: Hash the string 'hello world' using SHA-256 with utf8 encoding and give me the digest.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call cryptographic hashing service without spinning up infrastructure. It is ideal for agents that need occasional SHA-256 or SHA-512 digests on-demand, support multiple input encodings, and want a minimal-cost ($0.001 USDC) serverless option without maintaining a local hashing library.

## Known failure modes

- Missing or empty 'data' field returns a validation error
- Unsupported algorithm value (not sha256 or sha512) returns an error
- Invalid encoding value (not utf8, hex, or base64) returns a bad request response
- Malformed base64 or hex input string causes a decoding error
- Oversized payloads may be rejected with a request too large error

## How this service works

SHA-256 or SHA-512 digest of input bytes

## Output

Returns the cryptographic hash digest of the submitted input as a hex string, computed using either SHA-256 or SHA-512 depending on the selected algorithm and input encoding (utf8, hex, or base64).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "description": "payload to hash"
  },
  "encoding": {
   "type": "string",
   "description": "utf8 | hex | base64"
  },
  "algorithm": {
   "type": "string",
   "description": "sha256 or sha512"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hash-api-198996b1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-hash-api.vercel.app](https://www.zero.xyz/host/x402-hash-api.vercel.app/llms.txt)
