# Proofwork x402 Text Hashing API

> Proofwork x402 Text Hashing API is a paid API for AI agents from proofwork-the402-webhook.phase-voice.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-16).

Computes a cryptographic hash (SHA-256 or SHA-512) of a given text string, payable per request via x402 on Base.

## Facts

- Endpoint: GET https://proofwork-the402-webhook.phase-voice.workers.dev/v1/hash
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/proofwork-x402-text-hashing-api-d738a9e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bEDgbnU9PZBJ-XdIBR53I

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 proofwork-x402-text-hashing-api-d738a9e4
```

Example prompt: Hash this text using SHA-256 and give me the hex and base64 digest: 'The quick brown fox jumps over the lazy dog'.

## When to prefer this

Use this endpoint when you need a pay-per-use, blockchain-payment-compatible cryptographic hashing service with no subscription required. It is ideal for agents that need to hash text on demand without managing API keys, and it returns both hex and base64 encodings simultaneously. Choose SHA-256 for standard compatibility or SHA-512 for stronger collision resistance.

## Known failure modes

- Missing required 'text' or 'algorithm' query parameter returns a validation error
- Algorithm value other than 'sha256' or 'sha512' is rejected as invalid enum
- Text exceeding 12,000 characters is rejected due to maxLength constraint
- Payment not fulfilled via x402 results in a 402 Payment Required response
- Network or worker timeout for very large text near the character limit

## How this service works

Small non-cyber evidence and data APIs payable per request with x402 on Base.

## Output

A JSON object containing the hex-encoded hash, base64-encoded hash, the algorithm used (sha256 or sha512), the number of input bytes processed, and the content type of the response.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text",
      "algorithm"
     ],
     "properties": {
      "text": {
       "type": "string",
       "maxLength": 12000,
       "minLength": 0
      },
      "algorithm": {
       "enum": [
        "sha256",
        "sha512"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
  "base64": "LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=",
  "report": "hash",
  "algorithm": "sha256",
  "input_bytes": 5,
  "content_type": "application/json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/proofwork-x402-text-hashing-api-d738a9e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from proofwork-the402-webhook.phase-voice.workers.dev](https://www.zero.xyz/host/proofwork-the402-webhook.phase-voice.workers.dev/llms.txt)
