Cache Key Plan
Canonicalize an HTTP request envelope and return a deterministic SHA-256 cache key for agent and API workflows.
1 credit per call · $0.001 USDC with x402
Sample input
{
"method": "POST",
"url": "https://api.example.com/v1?q=1",
"headers": {
"accept": "application/json"
},
"body": {
"x": 1
}
}Worked sample output
{
"ok": true,
"mode": "cache_key_plan",
"cache_key": "sha256:7127e309105a407c9a0e4cbe8d6ba0909ad1e198a43c69155deb74fbfb8ce128",
"canonical": {
"method": "POST",
"url": "https://api.example.com/v1?q=1",
"headers": {
"accept": "application/json"
},
"body": {
"x": 1
}
}
}Worked example using published sample data only. Own-data execution is paid.
Connect in curl
Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.
curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/cache-key-plan' \
-H "Authorization: Bearer $BOUNTY_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: workflow-request-001' \
-H 'X-Max-Credits: 1' \
--data '{"method":"POST","url":"https://api.example.com/v1?q=1","headers":{"accept":"application/json"},"body":{"x":1}}'Connect in n8n
Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.
Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/cache-key-plan. Send JSON and these headers; store the Bearer token as a private credential.
{
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_PRIVATE_API_KEY",
"Content-Type": "application/json",
"Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
"X-Max-Credits": "1"
},
"body": {
"method": "POST",
"url": "https://api.example.com/v1?q=1",
"headers": {
"accept": "application/json"
},
"body": {
"x": 1
}
}
}Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe