# x402 Hash API – SHA-256

> x402 Hash API – SHA-256 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-10-01).

Computes a SHA-256 cryptographic hash of a given string payload, returning the hex digest, via a pay-per-call API using USDC on Base

## Facts

- Endpoint: POST https://x402-hash-api.vercel.app/sha256?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-hash-api-sha-256-7f066d6b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h9cODx5SLgD1KWTbVp22L

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-sha-256-7f066d6b -d '<json body>'
```

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

## When to prefer this

Choose this endpoint when you need a quick, deterministic SHA-256 hash of a string and are operating in an x402 micropayment-enabled agent workflow on Base. It is ideal when you cannot or do not want to run local crypto libraries, when you need a trustless third-party hash computation, or when your agent stack is already wired for x402 pay-per-call patterns. Prefer local crypto libraries for high-volume or latency-sensitive use cases.

## Known failure modes

- Missing 'data' field in request body returns an error
- Invalid encoding value (not utf8/hex/base64) may cause encoding errors or unexpected output
- Payment failure via x402 protocol (insufficient USDC balance or network issues on Base) prevents request from completing
- Very large payloads may be rejected or time out depending on server limits

## How this service works

Pay-per-call hashing and encoding for AI agents (USDC on Base)

## Output

A JSON object containing a 'digest' field (the hex-encoded SHA-256 hash of the input) and an 'algorithm' field confirming 'sha256'. The digest can be used directly for integrity checking, deduplication, or signing workflows.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "digest": "...",
  "algorithm": "sha256"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hash-api-sha-256-7f066d6b/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)
