# SHA-256 Hash API

> SHA-256 Hash API is a paid API for AI agents from api.bakhour.ca, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes a SHA-256 cryptographic hash digest of a given input text string

## Facts

- Endpoint: POST https://api.bakhour.ca/hash/sha256
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sha-256-hash-api-1f0e3cdb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cp0Nb7VgDHJe7qJ4HMGbo

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-hash-api-1f0e3cdb -d '<json body>'
```

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

## When to prefer this

Use this endpoint when you need a simple, deterministic SHA-256 hash of a text string without setting up a local cryptographic library — ideal for AI agents or automated workflows operating in environments where native hashing is unavailable or inconvenient, and where paying $0.001 USDC per call via x402 is acceptable.

## Known failure modes

- Missing or empty 'text' field in request body returns a validation error
- Malformed JSON request body may result in a 400 Bad Request
- Payment failure or insufficient USDC balance returns a 402 Payment Required
- Extremely large input strings may cause timeout or rejection
- Network errors to api.bakhour.ca result in connection failures

## How this service works

Decision-grade security/due-diligence outcome reports ($20-$100) plus deterministic paid utilities ($0.001+) for software agents and automated workflows.

## Output

Returns a JSON object containing the computed SHA-256 hex digest string under the 'digest' key and the algorithm name ('sha256') under the 'algorithm' key. The digest is a deterministic 64-character hexadecimal string unique to the input.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sha-256-hash-api-1f0e3cdb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.bakhour.ca](https://www.zero.xyz/host/api.bakhour.ca/llms.txt)
