# Coinlight Hash

> Coinlight Hash is a paid API for AI agents from coinlight-app.vercel.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-29).

Hashes a UTF-8 string using sha256, sha512, sha1, or keccak256 and returns both hex and base64 encoded digests.

## Facts

- Endpoint: GET https://coinlight-app.vercel.app/p/hash?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coinlight-hash-5e1261e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EfI5VMICRW1GyICXikJG5

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 coinlight-hash-5e1261e0
```

Example prompt: Hash the string 'hello world' using sha256 and give me both the hex and base64 outputs.

## When to prefer this

Choose this endpoint when you need a quick, serverless hash of a UTF-8 string across common algorithms (sha256, sha512, sha1, keccak256) with both hex and base64 output in a single call — especially useful for idempotency keys, on-chain commitments, and integrity checks without setting up local crypto libraries.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Invalid algorithm value (not one of sha256, sha512, sha1, keccak256) returns an error
- Empty string input may produce a valid hash of empty input
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Coinlight charges USDC per API call with the x402 protocol on Solana and Base.

## Output

A JSON response containing the hex-encoded and base64-encoded digest of the input text computed with the specified algorithm (sha256, sha512, sha1, or keccak256). Defaults to sha256 if no algorithm is specified.

## 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"
    },
    "queryParams": {
     "type": "object",
     "examples": [
      {
       "algo": "sha256",
       "text": "hello"
      }
     ],
     "required": [
      "text"
     ],
     "properties": {
      "algo": {
       "enum": [
        "sha256",
        "sha512",
        "sha1",
        "keccak256"
       ],
       "type": "string",
       "description": "Algorithm. Default sha256."
      },
      "text": {
       "type": "string",
       "description": "Text to hash (UTF-8)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "endpoint": "Hash text"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coinlight-hash-5e1261e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from coinlight-app.vercel.app](https://www.zero.xyz/host/coinlight-app.vercel.app/llms.txt)
