{"uid":"cap_gH-FTHhwfZdbIu2UXZR8N","slug":"ai-agent-payment-safety-stack-approval-unit-builder-ded59353","name":"AI Agent Payment Safety Stack – Approval Unit Builder","description":"Build a minimal human decision contract from AI-generated findings, patches, payment requests, or decision-support outputs.","url":"https://ai-agent-payment-safety-stack.onrender.com/api/approval-unit/build","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"approval_question":{"type":"string"},"approval_unit_hash":{"type":"string"},"chain_anchor_status":{"type":"string"},"recommended_human_action":{"type":"string"}}},"responseSchema":{"type":"json","example":{"approval_question":"Approve this security patch for staging merge?","approval_unit_hash":"sha256:...","chain_anchor_status":"not_anchored","recommended_human_action":"approve_staging_only"}},"example":{"request":{"title":"Security Patch Deployment Approval","summary":"AI agent has identified a critical security patch for production deployment. This approval unit packages the deployment decision for human review before execution.","task_id":"task_deploy_patch_20240115","agent_id":"ai_agent_security_001","severity":"high","source_id":"ai_agent_security_001","finding_id":"finding_security_patch_20240115","risk_level":"medium","source_ids":["patch_repository_main"],"cost_impact":{"deployment_time_minutes":15,"estimated_downtime_seconds":0},"source_type":"ai_finding","evidence_ids":["cve_scan_report_001","regression_test_suite_001"],"test_results":["unit_tests_passed","integration_tests_passed","security_scan_passed"],"approver_role":"human_approver","reviewer_role":"security_reviewer","regression_risk":"low","approval_unit_type":"payment_request","rollback_available":true,"recommended_decision":"approve","allowed_human_actions":["approve","reject","request_rework","request_more_evidence","escalate"],"suggested_human_actions":["review_patch_details","verify_test_results","check_deployment_window"],"blocked_actions_until_approval":["deploy_to_production","execute_patch"]},"response":{"title":"Security Patch Deployment Approval","summary":"AI agent has identified a critical security patch for production deployment. This approval unit packages the deployment decision for human review before execution.","task_id":"task_deploy_patch_20240115","priority":"medium","created_at":"2026-06-18T05:18:17.381453+00:00","request_id":null,"risk_level":"medium","if_approved":{"allowed_actions":["deploy_to_production"],"post_decision_route":"proceed_with_approved_scope","still_blocked_actions":["execute_patch"]},"if_rejected":{"blocked_actions":["deploy_to_production","execute_patch"],"post_decision_route":"stop_or_reassess"},"if_escalated":{"required_context":["approval_unit","risk_summary","blocked_actions"],"post_decision_route":"escalate_to_approver"},"test_summary":"unit_tests_passed, integration_tests_passed, security_scan_passed.","approver_role":"human_approver","chain_tx_hash":null,"audit_required":true,"regression_risk":"low","approval_unit_id":"approval_8eb409fd","decision_options":["approve","reject","request_rework","request_more_evidence","defer","escalate"],"evidence_summary":"Evidence: cve_scan_report_001, regression_test_suite_001. Sources: patch_repository_main. Tests: unit_tests_passed, integration_tests_passed, security_scan_passed.","approval_question":"Approve this action for production deployment?","decision_required":"approve | reject | request_rework | request_more_evidence | defer | escalate","if_request_rework":{"required_changes":["address_reviewer_feedback","resubmit_for_approval"],"post_decision_route":"route_to_rework"},"required_evidence":["summary","evidence_ids","source_ids"],"approval_unit_hash":"sha256:116dd4265e0561b6935da55c44c5404ec1a0ceeef1d0cc203e4bcaf8958abb0e","approval_unit_type":"payment_request","rollback_available":true,"chain_anchor_status":"not_anchored","human_action_reason":"Default recommended action based on approval unit type.","post_decision_route":"depends_on_human_decision","allowed_human_actions":["approve","reject","request_rework","request_more_evidence","escalate"],"blockchain_anchor_ready":true,"decision_effect_summary":"Approval allows: deploy_to_production. Still blocked after approval: execute_patch.","suggested_human_actions":["review_patch_details","verify_test_results","check_deployment_window"],"if_request_more_evidence":{"required_evidence":["summary","evidence_ids","source_ids"],"post_decision_route":"route_to_research"},"recommended_human_action":"approve","blocked_actions_until_approval":["deploy_to_production","execute_patch"],"required_checks_before_approval":["summary_reviewed","evidence_confirmed","rollback_plan_confirmed"]}},"exampleRequest":{"title":"Security Patch Deployment Approval","summary":"AI agent has identified a critical security patch for production deployment. This approval unit packages the deployment decision for human review before execution.","task_id":"task_deploy_patch_20240115","agent_id":"ai_agent_security_001","severity":"high","source_id":"ai_agent_security_001","finding_id":"finding_security_patch_20240115","risk_level":"medium","source_ids":["patch_repository_main"],"cost_impact":{"deployment_time_minutes":15,"estimated_downtime_seconds":0},"source_type":"ai_finding","evidence_ids":["cve_scan_report_001","regression_test_suite_001"],"test_results":["unit_tests_passed","integration_tests_passed","security_scan_passed"],"approver_role":"human_approver","reviewer_role":"security_reviewer","regression_risk":"low","approval_unit_type":"payment_request","rollback_available":true,"recommended_decision":"approve","allowed_human_actions":["approve","reject","request_rework","request_more_evidence","escalate"],"suggested_human_actions":["review_patch_details","verify_test_results","check_deployment_window"],"blocked_actions_until_approval":["deploy_to_production","execute_patch"]},"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mlLZpNBHPojpjHDKC_k9N","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds a minimal human decision contract (approval unit) from AI-generated findings, patches, payment requests, or decision-support outputs, enabling human-in-the-loop oversight before consequential actions.","exampleAgentPrompt":"Build a human approval unit for this AI-generated payment request: my agent wants to send 50 USDC to vendor 0xABC for invoice #1042 — package it as a minimal decision contract so a human can review and approve or reject it before the funds move.","exampleUseCases":null,"resultDescription":"Returns a structured approval unit (human decision contract) containing the AI-generated input (finding, patch, payment request, or recommendation) formatted as a minimal, reviewable payload that a human can inspect and approve or reject before the AI agent proceeds.","failureModes":["Missing or malformed input payload returns 400 Bad Request","Payment of 0.05 USDC not included or rejected returns 402 Payment Required","Unsupported content type in the request body returns 415","Service unavailable on Render cold start returns 503 with latency spike","Oversized or complex AI output exceeds payload limits returning 413"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to pause before executing a consequential action (especially payments or code deployment) and requires a structured, minimal human-review contract to be built from its outputs. Prefer this over ad-hoc logging or manual summaries when you need a standardized, machine-readable approval artifact that human operators or oversight dashboards can consume.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:32:41.041Z","isFirstParty":false}