{"openapi":"3.0.3","info":{"title":"x402-hash-api","version":"1.1.0","description":"SHA-256 hash / sha256 / cryptographic hash for AI agents. Also HMAC, checksum helpers, JWT decode, PBKDF2, UUID. Pay-per-call USDC on Base + Solana via x402."},"servers":[{"url":"https://x402-hash-api.vercel.app"}],"paths":{"/api/health":{"get":{"summary":"Liveness + route list","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/x402":{"get":{"summary":"x402 resource catalog","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/x402-service.json":{"get":{"summary":"true402 service manifest","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"summary":"Agent-readable capability sheet","responses":{"200":{"description":"text/plain capability sheet"}}}},"/openapi.json":{"get":{"summary":"OpenAPI 3 with POST JSON bodies","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/sha256":{"post":{"operationId":"sha256","summary":"SHA-256 hash — compute a SHA-256 hex digest of a text string. Keywords: sha256, sha256 hash, cryptographic hash, checksum.","description":"Price $0.001 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"payload to hash"},"encoding":{"type":"string","enum":["utf8","hex","base64"],"description":"utf8 | hex | base64"}},"required":["data"]},"example":{"data":"hello","encoding":"utf8"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/sha256":{"post":{"operationId":"sha256","summary":"SHA-256 hash — compute a SHA-256 hex digest of a text string. Keywords: sha256, sha256 hash, cryptographic hash, checksum.","description":"Price $0.001 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"payload to hash"},"encoding":{"type":"string","enum":["utf8","hex","base64"],"description":"utf8 | hex | base64"}},"required":["data"]},"example":{"data":"hello","encoding":"utf8"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/hash":{"post":{"operationId":"hash","summary":"Cryptographic hash of a text string. Algorithms: sha256 (default), sha512. Returns hex digest. Use for checksums and content addressing.","description":"Price $0.001 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"algorithm":{"type":"string","enum":["sha256","sha512"],"description":"sha256 or sha512"},"data":{"type":"string","description":"payload to hash"},"encoding":{"type":"string","enum":["utf8","hex","base64"],"description":"utf8 | hex | base64"}},"required":["algorithm","data"]},"example":{"algorithm":"sha256","data":"hello","encoding":"utf8"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/hmac":{"post":{"operationId":"hmac","summary":"HMAC-SHA256 / hmac-sha256 keyed message authentication. Also hmac-sha512. Returns hex digest.","description":"Price $0.002 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"algorithm":{"type":"string","enum":["sha256","sha512"]},"key":{"type":"string"},"data":{"type":"string"},"encoding":{"type":"string","enum":["utf8","hex","base64"]}},"required":["algorithm","key","data"]},"example":{"algorithm":"sha256","key":"secret","data":"hello","encoding":"utf8"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/base64":{"post":{"operationId":"base64","summary":"Base64 encode or decode a UTF-8 string.","description":"Price $0.001 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"op":{"type":"string","enum":["encode","decode"],"description":"encode or decode"},"data":{"type":"string"}},"required":["op","data"]},"example":{"op":"encode","data":"hello"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/jwt-decode":{"post":{"operationId":"jwt-decode","summary":"JWT decode without verification — inspect header + payload (jwt-decode).","description":"Price $0.002 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"example":{"token":"eyJhbGciOiJub25lIn0.eyJzdWIiOiIxIn0."}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/pbkdf2":{"post":{"operationId":"pbkdf2","summary":"PBKDF2 key derivation / password hashing KDF (sha256 or sha512).","description":"Price $0.005 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"salt":{"type":"string"},"iterations":{"type":"number"},"keylen":{"type":"number"},"digest":{"type":"string","enum":["sha256","sha512"]}},"required":["password","salt"]},"example":{"password":"secret","salt":"NaCl","iterations":100000,"keylen":32,"digest":"sha256"}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}},"/api/v1/uuid":{"post":{"operationId":"uuid","summary":"Generate UUID v4 values (random uuid generator).","description":"Price $0.001 USDC on Base or Solana. Unpaid → HTTP 402 + PAYMENT-REQUIRED (x402 v2 dual-rail).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","description":"UUID version (only 4)"},"count":{"type":"number","description":"how many UUIDs (1..20)"}},"required":[]},"example":{"version":4,"count":1}}}},"responses":{"200":{"description":"Paid success","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required (x402 v2 dual-rail)"}}}}}}