{"openapi":"3.1.0","info":{"title":"Cache LRU Trace","version":"1.0.0","description":"Replay size-weighted LRU cache access, including oversize bypasses and evictions, to estimate cache hit and byte-hit counts.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/cache-lru-trace/v1/check":{"post":{"operationId":"cache_lru_trace","summary":"Replay size-weighted LRU cache access, including oversize bypasses and evictions, to estimate cache hit and byte-hit counts.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capacity_bytes":{"type":"integer","minimum":1,"maximum":1000000000000},"requests":{"minItems":1,"maxItems":400,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"bytes":{"type":"integer","minimum":1,"maximum":1000000000000}},"required":["key","bytes"],"additionalProperties":false}}},"required":["capacity_bytes","requests"],"additionalProperties":false},"example":{"capacity_bytes":10,"requests":[{"key":"a","bytes":4},{"key":"b","bytes":6},{"key":"a","bytes":4},{"key":"c","bytes":5},{"key":"skip","bytes":12}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"hits":1,"misses":4,"hit_bytes":4,"requested_bytes":31,"evicted":["b"],"bypassed":["skip"],"ending_bytes":9,"least_to_most_recent":["a","c"]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}