# Compute API – Hash

> Compute API – Hash is a paid API for AI agents from compute-api-production-245d.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Hashes a given string using SHA-256, SHA-512, or MD5 and returns the resulting hash value, paid per call via x402 micropayments.

## Facts

- Endpoint: POST https://compute-api-production-245d.up.railway.app/hash?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compute-api-hash-15d12038
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Nup0uuPA9TI9txN-KJR1D

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 compute-api-hash-15d12038 -d '<json body>'
```

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

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call cryptographic hash computation without running local code or setting up a library. Ideal for AI agents operating in sandboxed environments where executing native crypto functions is unavailable, or when you want an auditable external hash computation billed via x402 micropayments on Base.

## Known failure modes

- Missing required 'text' field returns a 400 or validation error
- Invalid algorithm value outside the enum (sha256, sha512, md5) returns a validation error
- Empty string input may be accepted but yields a hash of the empty string
- Payment failure via x402 (insufficient USDC balance or missing payment header) returns 402 Payment Required
- Network timeout or service unavailability on Railway returns 5xx

## How this service works

Pure computation endpoints paid per call via x402 ($0.001 USDC on Base).

## Output

Returns a JSON object with a single 'hash' field containing the hex-encoded digest of the input string produced by the specified algorithm (sha256, sha512, or md5). If no algorithm is specified, sha256 is the default.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string",
   "description": "String to hash"
  },
  "algorithm": {
   "enum": [
    "sha256",
    "sha512",
    "md5"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/compute-api-hash-15d12038/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from compute-api-production-245d.up.railway.app](https://www.zero.xyz/host/compute-api-production-245d.up.railway.app/llms.txt)
