# SHA-256 Digest of Text or Raw Bytes

> SHA-256 Digest of Text or Raw Bytes is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the SHA-256 cryptographic hash of a given text string or raw hex-encoded bytes, returning the digest.

## Facts

- Endpoint: POST https://twin.unykorn.org/hash-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/sha-256-digest-of-text-or-raw-bytes-c8976dfc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E4dkbIqui8_R1y3DjIPHk

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 sha-256-digest-of-text-or-raw-bytes-c8976dfc -d '<json body>'
```

Example prompt: Can you compute the SHA-256 hash of the text 'Hello, world!' for me?

## When to prefer this

Choose this endpoint when you need a simple, on-demand SHA-256 hash of a text string or raw hex bytes, especially in blockchain/Web3 contexts where payment receipts and auditability matter. Prefer this over the sibling canonical-digests endpoint when you specifically need only SHA-256 and not sha512-256 or blake2b. Ideal for agents that need to commit data to a smart contract, verify integrity, or generate deterministic content fingerprints.

## Known failure modes

- Input text exceeds 49152 character limit — request rejected
- Malformed hex string (not matching ^0x[0-9a-fA-F]*$) — validation error
- Neither text nor hex param provided — missing input error
- Network or payment failure causing 402 payment required error
- Invalid or insufficient payment — transaction not processed

## How this service works

SHA-256 digest of text or raw bytes — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object containing the SHA-256 digest of the provided input, along with a payment receipt including the transaction hash, amount in USD, and a unique receipt ID, plus a timestamp of when the hash was generated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "hex": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]*$"
    },
    "text": {
     "type": "string",
     "maxLength": 49152
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "hash-sha256",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.001,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sha-256-digest-of-text-or-raw-bytes-c8976dfc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
