{"uid":"cap_apwfn-OohIsndmgceWcAo","slug":"relaystation-hmac-compute-e48ece10","name":"Relaystation HMAC Compute","description":"$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","url":"https://api.relaystation.ai/v1/utils/hmac","method":"POST","headers":{},"bodySchema":{"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"}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"key":"test-secret-key-12345","algo":"sha256","data":"test-data-to-hash"},"type":"http","method":"POST","bodyType":"json"}},"response":{"algo":"sha256","hmac":"d889c99fa478f0ca3ff868a586062f7f9a36031c61fa36c7128a4d8f853ce8f0"}},"exampleRequest":{"key":"test-secret-key-12345","algo":"sha256","data":"test-data-to-hash"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LoogsTCkGoT3ED1Nxgx8Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a keyed HMAC digest (SHA-256, SHA-512, SHA-1, or MD5) from a secret key and data payload, without logging the key.","exampleAgentPrompt":"Compute an HMAC-SHA256 for the string 'order-12345-confirmed' using the secret key 'my-shared-secret-99' and give me the hex digest.","exampleUseCases":[{"title":"Webhook signature verification","prompt":"I need to sign the webhook payload '{\"event\":\"payment.completed\",\"amount\":50}' with HMAC-SHA256 using my secret 'wh-secret-abc123' so I can attach it to the outgoing request header."},{"title":"API request authentication","prompt":"Generate an HMAC-SHA512 digest for the string 'GET /api/orders/789 timestamp=1720000000' using the key 'api-key-secret-xyz' so I can authenticate the request to our partner's API."},{"title":"Data integrity checksum","prompt":"Create a keyed MD5 HMAC for the text 'user-export-2024-07-01.csv' with the secret 'integrity-check-key' so I can verify this file hasn't been tampered with later."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:49:22.388Z","isFirstParty":false}