# Proofwork x402 Encoding Tools API

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

Performs cryptographic hashing (SHA-256, SHA-512) and Base64 encoding/decoding on arbitrary string input, payable per-request via x402 on Base.

## Facts

- Endpoint: GET https://proofwork-the402-webhook.phase-voice.workers.dev/v1/encoding-tools
- Price: $0.01/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-encoding-tools-api-25a54115
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OVITbB5n_M0v0E5shtMe6

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-encoding-tools-api-25a54115
```

Example prompt: Can you compute the SHA-256 hash of the string 'hello'?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use cryptographic hashing or base64 encoding/decoding utility without setting up server infrastructure. It is particularly useful in agent workflows where you need on-demand, trustless data transformation billed in USDC via x402 on Base, and when you want a simple auditable evidence trail (report metadata) alongside the encoding result.

## Known failure modes

- Missing required 'value' query parameter returns an error
- Missing required 'operation' parameter returns an error
- Invalid operation enum value (not sha256/sha512/base64_encode/base64_decode) returns an error
- Input exceeding 12000 character limit is rejected
- Payment failure via x402 (insufficient USDC balance) blocks the request
- Empty string input (0 bytes) may return trivial/empty output

## How this service works

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

## Output

Returns a JSON object containing the computed output string (hex-encoded for hashes, string for base64 operations), the operation name, input and output byte counts, encoding format used, content type, and a report label ('encoding_tools').

## 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": [
      "operation",
      "value"
     ],
     "properties": {
      "value": {
       "type": "string",
       "maxLength": 12000,
       "minLength": 0
      },
      "operation": {
       "enum": [
        "sha256",
        "sha512",
        "base64_encode",
        "base64_decode"
       ],
       "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": {
  "output": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
  "report": "encoding_tools",
  "encoding": "hex",
  "operation": "sha256",
  "input_bytes": 5,
  "content_type": "text/plain",
  "output_bytes": 64
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/proofwork-x402-encoding-tools-api-25a54115/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)
