{"openapi":"3.1.0","info":{"title":"RubyHash Agent API","version":"0.3.0","description":"Deterministic Ruby hash diffing and conversion for agents and CI. From rubyhash.dev. Single calls free within a daily fair-use quota, then payable via x402 (USDC on Base). /batch always paid."},"servers":[{"url":"https://dcwupdtclrmraxmqblou.supabase.co/functions/v1/rubyhash-api"}],"paths":{"/diff":{"post":{"operationId":"diffRubyHashes","summary":"Diff two Ruby hashes (free tier, then x402)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected":{"type":"string"},"actual":{"type":"string"},"raw":{"type":"string"}}}}}},"responses":{"200":{"description":"Structured diff report"},"400":{"description":"Parse error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"402":{"description":"Free quota exhausted, pay via x402"}}}},"/convert":{"post":{"operationId":"rubyHashToJson","summary":"Convert a Ruby hash literal to sorted JSON (free tier, then x402)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hash"],"properties":{"hash":{"type":"string"},"sort_keys":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"JSON value"},"400":{"description":"Parse error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"402":{"description":"Free quota exhausted, pay via x402"}}}},"/batch":{"post":{"operationId":"batchDiffRubyHashes","summary":"Batch diff up to 100 hash pairs (always paid via x402)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pairs"],"properties":{"pairs":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"expected":{"type":"string"},"actual":{"type":"string"},"raw":{"type":"string"}}}},"include_json":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Array of diff reports, in input order"},"400":{"description":"Parse error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"402":{"description":"Payment required (x402)"}}}}}}