# agent402.tools HMAC Signature

> agent402.tools HMAC Signature is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes an HMAC signature of a message using a shared secret key, returning both hex and base64 encodings, with support for SHA-256, SHA-512, and SHA-1 algorithms.

## Facts

- Endpoint: POST https://agent402.tools/api/hmac
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-hmac-signature-06af5b8d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CFc4H47S8_5P_SGt34m-u

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 agent402-tools-hmac-signature-06af5b8d -d '<json body>'
```

Example prompt: Compute an HMAC-SHA256 signature for the message 'order_id=12345&amount=99.99' using the shared secret key 'mysecretkey123' and give me both the hex and base64 outputs.

## When to prefer this

Use this endpoint when you need a quick, pay-per-use HMAC signature computation without setting up a local crypto library, especially useful in agent workflows needing message authentication or webhook signature generation. Prefer this over building custom crypto logic when operating in environments without native crypto support.

## Known failure modes

- Missing required fields (key or text) returns a 400 error
- Message exceeds 100KB limit returns a payload too large error
- Invalid algorithm value (not sha256, sha512, or sha1) returns a validation error
- Payment failure returns a 402 Payment Required response

## How this service works

HMAC signature of a message with a shared key. Algorithms: sha256 (default), sha512, sha1. Returns hex and base64.

## Output

Returns an HMAC signature of the provided message in both hexadecimal and base64 formats, computed using the specified algorithm (sha256, sha512, or sha1) and the shared secret key.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string",
   "description": "Shared secret key"
  },
  "algo": {
   "type": "string",
   "description": "sha256 | sha512 | sha1"
  },
  "text": {
   "type": "string",
   "description": "Message to sign (max 100KB)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "f7bc…",
  "algo": "sha256",
  "base64": "97w…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-hmac-signature-06af5b8d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
