# Relaystation HMAC Compute

> Relaystation HMAC Compute is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Computes a keyed HMAC digest (SHA-256, SHA-512, SHA-1, or MD5) from a secret key and data payload, without logging the key.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/utils/hmac
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-hmac-compute-e48ece10
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_apwfn-OohIsndmgceWcAo

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 relaystation-hmac-compute-e48ece10 -d '<json body>'
```

Example prompt: Compute an HMAC-SHA256 for the string 'order-12345-confirmed' using the secret key 'my-shared-secret-99' and give me the hex digest.

## When to prefer this

Choose this endpoint when you need a quick, serverless, keyed HMAC computation without setting up cryptographic libraries or infrastructure, especially when your runtime environment lacks native crypto support. Ideal for agents that need to sign webhook payloads, authenticate API requests, or verify data integrity on the fly. The key-never-logged guarantee makes it suitable for sensitive secrets that must not appear in server logs.

## Known failure modes

- Unsupported algorithm value returns an error — must be sha256, sha512, sha1, or md5
- Missing key or data fields cause a 400 bad request
- Empty string for key or data may produce unexpected but valid HMAC output
- Payment failure (insufficient x402 credits) blocks the request before computation

## How this service works

$0.0002/MB. Compute a keyed HMAC (SHA-256/512/1, MD5) — the key is never logged. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns a JSON object containing the algorithm name used and the computed HMAC as a lowercase hex string. Example: {"algo": "sha256", "hmac": "d889c99fa478f0ca3ff868a586062f7f9a36031c61fa36c7128a4d8f853ce8f0"}. The secret key is never logged or retained.

## Example request

```json
{
 "input": {
  "body": {
   "key": "test-secret-key-12345",
   "algo": "sha256",
   "data": "test-data-to-hash"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "key": {
       "type": "string",
       "maxLength": 8192,
       "minLength": 1,
       "description": "The HMAC secret — never logged."
      },
      "algo": {
       "enum": [
        "sha256",
        "sha512",
        "sha1",
        "md5"
       ],
       "type": "string"
      },
      "data": {
       "type": "string",
       "minLength": 1
      },
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-hmac-compute-e48ece10/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
