# HMAC Calculator API

> HMAC Calculator API is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Computes an HMAC (Hash-based Message Authentication Code) for a given message and secret key using a specified hash algorithm (SHA-256, SHA-512, SHA-1, or MD5).

## Facts

- Endpoint: GET https://api.x402node.dev/crypto/hmac
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-da5f7316
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mIBXcePdYqc0rbgb_pPRh

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 api-x402node-dev-da5f7316
```

Example prompt: Compute the HMAC-SHA256 of the message 'order_id=12345&amount=99.99' using the secret key 'my-webhook-secret-key' so I can verify this webhook payload.

## When to prefer this

Use this endpoint when you need to compute or verify an HMAC for webhook signature validation, API request signing, or any scenario requiring keyed message authentication. Prefer over a plain hash endpoint when a secret key is required to authenticate the origin of a message.

## Known failure modes

- Missing message or secret key returns 400 error
- Invalid or unsupported algorithm name returns 400 error
- Empty message or empty secret key may return error or zero-length digest
- Network timeout or service unavailability returns 5xx error

## How this service works

HMAC calculator, HMAC-SHA256 SHA512 SHA1 MD5, message authentication code, hash with secret, signed hash, API request signing, webhook signature, JWT signature. Compute HMAC of a message with a secret key using any standard hash algorithm. Accepts payment on Base or Solana — either network works.

## Output

Returns the HMAC digest as a hex-encoded string computed from the provided message and secret key using the specified hash algorithm (SHA-256, SHA-512, SHA-1, or MD5).

## 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",
     "required": [
      "secret"
     ],
     "properties": {
      "algo": {
       "type": "string",
       "description": "Algo (optional)"
      },
      "secret": {
       "type": "string",
       "description": "Secret (required)"
      },
      "message": {
       "type": "string",
       "description": "Message (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-da5f7316/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
