{"uid":"cap_wgQr6To8_lvTB0jH_E3eN","slug":"bounty-engineer-cache-key-plan-13b4a32d","name":"Bounty Engineer Cache Key Plan","description":"Machine-buyable infrastructure for autonomous agents: API cost routing, margin optimization, funding-rate data, webpage extraction, result verification, spend controls, retry planning, state, tender search and GitHub bounty intelligence.","url":"https://bounty-engineer-x402-prod.onrender.com/v1/cache-key-plan?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string"},"body":{},"method":{"type":"string"},"headers":{"type":"object"},"drop_params":{"type":"array"}}},"responseSchema":{"type":"json","example":{"ok":true,"mode":"cache_key_plan","cache_key":"sha256:7127e309105a407c9a0e4cbe8d6ba0909ad1e198a43c69155deb74fbfb8ce128","canonical":{"url":"https://api.example.com/v1?q=1","body":{"x":1},"method":"POST","headers":{"accept":"application/json"}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VGwbCvLeyQAsI4keR0VyR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a canonical, deterministic cache key (SHA-256) for an HTTP request by normalizing its URL, body, method, and headers, optionally dropping specified parameters.","exampleAgentPrompt":"Calculate the cache key for a POST request to https://api.example.com/v1?q=1 with body {\"x\":1} and headers {\"accept\":\"application/json\"} — I want to know the canonical SHA-256 hash before I decide whether to make the live call or serve a cached result.","exampleUseCases":[{"title":"Deduplicating agent API calls","prompt":"Before I fire off that POST to the pricing API again, compute the cache key for the request with URL https://api.prices.com/v2/quote, method POST, and body {\"asset\":\"BTC\",\"qty\":10} so I can check if I already have a cached result."},{"title":"Stripping volatile params before caching","prompt":"I need the canonical cache key for a GET request to https://data.example.com/feed?ts=1718000000&page=1 — but drop the 'ts' timestamp parameter so the key stays stable across refreshes."},{"title":"Fingerprinting requests in a retry workflow","prompt":"Generate the SHA-256 cache key for this failed API request so my retry planner can track it: POST to https://api.exchange.com/order with headers {\"content-type\":\"application/json\"} and body {\"side\":\"buy\",\"amount\":500}."}],"resultDescription":"Returns a JSON object with ok=true, mode='cache_key_plan', a sha256: prefixed cache key string, and a canonical sub-object containing the normalized URL, body, method, and headers used to derive the hash.","failureModes":["Missing or malformed URL field returns a validation error","Invalid JSON body causes parsing failure","Unsupported HTTP method may result in an error or unexpected normalization","Network timeout to the Render-hosted service if the instance is cold-starting","drop_params referencing non-existent parameters silently ignored (no error, but key may not match expectations)"],"whenToPreferThis":"Use this endpoint when an autonomous agent needs a deterministic, reproducible fingerprint for an HTTP request — especially before deciding to make a live (paid) API call or serve from cache. It is ideal when you need to normalize requests that may have minor variations (extra headers, volatile timestamps) into a stable key. Prefer it over ad-hoc hashing logic when you want consistent canonicalization rules and SHA-256 output compatible with a broader Bounty Engineer caching/routing pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:47:23.390Z","isFirstParty":false,"canonicalSlug":"bounty-engineer-cache-key-plan-13b4a32d"}