{"ok":true,"tool":"agent-run-cost-audit","name":"Agent Run Cost Audit — Repeated Paid Calls & Budget Leaks","calls":100,"credits_per_call":4,"required_credits":400,"x402":{"price_per_call":"$0.035","currency":"USDC","network":"Base + Solana","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"endpoint":"https://bounty-engineer-x402-prod.onrender.com/v1/agent-run-cost-audit"},"paypal":{"recommended_one_time_pack":{"id":"starter","amount_usd":"4.99","credits":500,"calls_covered":125,"checkout":"https://bounty-engineer-x402-prod.onrender.com/paypal/start?product=starter&utm_source=workflows"},"note":"Credits and USDC prices are separate payment options. No automatic subscription is selected."},"prepaid_endpoint":"https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/agent-run-cost-audit","input_example":{"policy":{"max_run_usd":0.06},"events":[{"run_id":"research-1","tool":"web_extract","cost_usd":0.04,"status":"success","idempotency_key":"page-123"},{"run_id":"research-1","tool":"web_extract","cost_usd":0.04,"status":"success","idempotency_key":"page-123"}]},"sample_output":{"ok":true,"mode":"agent-run-cost-audit","event_count":2,"observed_billed_usd":0.08,"failed_events":0,"repeat_idempotency_key_events":1,"potential_duplicate_charges_usd":0.04,"over_caller_budget":true,"budget_usd":0.06,"observed_budget_overage_usd":0.02,"expensive_tools":[{"tool":"web_extract","calls":2,"failed_calls":0,"billed_usd":0.08,"input_tokens":0,"output_tokens":0}],"repeat_groups":[{"run_id":"research-1","tool":"web_extract","idempotency_key_hash":"106e9867be80f5c8","calls":2,"successful":2,"potential_duplicate_charges_usd":0.04}],"input_sha256":"5af9246f61ffec6e14ee186d7c4f9f4898317d6710cdd6343ce834dd520761c8","recommendations":["Review same-run repeated idempotency keys; consider caching or idempotent deduplication.","Enforce a hard per-run budget before future buyer-authorized calls."],"limitations":["Amounts, statuses and token counts are caller-supplied, not settlement-verified.","Possible duplicate charges are not independently proven waste, refunds or savings.","No invented token pricing or inferred buyer intent; no API calls are performed."],"charged_downstream":false},"sample_note":"Worked example using published sample data only.","free_preview":"https://bounty-engineer-x402-prod.onrender.com/v1/free-preview?tool=agent-run-cost-audit","integration":{"method":"POST","headers":{"Authorization":"Bearer YOUR_PRIVATE_API_KEY","Content-Type":"application/json","Idempotency-Key":"UNIQUE_PER_LOGICAL_REQUEST","X-Max-Credits":"4"},"body":{"policy":{"max_run_usd":0.06},"events":[{"run_id":"research-1","tool":"web_extract","cost_usd":0.04,"status":"success","idempotency_key":"page-123"},{"run_id":"research-1","tool":"web_extract","cost_usd":0.04,"status":"success","idempotency_key":"page-123"}]}},"limitations":["Never put your API key in a URL or public workflow export.","Reuse the same idempotency key for retries of the same input.","Execution of your own data requires a verified payment and available credits."]}