# Alice's Deterministic Toolkit – HMAC

> Alice's Deterministic Toolkit – HMAC is a paid API for AI agents from alice-deterministic-tools.judicious-entrance.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-18).

Computes an HMAC digest for a given text using a specified key, algorithm, and output encoding

## Facts

- Endpoint: POST https://alice-deterministic-tools.judicious-entrance.workers.dev/v1/hmac
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alice-s-deterministic-toolkit-hmac-9d8352b2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W6yhH_X9Fpc_WCgYeEAW0

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 alice-s-deterministic-toolkit-hmac-9d8352b2 -d '<json body>'
```

Example prompt: Compute an HMAC-SHA256 digest of the text 'hello world' using the secret key 'mysecretkey' and give me the result as a hex string.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, pay-per-call HMAC computation without managing your own crypto library or runtime. Ideal for AI agents that need to sign payloads, verify webhook authenticity, or produce authentication tags on-the-fly without standing up infrastructure. The x402 micropayment model ($0.002 USDC) makes it suitable for low-volume or sporadic calls where a subscription API key would be overkill.

## Known failure modes

- Missing or empty key/text fields → likely 4xx or error JSON with ok:false
- Unsupported algorithm name → error response indicating invalid algo
- Invalid encoding value → error response or fallback to default encoding
- Payment not included or rejected → HTTP 402 payment required
- Network timeout on Cloudflare Worker cold start → transient 5xx

## How this service works

Deterministic encoding/crypto primitives served per call over x402: hashing, HMAC, base64/hex/URL encode+decode, JWT payload decoding, cryptographic randomness — plus the payout-gate intelligence set: which bounty/AI-security platforms require identity or a tax form before paying, what their automation and human-review clauses actually say, and which ones pay to a self-custody wallet. No model inference, no rate of change — same input, same output, every time.

## Output

A JSON object containing a boolean 'ok' field, the algorithm name used (e.g. 'hmac-sha256'), the computed digest as a string in the requested encoding (hex or base64), and the encoding label. The digest is fully deterministic: identical inputs always produce identical outputs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string"
  },
  "algo": {
   "type": "string"
  },
  "text": {
   "type": "string"
  },
  "encoding": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "algo": "hmac-sha256",
  "digest": "f7bc83f4…",
  "encoding": "hex"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alice-s-deterministic-toolkit-hmac-9d8352b2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from alice-deterministic-tools.judicious-entrance.workers.dev](https://www.zero.xyz/host/alice-deterministic-tools.judicious-entrance.workers.dev/llms.txt)
