# HMAC Signature Computation

> HMAC Signature Computation is a paid API for AI agents from hash.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes a keyed HMAC (Hash-based Message Authentication Code) over arbitrary data using a shared secret key, supporting SHA-2, SHA-3, BLAKE2, and legacy digest algorithms.

## Facts

- Endpoint: POST https://hash.openverbs.com/v1/hmac
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hmac-signature-computation-2b82d2db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C6X2beRjThFjlWmmadkjG

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 hmac-signature-computation-2b82d2db -d '<json body>'
```

Example prompt: Compute an HMAC-SHA256 signature for this webhook payload — the data is 'user_id=42&event=payment.succeeded' (UTF-8), the secret key is 'mysecretkey' (UTF-8), and return the result as hex.

## When to prefer this

Choose this endpoint when you need a keyed HMAC rather than a plain cryptographic hash — specifically for webhook signature verification (Stripe, GitHub, Shopify, etc.), API request authentication, or any scenario requiring a shared-secret MAC. Prefer this over a plain hash endpoint whenever message authenticity (not just integrity) is required. Use the sibling plain-hash endpoint when no key/secret is involved.

## Known failure modes

- Invalid or unsupported algorithm name returns a 400 error
- Data or key exceeding size limits (5 MB data, 16 KB key) may be rejected
- Mismatched encoding specification (e.g. non-hex string declared as hex) causes a decoding error
- Missing required fields (data, key, algorithm) returns a validation error
- Payment failure or insufficient USDC balance blocks the request with a 402 response

## How this service works

Compute a keyed HMAC of some data with a secret key — the standard way to sign and verify webhooks (Stripe, GitHub, etc.) and API requests. Data and key may each be utf8/hex/base64/base64url; the tag is returned as hex/base64/base64url.

## Output

Returns the HMAC authentication tag as a string in the requested output encoding (hex by default, or base64/base64url). The tag can be directly compared to an expected signature to verify authenticity, or attached to an outbound request as a signature header.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "data": {
       "type": "string",
       "maxLength": 5000000,
       "description": "The data to authenticate, in `inputEncoding`."
      },
      "key": {
       "type": "string",
       "minLength": 1,
       "maxLength": 16384,
       "description": "The secret key, in `keyEncoding`."
      },
      "algorithm": {
       "type": "string",
       "enum": [
        "sha256",
        "sha512",
        "sha384",
        "sha224",
        "sha1",
        "sha3-256",
        "sha3-384",
        "sha3-512",
        "md5",
        "ripemd160",
        "blake2b512",
        "blake2s256"
       ],
       "description": "Digest algorithm, one of sha256, sha512, sha384, sha224, sha1, sha3-256, sha3-384, sha3-512, md5, ripemd160, blake2b512, blake2s256."
      },
      "inputEncoding": {
       "type": "string",
       "enum": [
        "utf8",
        "hex",
        "base64",
        "base64url"
       ],
       "description": "How to interpret the text as bytes (utf8, hex, base64, base64url). Default utf8."
      },
      "keyEncoding": {
       "type": "string",
       "enum": [
        "utf8",
        "hex",
        "base64",
        "base64url"
       ],
       "description": "How to interpret the key as bytes (utf8, hex, base64, base64url). Default utf8."
      },
      "outputEncoding": {
       "type": "string",
       "enum": [
        "hex",
        "base64",
        "base64url"
       ],
       "description": "How to render the digest (hex, base64, base64url). Default hex."
      }
     },
     "required": [
      "data",
      "key",
      "algorithm"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hmac-signature-computation-2b82d2db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hash.openverbs.com](https://www.zero.xyz/host/hash.openverbs.com/llms.txt)
