{"openapi":"3.1.0","info":{"title":"SecondLook Public Paid API","version":"0.2.0","description":"A second opinion before your AI agent acts: catch overlooked risks, conflicting constraints, and missing information before committing to an action. Independent pre-action review checks your supplied facts, authority, constraints, and reasoning against the proposed action and returns a structured status, reasons, risks, and missing information to help you decide whether to proceed, revise the plan, gather information, or involve a human. Buy when a costly, external, irreversible, or constraint-sensitive action warrants a separate check that could change your next step. Skip trivial or reversible actions when another review would not change the decision. This is a dedicated review contract, not a claim of superiority over your own reasoning or another model. SecondLook does not authorize, execute, or supply missing authority; results are not guarantees of correctness. SecondLook is not authorization or execution, and review results are not guarantees of correctness."},"x-buyer-guide":{"incremental_value":"A dedicated second pass against supplied facts, authority, constraints, and uncertainties, with a stable structured result your workflow can handle. Use it when a separate review could change the next action; no greater accuracy than your own review or another model is promised.","buy_when":"A costly, external, irreversible, or constraint-sensitive action warrants checking for an overlooked supplied fact, authority issue, uncertainty, or conflict before execution.","skip_when":"The action is trivial or readily reversible and another review would not change your decision, or your existing review process already provides the same value.","prerequisites":["A proposed action plus the material facts, authority basis, constraints, and uncertainties needed to review it. SecondLook cannot discover facts you omit.","Eligible U.S. service use in the 50 states or DC and the required country/region headers.","An authorized x402 wallet for the live payment terms, and a caller that retains its request and UUIDv4 Idempotency-Key for recovery."],"you_receive":"0.05 USDC purchases processing of one valid request and a durable review result: review_status, reason, key_risks, missing_information, decision_id, and policy_version. All four statuses are valid fulfilled results, including insufficient_information and human_review_required.","quick_start":["Read /privacy before supplying business context. Choose a minimal request or adapt an illustrative request below using only the facts you actually know.","Send unsigned POST /v1/paid/second-look to obtain the live PAYMENT-REQUIRED terms. No request body is required for negotiation.","After authorizing the terms, POST your JSON with Content-Type: application/json, PAYMENT-SIGNATURE, a fresh UUIDv4 Idempotency-Key, X-SecondLook-Service-Use-Country: US, and your eligible state/DC in X-SecondLook-Service-Use-Region.","Use review_status and its reasons to decide your next step. The caller retains authority and execution responsibility.","Save the result and original request/key. Recovery uses the same logical request and key without PAYMENT-SIGNATURE; never blindly retry a signed request or ambiguous inference."],"privacy_url":"/privacy","privacy_before_purchase":"Effective September 6, 2026, customer input and generated reviews are not used by Edgecase Systems to train, fine-tune, or improve AI models. Substantive decision records have no automatic deletion deadline and may remain stored indefinitely; seven days is the replay window, not decision-content retention. Read /privacy before sending business context.","examples":[{"name":"Useful catch: overlapping refunds","kind":"Illustrative expected result, not a live result or performance evidence","request":{"goal":"Resolve a verified duplicate $40 charge without refunding it twice.","proposed_action":"Issue a $40 refund now.","authority":{"status":"confirmed","basis":"Support policy authorizes the agent to refund verified duplicates up to $50."},"hard_constraints":["Do not create a second refund while one for the same charge is pending."],"known_facts":["The $40 duplicate is verified.","A separate billing workflow has already submitted a $40 refund for this charge; its result is pending."],"reasoning_summary":"The duplicate is verified and $40 is within my $50 limit."},"illustrative_review":{"review_status":"material_concern_found","reason":"The amount is within your authority, but the pending refund makes another refund conflict with the supplied no-duplicate-refund constraint.","key_risks":["Refunding the same duplicate charge twice."],"missing_information":[]},"next_step":"Check the existing refund outcome before considering another refund. SecondLook does not query the billing system or execute either action."},{"name":"Stays out of the way: supported refund","kind":"Illustrative expected result, not a live result or performance evidence","request":{"goal":"Resolve a verified duplicate $25 charge.","proposed_action":"Issue one $25 refund to the original payment method.","authority":{"status":"confirmed","basis":"Support policy authorizes the agent to refund verified duplicates up to $50."},"hard_constraints":["Refund only verified duplicates, at most once, to the original payment method."],"known_facts":["The duplicate is verified.","No refund exists or is pending for this charge.","The proposed destination is the original payment method."]},"illustrative_review":{"review_status":"no_material_concern_found","reason":"The supplied authority, facts, and constraints support this routine refund; no material concern is identified.","key_risks":[],"missing_information":[]},"next_step":"The caller can continue under its existing authority. This status does not grant permission or guarantee correctness; if this check adds no value to your workflow, skip the purchase."}]},"servers":[{"url":"https://secondlook.edgecasesystems.workers.dev"}],"externalDocs":{"description":"SecondLook machine-readable service manifest","url":"https://secondlook.edgecasesystems.workers.dev/.well-known/secondlook.json"},"paths":{"/v1/paid/second-look":{"post":{"operationId":"requestPaidSecondLook","summary":"Get a second opinion before your agent commits to an action","description":"Use before an external action such as sending a customer message, changing production settings, or issuing a refund when a separate review of a costly, external, irreversible, or constraint-sensitive action could change your next step. Skip trivial/reversible actions when another review adds no value. See x-buyer-guide for prerequisites, integration steps, and paired illustrative examples of a useful catch and a supported action. Receive one of four review statuses with a reason, key risks, and missing information. An unsigned POST obtains deterministic x402 V2 payment requirements. A payment-bearing retry must include every required header and a valid SecondLook JSON body. Payment authorizes processing only; it does not authorize or execute the proposed action.","x-secondlook-payment-retry":{"required_headers":{"Content-Type":"application/json","PAYMENT-SIGNATURE":"Base64-encoded x402 V2 PaymentPayload","Idempotency-Key":"UUIDv4","X-SecondLook-Service-Use-Country":"US","X-SecondLook-Service-Use-Region":"one eligible_regions value"},"eligible_regions":["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","DC"],"automatic_payment_retry":false,"automatic_inference_retry":false},"parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Required on the payment-bearing retry; omit only to obtain PAYMENT-REQUIRED.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Required on the payment-bearing retry; must be a UUIDv4. Not required for unsigned negotiation. To recover or replay an existing paid lifecycle, resend the same semantically equivalent structured request and UUIDv4 without PAYMENT-SIGNATURE; JSON formatting and object-key order may differ, and settlement is never repeated.","schema":{"type":"string","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}},{"name":"X-SecondLook-Service-Use-Country","in":"header","required":false,"description":"Required on a new public-mainnet payment-bearing retry.","schema":{"type":"string","const":"US"}},{"name":"X-SecondLook-Service-Use-Region","in":"header","required":false,"description":"Required on a new public-mainnet payment-bearing retry. Use the two-letter service-use state code or DC.","schema":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","DC"]}}],"requestBody":{"required":false,"description":"Required and validated on the payment-bearing retry and on signature-free recovery/replay of an existing lifecycle; may be omitted for unsigned x402 negotiation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"description":"Structural JSON Schema plus the expressible cross-field rules. The x-secondlook-semantic-validation extension lists additional deterministic runtime invariants required for acceptance.","x-secondlook-semantic-validation":{"additional_runtime_validation_required":true,"runtime_is_authoritative":true,"failure":{"http_status":400,"error_codes":["invalid_secondlook_request","invalid_constraint_context"]},"invariants":[{"id":"aggregate_request_text","rule":"Aggregate request text across all request fields must be at most 24,000 JavaScript string code units."},{"id":"aggregate_constraint_text","rule":"Aggregate constraint_context constraint text must be at most 12,000 JavaScript string code units."},{"id":"unique_constraint_ids","rule":"Each constraint id must be unique across constraint_context.constraints, even when the surrounding objects differ."},{"id":"unique_conflict_group_ids","rule":"Each conflict-group id must be unique across constraint_context.conflict_groups, even when the surrounding objects differ."},{"id":"conflict_group_references","rule":"Every conflict-group constraint id must reference an existing constraint whose applicability is not inapplicable."},{"id":"single_conflict_group_membership","rule":"A constraint may appear in at most one conflict group."},{"id":"established_controller","rule":"An established controlling_constraint_id must identify an applicable member of that conflict group."},{"id":"independently_binding_members","rule":"independently_binding_constraint_ids must be unique members of the same group and must not include its established controller."}]},"required":["goal","proposed_action"],"allOf":[{"not":{"required":["constraint_context","hard_constraints"],"properties":{"hard_constraints":{"minItems":1}}}},{"not":{"required":["constraint_context","important_constraints"],"properties":{"important_constraints":{"minItems":1}}}}],"properties":{"goal":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"},"proposed_action":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"},"authority":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["confirmed","unclear","unknown"]},"basis":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"},"limits":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}}}},"hard_constraints":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"soft_preferences":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"known_facts":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"unknown_facts":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"alternatives_considered":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"reasoning_summary":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"},"important_constraints":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"uncertainties":{"type":"array","maxItems":25,"items":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S"}},"estimated_cost_of_action":{"type":"object","additionalProperties":false,"required":["amount","currency"],"properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}}},"constraint_context":{"type":"object","additionalProperties":false,"required":["schema_version","constraints"],"properties":{"schema_version":{"const":"constraint-context-v1"},"constraints":{"type":"array","minItems":1,"maxItems":25,"uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["id","text","applicability","action_relation"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"text":{"type":"string","minLength":1,"maxLength":1000,"pattern":"\\S"},"applicability":{"enum":["applicable","inapplicable","unresolved"]},"action_relation":{"enum":["satisfies","violates","unresolved","not_applicable"]}},"allOf":[{"if":{"properties":{"applicability":{"const":"inapplicable"}},"required":["applicability"]},"then":{"properties":{"action_relation":{"const":"not_applicable"}}}},{"if":{"properties":{"applicability":{"enum":["applicable","unresolved"]}},"required":["applicability"]},"then":{"properties":{"action_relation":{"enum":["satisfies","violates","unresolved"]}}}}]}},"conflict_groups":{"type":"array","maxItems":12,"uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["id","constraint_ids","control"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"constraint_ids":{"type":"array","minItems":2,"maxItems":10,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"}},"independently_binding_constraint_ids":{"type":"array","maxItems":10,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"}},"control":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","controlling_constraint_id"],"properties":{"status":{"const":"established"},"controlling_constraint_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"}}},{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"const":"unresolved"}}}]}}}}}}}},"example":{"goal":"Review a proposed customer refund before execution.","proposed_action":"Issue a $25 refund to the customer.","authority":{"status":"confirmed","basis":"Support policy permits refunds up to $50."},"hard_constraints":["Do not exceed the documented $50 refund limit."],"known_facts":["The customer was charged twice."]}}}},"responses":{"200":{"description":"Durable review result. All four review statuses are valid fulfilled results.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 V2 SettlementResponse.","schema":{"type":"string"}},"Idempotency-Replayed":{"description":"true when returning the exact durable completed replay.","schema":{"type":"string","const":"true"}},"X-SecondLook-Payment-State":{"description":"Present as ambiguous when SecondLook honors one review without claiming uncertain settlement succeeded.","schema":{"type":"string","const":"ambiguous"}},"X-SecondLook-Ambiguity-Honored":{"description":"Present as true when this result is the one bounded public-mainnet ambiguity fulfillment. PAYMENT-RESPONSE is omitted.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["decision_id","created_at","policy_version","model","review_status","recommendation","reason","key_risks","missing_information"],"properties":{"decision_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"policy_version":{"type":"string"},"model":{"type":"string","description":"Deprecated compatibility field; the underlying inference implementation is not a stable product contract."},"review_status":{"type":"string","enum":["no_material_concern_found","material_concern_found","insufficient_information","human_review_required"]},"recommendation":{"type":"string","enum":["proceed","reconsider","need_more_information","escalate_to_human"]},"reason":{"type":"string"},"key_risks":{"type":"array","items":{"type":"string"}},"missing_information":{"type":"array","items":{"type":"string"}}}},"example":{"decision_id":"00000000-0000-4000-8000-000000000000","created_at":"2026-08-29T00:00:00.000Z","policy_version":"2026-08-27.5","model":"implementation-managed","review_status":"no_material_concern_found","recommendation":"proceed","reason":"The supplied authority, facts, and constraint support the proposed refund.","key_risks":[],"missing_information":[]}}}},"400":{"description":"Malformed request or missing paid-retry integration header."},"402":{"description":"Payment required. Read the PAYMENT-REQUIRED header for the canonical x402 V2 requirements, resource, and Bazaar declaration."},"403":{"description":"Public paid service is unavailable in the declared or observed region."},"409":{"description":"Payment, proof, idempotency, or durable lifecycle conflict. Never resubmit PAYMENT-SIGNATURE automatically. If the response says an accepted request failed before inference, recover with the same semantically equivalent structured request and Idempotency-Key but no PAYMENT-SIGNATURE; JSON formatting and object-key order may differ. Ineligible or already-uncertain ambiguity fulfillment requires operator reconciliation."},"429":{"description":"Rate or capacity limit."},"503":{"description":"Paid service disabled, unavailable, or conservatively blocked."}}}}},"x-secondlook":{"policy_version":"2026-08-27.5","invariant":"SecondLook never supplies missing authority.","review_statuses":["no_material_concern_found","material_concern_found","insufficient_information","human_review_required"],"notices":{"terms_url":"https://secondlook.edgecasesystems.workers.dev/terms","privacy_url":"https://secondlook.edgecasesystems.workers.dev/privacy","support_url":"https://secondlook.edgecasesystems.workers.dev/support"}}}