{"openapi":"3.1.0","info":{"title":"Hash Encoding Direct Credits API","version":"0.2.0","description":"Deterministic hash/encoding utilities funded by direct Base USDC credit purchases, with a self-service browser purchase flow. Not x402."},"servers":[{"url":"https://hash-encoding-001d.qqqa16521-dce.workers.dev"}],"components":{"securitySchemes":{"bearerCreditToken":{"type":"http","scheme":"bearer","description":"One-time-issued API credit token returned by /credits/redeem."}}},"paths":{"/health":{"get":{"summary":"Health check","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/payment-info":{"get":{"summary":"Machine-readable payment information","responses":{"200":{"description":"Payment instructions","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/buy":{"get":{"summary":"Self-service browser purchase and redemption page","description":"No third-party scripts. Uses an injected EIP-1193 wallet; the buyer sends USDC and pays gas.","responses":{"200":{"description":"Purchase UI"}}}},"/credits/payment-status":{"post":{"summary":"Check whether an exact Base USDC package payment is safely redeemable","description":"Read-only finality probe. Does not consume a challenge or issue credits.","responses":{"200":{"description":"ready, pending, or invalid","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/challenge":{"post":{"summary":"Create a single-use redemption challenge for a payment transaction","responses":{"200":{"description":"Challenge","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/redeem":{"post":{"summary":"Redeem a verified Base USDC payment for 100 credits","responses":{"200":{"description":"Credit token (shown once)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/credits/balance":{"get":{"summary":"Get credit balance","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/hash/sha256":{"post":{"summary":"SHA-256; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Digest","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/hash/sha512":{"post":{"summary":"SHA-512; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Digest","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/hmac/sha256":{"post":{"summary":"HMAC-SHA256; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"HMAC","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/base64/encode":{"post":{"summary":"Base64 encode; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Encoded","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/base64/decode":{"post":{"summary":"Base64 decode; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Decoded","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/jwt/decode":{"post":{"summary":"JWT decode only; costs 1 credit","security":[{"bearerCreditToken":[]}],"responses":{"200":{"description":"Decoded JWT","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/mcp":{"post":{"summary":"MCP Streamable HTTP endpoint","description":"Configure optional Authorization bearer header in the MCP client for paid tools.","responses":{"200":{"description":"MCP response"}}}}},"x-payment":{"scheme":"direct-usdc-credits-v1","network":"eip155:8453","chainId":8453,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","receiver":"0x1B051B7193DA2781f23AEe3E91CbF32F8883cD94","amountAtomic":"100000","credits":100,"buyerPaysGas":true,"facilitatorRequired":false,"x402Compatible":false,"purchasePath":"/buy"}}