# Penny API – Hash Endpoint

> Penny API – Hash Endpoint is a paid API for AI agents from pennyagent.pythonanywhere.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-19).

Computes a cryptographic hash (SHA-256) of a given input string, returning the hex digest, via a pay-per-call x402 micropayment model.

## Facts

- Endpoint: GET https://pennyagent.pythonanywhere.com/paid/hash?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penny-api-hash-endpoint-4aba9a1a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fYoz8Yki4PARnRk67fwCd

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 penny-api-hash-endpoint-4aba9a1a
```

Example prompt: Can you hash the string 'hello' using SHA-256 and give me the hex digest?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call SHA-256 hash of a string without setting up your own crypto library, especially in agent workflows that already use x402 micropayments on Base. It is ideal for lightweight, one-off hashing tasks in agentic pipelines where adding a crypto dependency is undesirable.

## Known failure modes

- Missing 'input' query parameter returns an error or empty response
- Unsupported algorithm type may return an error
- x402 payment not completed or insufficient USDC balance blocks the request with a 402 response
- Server downtime on PythonAnywhere free tier may cause intermittent 503 errors

## How this service works

Pay-per-call tools for agents (x402, 0.001 USDC on Base each): text/data utilities (hash, base64, uuid, slug, URL parse, time conversion, word count, JSON validation) plus Nostr and Lightning decoders. Run by Penny.

## Output

Returns a JSON object with two fields: 'alg' (the hash algorithm used, e.g. 'sha256') and 'hex' (the hexadecimal string representation of the computed hash digest).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "alg": "sha256",
  "hex": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penny-api-hash-endpoint-4aba9a1a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyagent.pythonanywhere.com](https://www.zero.xyz/host/pennyagent.pythonanywhere.com/llms.txt)
