# Swift Bot Labs Toolbox – Hash

> Swift Bot Labs Toolbox – Hash is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Computes one or all cryptographic hash digests (MD5 through BLAKE3/Keccak256) for a given data string, with configurable input and output encodings.

## Facts

- Endpoint: POST https://x402-toolbox.swiftbotlab.workers.dev/v1/hash?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-hash-43c41a10
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I0Vb-XnfxAKrcoI_j6NzS

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 swift-bot-labs-toolbox-hash-43c41a10 -d '<json body>'
```

Example prompt: Hash the UTF-8 string 'hello' using all available algorithms and give me the results in hex — I want sha256, keccak256, and everything else at once.

## When to prefer this

Choose this endpoint when you need cryptographic hashes without setting up a server-side library, especially for blockchain-adjacent workflows (keccak256, ripemd160) or when you need all common algorithms in one call. The pay-per-call x402 model means no account setup is required, making it ideal for sporadic or automated agent workflows. Prefer it over general-purpose compute endpoints when you specifically need deterministic, well-specified hash outputs with encoding flexibility.

## Known failure modes

- Input data exceeds 1 MB maxLength limit — request rejected
- Unsupported algorithm or encoding enum value — validation error
- Malformed base64 or hex input when inputEncoding is set accordingly — decoding error
- Payment not provided or insufficient USDC — 402 Payment Required response
- Empty data field — may return zero-byte hashes or validation error

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok:true, the tool name 'hash', and a result object containing the byte length of the input and a 'hashes' map of algorithm names to their digest strings. When algorithm is 'all', every supported algorithm is included in the map.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "maxLength": 1048576
  },
  "algorithm": {
   "enum": [
    "all",
    "md5",
    "sha1",
    "sha224",
    "sha256",
    "sha384",
    "sha512",
    "sha3-256",
    "sha3-512",
    "keccak256",
    "ripemd160",
    "blake2b-512",
    "blake2b-256",
    "blake2s-256",
    "blake3"
   ],
   "type": "string",
   "default": "sha256"
  },
  "inputEncoding": {
   "enum": [
    "utf8",
    "hex",
    "base64",
    "base58"
   ],
   "type": "string",
   "default": "utf8"
  },
  "outputEncoding": {
   "enum": [
    "hex",
    "base64"
   ],
   "type": "string",
   "default": "hex"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "hash",
  "result": {
   "bytes": 5,
   "hashes": {
    "sha256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
    "keccak256": "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-hash-43c41a10/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
