{"openapi":"3.1.0","info":{"title":"AI Agent Audit and Action Review","description":"Get a second opinion before a risky tool call. Submit your goal and proposed actions to receive a structured risk review for 1 EURC, with findings tied to the evidence and a next step for each issue.","version":"1.0.5"},"servers":[{"url":"https://agent-action-review.michigkchatgpt.workers.dev"}],"paths":{"/v1/review":{"post":{"operationId":"reviewAgentActions","summary":"Buy a structured second opinion on a planned tool call or submitted action log.","description":"Submit your goal and actions. A confirmed 1 EURC x402 payment returns a verdict, risk findings, evidence and suggested next steps. If the response includes payment_setup, check the optional one-time SOL cost before buying. Use a fresh private request_id for each purchase. Retry a paid attempt with the original body and payment to resume that purchase.","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"EUR","amount":"1.00"}},"parameters":[{"in":"header","name":"PAYMENT-SIGNATURE","schema":{"type":"string"},"description":"x402 v2 signed payment payload."},{"in":"header","name":"X-Solana-Transaction","schema":{"type":"string"},"description":"Finalized Solana signature for recovery of a previously verified order."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$","description":"Private, unique per purchase. Generate 32 random bytes and encode as unpadded base64url."},"review":{"type":"object","properties":{"goal":{"type":"string","minLength":1,"maxLength":500},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"object","properties":{"phase":{"type":"string","enum":["planned","executed"]},"description":{"type":"string","minLength":1,"maxLength":700}},"required":["phase","description"],"additionalProperties":false}},"context":{"type":"string","maxLength":1500},"language":{"type":"string","enum":["de","en"],"default":"en"}},"required":["goal","actions"],"additionalProperties":false}},"required":["request_id","review"],"additionalProperties":false}}}},"responses":{"200":{"description":"Review complete.","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"const":"advisory_ai_review"},"evidence":{"const":"submitted_actions_only"},"model":{"type":"string"},"verdict":{"type":"string","enum":["reasonable_as_described","needs_changes","insufficient_information"]},"summary":{"type":"string","minLength":1,"maxLength":600},"findings":{"type":"array","maxItems":4,"items":{"type":"object","properties":{"action_index":{"type":"integer","minimum":0,"maximum":8},"severity":{"type":"string","enum":["low","medium","high"]},"observation":{"type":"string","minLength":1,"maxLength":400},"basis":{"type":"string","minLength":1,"maxLength":300},"next_step":{"type":"string","minLength":1,"maxLength":350}},"required":["action_index","severity","observation","basis","next_step"],"additionalProperties":false}},"unknowns":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":250}}},"required":["kind","evidence","model","verdict","summary","findings","unknowns"],"additionalProperties":false}}},"headers":{"PAYMENT-RESPONSE":{"description":"x402 v2 settlement receipt.","schema":{"type":"string"}}}},"400":{"description":"Invalid review or request ID."},"402":{"description":"One EURC required. Payment is optional.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 payment challenge.","schema":{"type":"string"}}}},"409":{"description":"Use the previously bound body and signed payment."},"410":{"description":"Review retention ended."},"422":{"description":"The payment did not match the advertised terms."},"425":{"description":"Pending. Retry the same purchase."},"503":{"description":"Payments or review temporarily unavailable."}}},"head":{"operationId":"probeAgentReviewPayment","summary":"Read the x402 payment challenge when payments are available.","responses":{"402":{"description":"Payment terms in the response header.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 payment challenge.","schema":{"type":"string"}}}},"503":{"description":"Payment currently unavailable."}}}},"/v1/example":{"get":{"operationId":"getReviewExample","responses":{"200":{"description":"Free static example."}}}},"/v1/payment-setup":{"get":{"operationId":"getPaymentSetup","summary":"Check whether optional one-time Solana account sponsorship is available.","responses":{"200":{"description":"Payment setup status and, if needed, the estimated account reserve in lamports."},"503":{"description":"Payment setup or the Solana network is unavailable."}}},"post":{"operationId":"preparePaymentSetup","summary":"Prepare an unsigned Solana token account creation transaction within an explicit budget.","description":"This optional transaction pays only for the recipient EURC account setup. Wallet authorization, signing, and submission are separate client-side actions. The review is a separate 1 EURC x402 purchase after setup finalizes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payer":{"type":"string","description":"Public Solana signer and SOL fee payer."},"max_total_lamports":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Maximum one-time cost authorized for setup, including the account reserve and network fee."}},"required":["payer","max_total_lamports"],"additionalProperties":false}}}},"responses":{"200":{"description":"No setup needed, or an unsigned transaction with its reserve, network fee and expiry."},"400":{"description":"The payer public address or the budget is invalid."},"422":{"description":"The estimated setup cost exceeds the budget."},"503":{"description":"Payment setup or the Solana network is unavailable."}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP Streamable HTTP for discovery and lookup of an existing review.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC response."},"202":{"description":"Legacy notification accepted."}}}}}}