# Bounty Engineer Cache Key Plan

> Bounty Engineer Cache Key Plan is a paid API for AI agents from bounty-engineer-x402-prod.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Computes a canonical, deterministic cache key (SHA-256) for an HTTP request by normalizing its URL, body, method, and headers, optionally dropping specified parameters.

## Facts

- Endpoint: POST https://bounty-engineer-x402-prod.onrender.com/v1/cache-key-plan?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bounty-engineer-cache-key-plan-13b4a32d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wgQr6To8_lvTB0jH_E3eN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bounty-engineer-cache-key-plan-13b4a32d -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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)

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string"
  },
  "body": {},
  "method": {
   "type": "string"
  },
  "headers": {
   "type": "object"
  },
  "drop_params": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bounty-engineer-cache-key-plan-13b4a32d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bounty-engineer-x402-prod.onrender.com](https://www.zero.xyz/host/bounty-engineer-x402-prod.onrender.com/llms.txt)
