# hash-hmac

> hash-hmac is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Compute an HMAC (MD5, SHA-1, SHA-256, or SHA-512) of a text string using a secret key

## Facts

- Endpoint: GET https://x402.agentindex.world/hash/hmac?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hash-hmac-45e70908
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pdPiJ8BSOrDLFPP78eZK-

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 hash-hmac-45e70908
```

Example prompt: Compute an HMAC-SHA256 of the text 'order-id:12345;amount:99.99' using the secret key 'mysecretkey123'.

## When to prefer this

Use this endpoint when you need a quick, stateless HMAC computation without setting up a local crypto library — ideal for serverless agents, quick webhook signature generation, or environments where cryptographic primitives aren't readily available. Supports four common algorithms in a single API call.

## Known failure modes

- Missing required 'key' or 'text' parameter returns an error
- Invalid algorithm value not matching md5|sha1|sha256|sha512 pattern returns validation error
- Empty key or text may produce unexpected or rejected results
- Network timeout or payment failure (x402) prevents call completion

## How this service works

Compute an HMAC (MD5, SHA-1, SHA-256 or SHA-512) of text with a given key.

## Output

Returns the HMAC digest of the input text computed with the specified algorithm (MD5, SHA-1, SHA-256, or SHA-512) and the provided secret key, typically as a hex-encoded string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string",
   "title": "Key"
  },
  "text": {
   "type": "string",
   "title": "Text"
  },
  "algorithm": {
   "type": "string",
   "title": "Algorithm",
   "default": "sha256",
   "pattern": "^(md5|sha1|sha256|sha512)$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex_digest": "8b5f48702995c1598c573db1e21866a9b825d4a794d169d7060a03605796360b"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hash-hmac-45e70908/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
