{"openapi":"3.1.0","info":{"title":"WritersLogic Verifiable AI Agent Hub","version":"2.0.0","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","contact":{"name":"WritersLogic","url":"https://writerslogic.com/agents"}},"servers":[{"url":"https://agents.writerslogic.com"}],"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment payload (base64) sent after a 402 challenge"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/api/v1/enrich-lead":{"post":{"operationId":"lead_enrichment","summary":"Autonomous Lead Enrichment","description":"Scrapes a company homepage, deduces its value proposition and buyer persona, and drafts a targeted B2B cold email.\n\nPrice: 0.50 USDC on Base (x402).","x-x402-price-usdc":"0.50","x-x402-amount":"500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":3,"maxLength":2048,"description":"Company homepage URL; https:// is assumed if omitted."},"senderContext":{"type":"string","maxLength":2000,"description":"What you sell, used to tailor the pitch."}}},"example":{"url":"https://stripe.com","senderContext":"We sell AI-driven chargeback dispute automation for online merchants."}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["company_name","industry","value_proposition","target_customers","key_offerings","buyer_persona","cold_email","source_url","page_title","company_name_source","contact","pages_read","email_check"],"properties":{"company_name":{"type":"string"},"industry":{"type":"string"},"value_proposition":{"type":"string","description":"One or two sentences: what they sell, to whom, and why it wins."},"target_customers":{"type":"array","items":{"type":"string"}},"key_offerings":{"type":"array","items":{"type":"string"}},"buyer_persona":{"type":"object","additionalProperties":false,"required":["title","pain_points"],"properties":{"title":{"type":"string","description":"Job title of the most likely decision maker to email."},"pain_points":{"type":"array","items":{"type":"string"}}}},"cold_email":{"type":"object","additionalProperties":false,"required":["subject","body"],"properties":{"subject":{"type":"string"},"body":{"type":"string"}}},"source_url":{"type":"string"},"page_title":{"type":"string"},"company_name_source":{"type":"string","enum":["json-ld","og:site_name","model"],"description":"Where company_name came from; parsed values are never model-generated."},"contact":{"type":"object","additionalProperties":false,"required":["emails","phones","social_links","address"],"properties":{"emails":{"type":"array","items":{"type":"string"}},"phones":{"type":"array","items":{"type":"string"}},"social_links":{"type":"array","items":{"type":"string"}},"address":{"type":"string","description":"Empty string when none was found."}}},"pages_read":{"type":"array","items":{"type":"string"},"description":"Extra same-site pages (about, pricing, customers, careers) read besides the homepage."},"email_check":{"type":"object","additionalProperties":false,"required":["passed","violations","retried"],"properties":{"passed":{"type":"boolean"},"violations":{"type":"array","items":{"type":"string"}},"retried":{"type":"boolean"}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-contract":{"post":{"operationId":"contract_auditor","summary":"Smart Contract Auditor","description":"Solidity vulnerability analysis (reentrancy, overflow, access control, logic bugs) with a severity-ranked JSON report.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1,"maxLength":100000,"description":"Raw Solidity source (one or more files concatenated)."},"contractName":{"type":"string","maxLength":200,"description":"Contract to focus on when several are present."}}},"example":{"code":"pragma solidity ^0.8.20;\ncontract Vault {\n  mapping(address => uint256) public balances;\n  function deposit() external payable { balances[msg.sender] += msg.value; }\n  function withdraw() external {\n    (bool ok, ) = msg.sender.call{value: balances[msg.sender]}(\"\");\n    require(ok);\n    balances[msg.sender] = 0;\n  }\n}","contractName":"Vault"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["summary","overall_risk","findings","contract_names","compiler_version","not_checked","severity_counts","lines_of_code"],"properties":{"summary":{"type":"string"},"overall_risk":{"type":"string","enum":["critical","high","medium","low","informational","none"]},"findings":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","title","severity","category","location","code_snippet","description","exploit_scenario","recommendation","confidence","source","verification","line_start","line_end"],"properties":{"id":{"type":"string","description":"Sequential id such as F-01."},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","informational"]},"category":{"type":"string","enum":["reentrancy","integer_overflow_underflow","access_control","logic_error","unchecked_external_call","oracle_price_manipulation","front_running_mev","denial_of_service","timestamp_dependence","tx_origin_auth","delegatecall_proxy","storage_collision_uninitialized","signature_replay","erc_standard_violation","centralization_risk","gas_optimization","other"]},"location":{"type":"string","description":"Contract.function and line number(s) from the numbered source."},"code_snippet":{"type":"string","description":"The exact source text of the vulnerable statement, copied verbatim without the line-number prefix."},"description":{"type":"string"},"exploit_scenario":{"type":"string","description":"Concrete attacker steps, or \"n/a\" for non-exploitable issues."},"recommendation":{"type":"string","description":"Specific fix, with a short code snippet when useful."},"confidence":{"type":"string","enum":["high","medium","low"]},"source":{"type":"string","enum":["model","static"],"description":"static = raised by the deterministic detector pass."},"verification":{"type":"string","enum":["verified","line_corrected","snippet_not_found","static_detector"],"description":"snippet_not_found lowers confidence to low."},"line_start":{"type":"integer","description":"True 1-based line of the snippet; 0 when it could not be located."},"line_end":{"type":"integer"}}}},"contract_names":{"type":"array","items":{"type":"string"},"description":"Parsed from the source, not model-generated."},"compiler_version":{"type":"string","description":"Parsed pragma expression, or \"unspecified\"."},"not_checked":{"type":"array","items":{"type":"string"},"description":"What this review could not see; an empty findings list does not cover these."},"severity_counts":{"type":"object","additionalProperties":false,"required":["critical","high","medium","low","informational"],"properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"},"informational":{"type":"integer"}}},"lines_of_code":{"type":"integer"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/predict-market":{"post":{"operationId":"market_predictor","summary":"Prediction Market Analyzer","description":"Sentiment analysis and a calibrated 0-100 probability that a Polymarket/Kalshi-style event resolves Yes.\n\nPrice: 0.10 USDC on Base (x402).","x-x402-price-usdc":"0.10","x-x402-amount":"100000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"News excerpt or event description."},"question":{"type":"string","maxLength":500,"description":"Exact market question; inferred when omitted."},"marketPriceYes":{"type":"number","minimum":0,"maximum":100,"description":"Current implied Yes probability, used to compute edge. Percent (0-100) by default; a value strictly between 0 and 1 is read as a 0-1 market price (Polymarket/Kalshi style) unless marketPriceScale says otherwise."},"marketPriceScale":{"type":"string","enum":["percent","fraction"],"description":"Force the unit of marketPriceYes: percent (35 = 35%) or fraction (0.35 = 35%)."}}},"example":{"text":"The Fed chair said the committee sees no urgency to cut rates at the December meeting, citing sticky services inflation.","question":"Will the Fed cut rates at its December 2026 meeting?","marketPriceYes":35}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["market_question","probability_yes","confidence","sentiment","factors_for_yes","factors_for_no","information_gaps","rationale","probability_no","analyzed_at"],"properties":{"market_question":{"type":"string","description":"The binary Yes/No question being forecast, stated precisely."},"probability_yes":{"type":"integer","description":"Probability (0-100) that the event resolves Yes."},"confidence":{"type":"string","enum":["low","medium","high"]},"sentiment":{"type":"object","additionalProperties":false,"required":["label","score"],"properties":{"label":{"type":"string","enum":["positive","negative","neutral","mixed"],"description":"Derived from score and the factor lists, never model-reported."},"score":{"type":"number"}}},"factors_for_yes":{"type":"array","items":{"type":"string"}},"factors_for_no":{"type":"array","items":{"type":"string"}},"information_gaps":{"type":"array","items":{"type":"string"}},"rationale":{"type":"string"},"probability_no":{"type":"integer"},"market_price_yes_pct":{"type":"number","description":"marketPriceYes normalized to percent; present only when a price was given."},"market_price_interpretation":{"type":"string","enum":["percent","fraction"],"description":"How marketPriceYes was read."},"edge_vs_market":{"type":"number","description":"probability_yes minus the normalized market price; present only when a price was given."},"analyzed_at":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/arbitrage-lawyer":{"post":{"operationId":"arbitrage_lawyer","summary":"Cross-Platform Arbitrage & Resolution Rules Lawyer","description":"Finds fine-print divergences between two prediction markets (e.g. Polymarket vs Kalshi), prices basis risk, and returns ARBITRAGE_SAFE / BASIS_RISK_TRAP / NO_EDGE with Kelly hedge sizing. Prices are USD per share (0-1).\n\nPrice: 0.75 USDC on Base (x402).","x-x402-price-usdc":"0.75","x-x402-amount":"750000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["marketA","marketB"],"properties":{"marketA":{"type":"object","additionalProperties":false,"required":["platform","title","resolutionRules","yesPrice","noPrice"],"properties":{"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."}}},"marketB":{"type":"object","additionalProperties":false,"required":["platform","title","resolutionRules","yesPrice","noPrice"],"properties":{"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."}}},"minEdgeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Default 100 (1%)."},"bankrollUsd":{"type":"number","minimum":0,"maximum":1000000000000,"description":"Used to convert the Kelly fraction to USD."}}},"example":{"marketA":{"platform":"Polymarket","title":"Will Candidate X win the 2028 election?","resolutionRules":"Resolves Yes if the Associated Press, Fox News, and NBC all call the race for Candidate X by Jan 20, 2029 12:00 PM ET.","yesPrice":0.52,"noPrice":0.49,"feeBps":0},"marketB":{"platform":"Kalshi","title":"Who will win the 2028 presidential election? Candidate X","resolutionRules":"Resolves Yes if Candidate X is inaugurated as President on Jan 20, 2029.","yesPrice":0.55,"noPrice":0.45,"feeBps":70},"minEdgeBps":100,"bankrollUsd":10000}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["same_underlying_event","equivalence_score","resolution_source_a","resolution_source_b","deadline_a","deadline_b","divergences","loophole_clauses","summary","analysis_mode","unverified_divergences","recommendation","best_direction","directions","unavailable_directions","hedge_sizing"],"properties":{"same_underlying_event":{"type":"boolean"},"equivalence_score":{"type":"integer","description":"0-100: how closely the resolution criteria coincide."},"resolution_source_a":{"type":"string"},"resolution_source_b":{"type":"string"},"deadline_a":{"type":"string","description":"Resolution deadline and timezone as written, or \"unspecified\"."},"deadline_b":{"type":"string"},"divergences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["scenario","market_a_resolves","market_b_resolves","probability_pct","clause_a","clause_b","clauses_verified"],"properties":{"scenario":{"type":"string"},"market_a_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"],"description":"YES, NO, VOID (cancelled or refunded; priced as a refund of the purchase price) or SPLIT (50-50 settlement; each share pays $0.50)."},"market_b_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"]},"probability_pct":{"type":"number","description":"Probability (0-100) this scenario occurs."},"clause_a":{"type":"string","description":"Verbatim clause from market A that drives its outcome."},"clause_b":{"type":"string","description":"Verbatim clause from market B that drives its outcome."},"clauses_verified":{"type":"boolean","description":"Both quoted clauses were found in the supplied rules; an unverified scenario is priced only when it lowers the payout."}}}},"loophole_clauses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["market","clause","risk"],"properties":{"market":{"type":"string","enum":["A","B"]},"clause":{"type":"string"},"risk":{"type":"string"}}}},"summary":{"type":"string"},"analysis_mode":{"type":"string","enum":["model","price_only"],"description":"price_only: no positive spread at the quoted prices, so NO_EDGE was decided without the rules analysis."},"unverified_divergences":{"type":"integer"},"recommendation":{"type":"string","enum":["ARBITRAGE_SAFE","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"best_direction":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}},"directions":{"type":"array","items":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}}},"unavailable_directions":{"type":"array","items":{"type":"string"},"description":"Directions skipped because a leg has no ask (price 0)."},"hedge_sizing":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/heal-scraper":{"post":{"operationId":"heal_scraper","summary":"Self-Healing Scraper & DOM-to-JSON Compiler","description":"Synthesizes durable CSS selectors (Cheerio; no XPath) for a target JSON schema, proves them against the live DOM in-request, and returns the extracted data plus a ready-to-run TypeScript Cheerio extractor.\n\nPrice: 0.40 USDC on Base (x402).","x-x402-price-usdc":"0.40","x-x402-amount":"400000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["targetSchema"],"properties":{"url":{"type":"string","maxLength":2048,"description":"Page to fetch. Provide url or html."},"html":{"type":"string","maxLength":1500000,"description":"Raw HTML to use instead of fetching."},"targetSchema":{"type":"object","description":"JSON Schema of the fields to extract: an object whose properties are string/number/integer/boolean (or arrays of those), or an array whose items are such an object for list pages. The pattern keyword is not allowed."},"previousBrokenSelectors":{"type":"object","description":"Map of field name to the CSS selector that stopped working."}}},"example":{"url":"https://news.ycombinator.com","targetSchema":{"type":"array","items":{"type":"object","required":["title","link"],"properties":{"title":{"type":"string"},"link":{"type":"string"},"points":{"type":"integer"}}}},"previousBrokenSelectors":{"title":".storylink"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Final fetched URL, or null when html was supplied."},"healed":{"type":"boolean","description":"True when every field fills at least 4 in 5 records (single record: filled) and the data validates against targetSchema."},"decidedBy":{"type":"string","enum":["previous_selectors","structured_markup","llm"],"description":"Which stage produced the returned spec; the first two make no model call."},"llmCalls":{"type":"integer"},"data":{"description":"Extracted data shaped like targetSchema."},"selectorMap":{"type":"object"},"spec":{"type":"object"},"validation":{"type":"object"},"extractorCode":{"type":"string","description":"Standalone TypeScript module exporting extract(html)."},"page_structure_notes":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/detect-token-trap":{"post":{"operationId":"token_trap_detector","summary":"On-Chain Bytecode & Unverified Token Trap Detector","description":"Reads live Base bytecode, proxy slots (EIP-1967/beacon/zeppelinos/EIP-1822/EIP-1167), ERC-20 state, and privileged selectors to score honeypot and rug risk: SAFE | CAUTION | HONEYPOT_RUG.\n\nPrice: 0.25 USDC on Base (x402).","x-x402-price-usdc":"0.25","x-x402-amount":"250000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["tokenAddress"],"properties":{"tokenAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Token contract address on Base."},"sourceCode":{"type":"string","maxLength":100000,"description":"Optional Solidity source claimed for the token."}}},"example":{"tokenAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["honeypotProbability","proxyRisk","maxSafeSlippage","verdict","confidence","risk_factors","mitigating_factors","summary","verdict_floor_applied","decidedBy","llmCalls","oracles","privilegedSelectorsFound","telemetry"],"properties":{"honeypotProbability":{"type":"integer","description":"0-100 probability that buyers cannot sell or are taxed to near zero."},"proxyRisk":{"type":"string","enum":["none","low","medium","high","critical"]},"maxSafeSlippage":{"type":"number","description":"Suggested maximum slippage tolerance in percent for a buy."},"verdict":{"type":"string","enum":["SAFE","CAUTION","HONEYPOT_RUG"]},"confidence":{"type":"string","enum":["low","medium","high"]},"risk_factors":{"type":"array","items":{"type":"string"}},"mitigating_factors":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"verdict_floor_applied":{"type":"boolean"},"decidedBy":{"type":"string","enum":["rules:simulation","llm:bytecode_only"],"description":"rules:simulation: decided in code from a honeypot.is buy/sell simulation, no model call."},"llmCalls":{"type":"integer"},"oracles":{"type":"object","description":"honeypot.is and GoPlus readings (taxes in percent) and any oracle errors."},"privilegedSelectorsFound":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"string"},"signature":{"type":"string"},"category":{"type":"string"}}}},"telemetry":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/competitor-battlecard":{"post":{"operationId":"competitor_battlecard","summary":"SaaS Pricing & Competitor Battlecard Spy","description":"Scrapes up to 3 competitor sites (plus their pricing pages) and returns a live deal battlecard: pricing tiers, hidden fees and limits, landmine questions, objection handling, and wedge features.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ourProductDescription","competitorUrls"],"properties":{"ourProductDescription":{"type":"string","minLength":20,"maxLength":4000},"competitorUrls":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","minLength":3,"maxLength":2048},"description":"Competitor homepage or pricing URLs. A same-site pricing page is discovered automatically."},"scenario":{"type":"object","additionalProperties":false,"description":"Optional deal size used to compute monthly and annual cost per verified tier: seats for per-seat prices, monthlyVolume for usage prices.","properties":{"seats":{"type":"integer","minimum":1,"maximum":100000},"monthlyVolume":{"type":"integer","minimum":0,"maximum":1000000000}}}}},"example":{"ourProductDescription":"Acme Support is an AI-first help desk with usage-based pricing ($0.40 per resolved ticket), SSO on every plan, and native Slack and Shopify integrations.","competitorUrls":["https://www.zendesk.com","https://www.intercom.com","https://www.freshworks.com/freshdesk/"]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["our_positioning","competitors","talk_track","evidence_gaps","pricing_comparison","pricing_scenario","priceVerification","pricingEvidence","pagesScraped","fetchFailures","generatedAt"],"properties":{"our_positioning":{"type":"string"},"competitors":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","url","positioning","target_segment","pricing_model","pricing_tiers","hidden_fees_and_limits","enterprise_upsell_triggers","strengths","weaknesses","landmine_questions","objection_handling","wedge_features"],"properties":{"name":{"type":"string"},"url":{"type":"string"},"positioning":{"type":"string","description":"Their core claim, paraphrasing their own copy."},"target_segment":{"type":"string"},"pricing_model":{"type":"string","description":"e.g. per seat, usage-based, flat tiers, contact sales. \"not published\" if absent."},"pricing_tiers":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["tier","price","billing","key_limits","notable_features"],"properties":{"tier":{"type":"string"},"price":{"type":"string","description":"Exactly as shown on the page, or \"not listed\"."},"billing":{"type":"string"},"key_limits":{"type":"array","items":{"type":"string"}},"notable_features":{"type":"array","items":{"type":"string"}}}}},"hidden_fees_and_limits":{"type":"array","items":{"type":"string"}},"enterprise_upsell_triggers":{"type":"array","items":{"type":"string"},"description":"Features or limits that force an upgrade (SSO, audit logs, seat caps...)."},"strengths":{"type":"array","items":{"type":"string"}},"weaknesses":{"type":"array","items":{"type":"string"}},"landmine_questions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["question","exposes"],"properties":{"question":{"type":"string"},"exposes":{"type":"string"}}}},"objection_handling":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["objection","response"],"properties":{"objection":{"type":"string"},"response":{"type":"string"}}}},"wedge_features":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["feature","why_we_win"],"properties":{"feature":{"type":"string"},"why_we_win":{"type":"string"}}}}}}},"talk_track":{"type":"string","description":"A 3-5 sentence opener for a live deal against these competitors."},"evidence_gaps":{"type":"array","items":{"type":"string"},"description":"What could not be verified from the scraped pages."},"pricing_comparison":{"type":"string","description":"Computed in code from prices verified on the scraped pages; the model does not write it."},"pricing_scenario":{"type":"object"},"priceVerification":{"type":"array","items":{"type":"object"},"description":"Per model-written tier: verified | unverified | no_amount against the scraped text."},"pricingEvidence":{"type":"array","items":{"type":"object"},"description":"Per competitor: whether any price or structured offer was found (pricingPublished)."},"pagesScraped":{"type":"array","items":{"type":"string"}},"fetchFailures":{"type":"array","items":{"type":"object"}},"generatedAt":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/gatekeep-diff":{"post":{"operationId":"diff_gatekeeper","summary":"PR / Dependency Breaking-Change & Exploit Gatekeeper","description":"Two-stage adversarial review of a unified diff (bug hunter, then patch synthesizer) plus deterministic secret, dependency, and SAST scanning; returns mergeApproved, riskScore 0-100, findings, and drop-in patches.\n\nPrice: 0.50 USDC on Base (x402).","x-x402-price-usdc":"0.50","x-x402-amount":"500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["gitDiff"],"properties":{"gitDiff":{"type":"string","minLength":1,"maxLength":300000,"description":"Raw unified diff (git diff output)."},"packageJsonDiff":{"type":"string","maxLength":50000},"context":{"type":"string","maxLength":4000,"description":"What the PR is supposed to do."}}},"example":{"gitDiff":"diff --git a/src/users.ts b/src/users.ts\n--- a/src/users.ts\n+++ b/src/users.ts\n@@ -10,3 +10,4 @@ export async function findUser(db, req) {\n-  return db.query('SELECT * FROM users WHERE id = $1', [req.params.id]);\n+  const id = req.params.id;\n+  return db.query(`SELECT * FROM users WHERE id = ${id}`);\n }\n","context":"Refactor user lookup for readability."}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"string"},"intent_alignment":{"type":"string","description":"Does the diff do what the context says, and anything it does beyond that."},"breakingChanges":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","file","location","severity","description","affected_consumers","grounded","source"],"properties":{"id":{"type":"string","description":"BC-01, BC-02..."},"file":{"type":"string"},"location":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low"]},"description":{"type":"string"},"affected_consumers":{"type":"string"},"grounded":{"type":"boolean","description":"False when the file or line is not in the diff; ungrounded findings never block."},"source":{"type":"string","enum":["model","rule"]}}}},"securityFlaws":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","file","line","category","severity","description","exploit_scenario","grounded","source"],"properties":{"id":{"type":"string","description":"SEC-01, SEC-02..."},"file":{"type":"string"},"line":{"type":"integer"},"category":{"type":"string","enum":["sql_injection","nosql_injection","command_injection","xss","ssrf","path_traversal","authz_bypass","secret_exposure","insecure_crypto","deserialization","supply_chain","other"]},"severity":{"type":"string","enum":["critical","high","medium","low"]},"description":{"type":"string"},"exploit_scenario":{"type":"string"},"grounded":{"type":"boolean","description":"False when the file or line is not in the diff; ungrounded findings never block."},"source":{"type":"string","enum":["model","rule"]}}}},"bugs":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","file","line","category","severity","description","grounded","source"],"properties":{"id":{"type":"string","description":"BUG-01, BUG-02..."},"file":{"type":"string"},"line":{"type":"integer"},"category":{"type":"string","enum":["race_condition","state_mutation","error_handling","logic_error","resource_leak","null_handling","performance","other"]},"severity":{"type":"string","enum":["critical","high","medium","low"]},"description":{"type":"string"},"grounded":{"type":"boolean","description":"False when the file or line is not in the diff; ungrounded findings never block."},"source":{"type":"string","enum":["model","rule"]}}}},"dependency_risks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["package","risk","severity"],"properties":{"package":{"type":"string"},"risk":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low"]}}}},"riskScore":{"type":"integer","description":"0-100 overall merge risk."},"mergeApproved":{"type":"boolean"},"modelRiskScore":{"type":"integer","description":"The model's own 0-100 estimate; advisory. riskScore is computed from grounded findings (critical 40, high 20, medium 8, low 2, capped at 100) with scanner floors."},"blockers":{"type":"array","items":{"type":"string"}},"dependencyRisks":{"type":"object"},"secretsDetected":{"type":"array","items":{"type":"object"}},"suggestedPatches":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["finding_id","file","original_code","corrected_code","explanation"],"properties":{"finding_id":{"type":"string"},"file":{"type":"string"},"original_code":{"type":"string","description":"The exact lines from the diff being replaced."},"corrected_code":{"type":"string","description":"Drop-in replacement code."},"explanation":{"type":"string"}}}},"stats":{"type":"object"}},"required":["summary","intent_alignment","breakingChanges","securityFlaws","bugs","riskScore","mergeApproved","modelRiskScore","blockers","dependencyRisks","secretsDetected","suggestedPatches","stats"]},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-medical-bill":{"post":{"operationId":"medical_bill_auditor","summary":"Medical Bill Upcoding & Overcharge Slasher","description":"Audits itemized medical bills for E/M upcoding, NCCI unbundling, duplicate and unit errors; estimates Medicare and fair-price benchmarks; and drafts a dispute letter citing applicable No Surprises Act and NCCI rules.\n\nPrice: 3.00 USDC on Base (x402).","x-x402-price-usdc":"3.00","x-x402-amount":"3000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lineItems","facilityType"],"properties":{"lineItems":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["cptOrHcpcsCode","description","chargedAmount","units"],"properties":{"cptOrHcpcsCode":{"type":"string","pattern":"^[A-Za-z0-9]{5}$","description":"5-character CPT or HCPCS Level II code."},"description":{"type":"string","maxLength":500},"chargedAmount":{"type":"number","minimum":0,"maximum":10000000,"description":"Total billed for this line, USD."},"units":{"type":"integer","minimum":1,"maximum":10000},"modifiers":{"type":"array","maxItems":4,"items":{"type":"string","pattern":"^[A-Za-z0-9]{2}$"}},"serviceDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"revenueCode":{"type":"string","pattern":"^\\d{3,4}$"}}}},"facilityType":{"type":"string","enum":["emergency_room","urgent_care","outpatient_hospital","inpatient_hospital","ambulatory_surgery_center","physician_office","laboratory","imaging_center","other"]},"coverage":{"type":"string","enum":["uninsured_self_pay","in_network","out_of_network","medicare","medicaid","unknown"],"description":"Determines which No Surprises Act protections can apply."},"patientState":{"type":"string","pattern":"^[A-Za-z]{2}$"},"visitSummary":{"type":"string","maxLength":4000,"description":"What actually happened: symptoms, duration, tests, treatment."},"facilityName":{"type":"string","maxLength":200},"patientName":{"type":"string","maxLength":200},"accountNumber":{"type":"string","maxLength":100},"goodFaithEstimateAmount":{"type":"number","minimum":0,"maximum":10000000,"description":"Good Faith Estimate received (self-pay)."},"claimType":{"type":"string","enum":["professional","facility"],"description":"Physician (CMS-1500) or hospital/facility (UB-04) bill. Medicare physician fee schedule benchmarks apply only to professional claims."},"billReceivedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date the initial bill was received; used for the 120-day dispute deadline."}}},"example":{"facilityType":"emergency_room","coverage":"uninsured_self_pay","patientState":"TX","visitSummary":"Twisted ankle, 40-minute visit, one X-ray, no fracture, given an ACE bandage and ibuprofen.","lineItems":[{"cptOrHcpcsCode":"99285","description":"ED visit level 5","chargedAmount":3250,"units":1,"serviceDate":"2026-09-14"},{"cptOrHcpcsCode":"73610","description":"X-ray ankle 3 views","chargedAmount":640,"units":1,"serviceDate":"2026-09-14"},{"cptOrHcpcsCode":"A4570","description":"Splint / elastic bandage","chargedAmount":185,"units":1,"serviceDate":"2026-09-14"},{"cptOrHcpcsCode":"99070","description":"Supplies and materials","chargedAmount":95,"units":1,"serviceDate":"2026-09-14"}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object"},"no_surprises_act":{"type":"object"},"lines":{"type":"array","items":{"type":"object"}},"overall_assessment":{"type":"string"},"applicable_protections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["protection","citation","applies_because"],"properties":{"protection":{"type":"string"},"citation":{"type":"string"},"applies_because":{"type":"string"}}}},"dispute_letter":{"type":"object","additionalProperties":false,"required":["subject","body"],"properties":{"subject":{"type":"string"},"body":{"type":"string"}}},"next_steps":{"type":"array","items":{"type":"string"}},"notice":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/fight-chargeback":{"post":{"operationId":"chargeback_fighter","summary":"E-Commerce Chargeback Representment Builder","description":"Scores representment win probability, maps merchant evidence to the network rubric for the reason code (including deterministic Visa CE3.0 eligibility and invalid-dispute checks), lists missing evidence, and writes a rebuttal ready for Stripe or Shopify disputes. Uses only supplied evidence; never fabricates.\n\nPrice: 2.50 USDC on Base (x402).","x-x402-price-usdc":"2.50","x-x402-amount":"2500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["network","reasonCode","orderDetails","evidence"],"properties":{"network":{"type":"string","enum":["visa","mastercard","amex","discover"]},"reasonCode":{"type":"string","pattern":"^[0-9A-Za-z.]{1,10}$","description":"e.g. 10.4, 13.1, 13.3 (Visa); 4837, 4853, 4855 (Mastercard)."},"disputeDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}"},"orderDetails":{"type":"object","additionalProperties":false,"required":["orderId","amount","currency","transactionDate","items"],"properties":{"orderId":{"type":"string","maxLength":100},"amount":{"type":"number","minimum":0,"maximum":10000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"transactionDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["name","quantity","unitPrice"],"properties":{"name":{"type":"string","maxLength":300},"quantity":{"type":"integer","minimum":1},"unitPrice":{"type":"number","minimum":0}}}},"customerEmail":{"type":"string","maxLength":320},"shippingAddress":{"type":"string","maxLength":500},"billingAddress":{"type":"string","maxLength":500},"productType":{"type":"string","enum":["physical","digital","service","subscription"]}}},"evidence":{"type":"object","additionalProperties":false,"properties":{"trackingNumber":{"type":"string","maxLength":100},"carrier":{"type":"string","maxLength":100},"deliveryConfirmation":{"type":"string","maxLength":2000},"deliveryDate":{"type":"string","maxLength":40},"signedProofOfDelivery":{"type":"boolean"},"ipAddress":{"type":"string","maxLength":64},"deviceFingerprint":{"type":"string","maxLength":256},"deviceId":{"type":"string","maxLength":256},"customerAccountId":{"type":"string","maxLength":256},"authorization":{"type":"object","additionalProperties":false,"description":"Authorization-message data from the processor; lets Visa 10.4 invalid disputes be decided without a model call.","properties":{"eci":{"type":"string","pattern":"^0?[0-9]$","description":"Electronic Commerce Indicator, e.g. 05 or 5."},"cavvPresent":{"type":"boolean"},"authenticationConfirmed":{"type":"boolean","description":"Issuer returned an Authentication Confirmation (Visa Secure / EMV 3DS)."},"attemptResponse":{"type":"boolean"},"cvv2PresenceIndicator":{"type":"string","pattern":"^[0-9]$"},"cvv2ResultCode":{"type":"string","pattern":"^[A-Za-z]$","description":"CVV2 result code in the authorization response, e.g. M, N, U."},"approved":{"type":"boolean"}}},"avsResult":{"type":"string","maxLength":100},"cvvResult":{"type":"string","maxLength":100},"threeDSecure":{"type":"string","maxLength":200},"priorUndisputedTransactions":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["date"],"properties":{"transactionId":{"type":"string","maxLength":100},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}"},"amount":{"type":"number","minimum":0},"ipAddress":{"type":"string","maxLength":64},"deviceId":{"type":"string","maxLength":256},"deviceFingerprint":{"type":"string","maxLength":256},"shippingAddress":{"type":"string","maxLength":500},"customerAccountId":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":1000,"description":"What was purchased; CE3.0 requires a detailed description for each prior transaction."},"disputed":{"type":"boolean"}}}},"customerCommunications":{"type":"string","maxLength":20000},"refundPolicyExcerpt":{"type":"string","maxLength":5000},"productDescription":{"type":"string","maxLength":5000},"digitalUsageLogs":{"type":"string","maxLength":10000},"cancellationPolicy":{"type":"string","maxLength":5000},"refundIssued":{"type":"string","maxLength":500}}}}},"example":{"network":"visa","reasonCode":"13.1","disputeDate":"2026-10-20","orderDetails":{"orderId":"SHOP-10442","amount":189,"currency":"USD","transactionDate":"2026-09-28","items":[{"name":"Trail running shoes, size 10","quantity":1,"unitPrice":189}],"shippingAddress":"42 Elm St, Austin, TX 78701","productType":"physical"},"evidence":{"trackingNumber":"1Z999AA10123456784","carrier":"UPS","deliveryConfirmation":"Delivered 2026-10-02 14:12, left at front door, 42 Elm St Austin TX","deliveryDate":"2026-10-02","avsResult":"Y (full match)","cvvResult":"M (match)","customerCommunications":"2026-10-03 customer email: 'Got the shoes, they run a bit small.'"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"reason_code_name":{"type":"string"},"winProbability":{"type":"integer","description":"0-100 probability of winning representment with the supplied evidence."},"win_rationale":{"type":"string"},"evidence_map":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["evidence","rubric_requirement","how_it_satisfies","strength"],"properties":{"evidence":{"type":"string","description":"The merchant-supplied evidence item."},"rubric_requirement":{"type":"string","description":"The network rule or remedy element it answers."},"how_it_satisfies":{"type":"string"},"strength":{"type":"string","enum":["strong","moderate","weak"]}}}},"missingEvidence":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["item","why_it_matters","where_to_get_it"],"properties":{"item":{"type":"string"},"why_it_matters":{"type":"string"},"where_to_get_it":{"type":"string"}}}},"weaknesses":{"type":"array","items":{"type":"string"}},"rebuttal":{"type":"object","additionalProperties":false,"required":["title","summary","body","attachments_checklist"],"properties":{"title":{"type":"string"},"summary":{"type":"string","description":"2-3 sentence case summary for the dispute form's first field."},"body":{"type":"string","description":"Full representment letter, plain text."},"attachments_checklist":{"type":"array","items":{"type":"string"}}}},"recommend_accept":{"type":"boolean","description":"True when fighting is unlikely to succeed and accepting the dispute is cheaper."},"rubric":{"type":"object"},"ce3":{"type":"object","properties":{"applicable":{"type":"boolean"},"eligible":{"type":"boolean"},"undetermined":{"type":"boolean"},"qualifyingTransactions":{"type":"array","items":{"type":"string"}},"unmet":{"type":"array","items":{"type":"string"}}}},"invalidDispute":{"type":"object"},"decision":{"type":"object","properties":{"source":{"type":"string","enum":["model","deterministic_rule"]}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/terminate-contract":{"post":{"operationId":"contract_terminator","summary":"Dark Pattern Contract & Subscription Exit Lawyer","description":"Finds auto-renewal, notice-window, and early-termination traps in a contract or live Terms page, maps them to ROSCA, state automatic-renewal laws, EU/UK consumer law, and contract breach triggers, and drafts a formal termination and payment-revocation notice.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["vendorName","userJurisdiction","reasonForExit"],"properties":{"termsUrl":{"type":"string","maxLength":2048,"description":"Terms of Service or cancellation policy URL. Provide termsUrl or contractText."},"contractText":{"type":"string","maxLength":200000},"vendorName":{"type":"string","minLength":1,"maxLength":200},"userJurisdiction":{"type":"string","minLength":2,"maxLength":100,"description":"e.g. California, New York, EU (Germany), UK."},"reasonForExit":{"type":"string","minLength":1,"maxLength":2000},"customerType":{"type":"string","enum":["consumer","business"]},"customerName":{"type":"string","maxLength":200},"accountIdentifier":{"type":"string","maxLength":200},"contractStartDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"signupMethod":{"type":"string","enum":["online","phone","in_person"]}}},"example":{"contractText":"This Agreement renews automatically for successive 12-month terms unless either party gives written notice of non-renewal by certified mail at least 60 days before the end of the then-current term. Early termination requires payment of all remaining fees for the current term.","vendorName":"Acme Fitness Clubs","userJurisdiction":"California","reasonForExit":"Moved out of state; signed up online.","customerType":"consumer","signupMethod":"online"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contract_summary":{"type":"string"},"hiddenTraps":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["trap_type","clause","why_it_traps","severity"],"properties":{"trap_type":{"type":"string","enum":["auto_renewal","notice_window","early_termination_fee","cancellation_channel_restriction","price_escalation","minimum_term","non_refundable_prepayment","arbitration_or_class_waiver","data_retention","other"]},"clause":{"type":"string","description":"Verbatim text from the contract."},"why_it_traps":{"type":"string"},"severity":{"type":"string","enum":["high","medium","low"]},"verbatim":{"type":"boolean"}}}},"legalLeverage":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["basis","citation","applies_because","effect","confidence"],"properties":{"basis":{"type":"string","enum":["statute","regulation","contract_term","material_breach","payment_network_rule","other"]},"citation":{"type":"string"},"applies_because":{"type":"string"},"effect":{"type":"string","description":"What it lets the user do, e.g. void the ETF, cancel online, get a refund."},"confidence":{"type":"string","enum":["high","medium","low"]},"in_reference_table":{"type":"boolean","description":"The citation names an authority the service knows. It does not establish that the authority applies or is in force."}}}},"deadlines":{"type":"array","items":{"type":"string"}},"cancellationSteps":{"type":"array","items":{"type":"string"}},"terminationNotice":{"type":"object","additionalProperties":false,"required":["subject","body","send_to"],"properties":{"subject":{"type":"string"},"body":{"type":"string"},"send_to":{"type":"string","description":"Address or channel the contract designates for notices, or where to find it."}}},"risk_of_fees":{"type":"string","enum":["high","medium","low","none"]},"caveats":{"type":"array","items":{"type":"string"}},"unverifiedTraps":{"type":"array","description":"Traps whose quoted clause was not found in the contract text; withheld from hiddenTraps.","items":{"type":"object"}},"computed_deadlines":{"type":"object","description":"Renewal and notice dates computed by code from the contract text; see status for why none may be present."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"contract_chars":{"type":"integer"},"truncated_for_model":{"type":"boolean"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/optimize-tariff":{"post":{"operationId":"tariff_engineer","summary":"Global Customs & Tariff Engineering Optimizer","description":"Classifies a product under the HS/HTS with GRI reasoning, estimates MFN and additional duties, lists defensible lower-duty alternatives and lawful physical tariff-engineering changes, and drafts an accurate commercial invoice description.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["productName","materialsBreakdown","intendedUse","originCountry","destinationCountry"],"properties":{"productName":{"type":"string","minLength":2,"maxLength":300},"materialsBreakdown":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["material","percentByWeight"],"properties":{"material":{"type":"string","minLength":1,"maxLength":200},"percentByWeight":{"type":"number","minimum":0,"maximum":100},"percentByValue":{"type":"number","minimum":0,"maximum":100}}}},"intendedUse":{"type":"string","minLength":2,"maxLength":2000},"originCountry":{"type":"string","minLength":2,"maxLength":60},"destinationCountry":{"type":"string","minLength":2,"maxLength":60},"productDescription":{"type":"string","maxLength":5000,"description":"Construction, dimensions, how it works, packaging."},"customsValueUsd":{"type":"number","minimum":0,"maximum":10000000000,"description":"Entered value, used to estimate duty and savings."},"currentHtsCode":{"type":"string","pattern":"^\\d{4}(\\.?\\d{2}){1,3}$"},"importStateOfAssembly":{"type":"string","enum":["fully_assembled","unassembled_kit","components","bulk"]}}},"example":{"productName":"Women's waterproof ankle boot","materialsBreakdown":[{"material":"Rubber/plastics outer sole","percentByWeight":45},{"material":"Polyurethane-coated textile upper","percentByWeight":40},{"material":"Textile lining","percentByWeight":15}],"intendedUse":"Everyday wet-weather footwear","originCountry":"Vietnam","destinationCountry":"United States","customsValueUsd":85000,"importStateOfAssembly":"fully_assembled"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"primaryClassification":{"type":"object","additionalProperties":false,"required":["htsCode","description","adValoremPct","rateText","reasoning"],"properties":{"htsCode":{"type":"string","description":"Destination tariff code, 6-10 digits (e.g. 6404.11.90)."},"description":{"type":"string","description":"Heading/subheading text."},"adValoremPct":{"type":"number","description":"General ad valorem duty rate in percent; -1 if specific or compound."},"rateText":{"type":"string","description":"Rate as written, including specific components."},"reasoning":{"type":"string","description":"GRI analysis, section/chapter notes, and any relevant rulings."},"rate_source":{"type":"string","enum":["usitc_hts","model"],"description":"usitc_hts: description and rate come from the official HTS line; model: the model's recollection."},"hts_status":{"type":"string","enum":["found","not_final","not_found","lookup_failed","invalid_format","not_checked"]},"hts_note":{"type":"string"},"rate_kind":{"type":"string","enum":["free","ad_valorem","specific","compound","other"]},"units":{"type":"array","items":{"type":"string"}},"origin_preference":{"type":"object","description":"Special-column rate listing the origin country; informational, not applied to the estimate."},"nearest_codes":{"type":"array","items":{"type":"object"},"description":"Real HTS lines sharing the longest prefix with a code that does not exist."},"candidates":{"type":"array","items":{"type":"object"},"description":"Final 8-digit lines under a heading or subheading code."}}},"additionalDuties":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["program","adValoremPct","applies_because","verify_at"],"properties":{"program":{"type":"string","description":"e.g. Section 301, Section 232, IEEPA, AD/CVD, or an FTA preference."},"adValoremPct":{"type":"number","description":"Additional percent; negative for a preference reduction."},"applies_because":{"type":"string"},"verify_at":{"type":"string","description":"Where to confirm the current rate."},"verified":{"type":"boolean","description":"Always false: add-on programs are model-recalled and not checked against Chapter 99, CSMS or AD/CVD orders."},"verification":{"type":"string"}}}},"alternatives":{"type":"array","items":{"type":"object","properties":{"classification":{"type":"object","additionalProperties":false,"required":["htsCode","description","adValoremPct","rateText","reasoning"],"properties":{"htsCode":{"type":"string","description":"Destination tariff code, 6-10 digits (e.g. 6404.11.90)."},"description":{"type":"string","description":"Heading/subheading text."},"adValoremPct":{"type":"number","description":"General ad valorem duty rate in percent; -1 if specific or compound."},"rateText":{"type":"string","description":"Rate as written, including specific components."},"reasoning":{"type":"string","description":"GRI analysis, section/chapter notes, and any relevant rulings."},"rate_source":{"type":"string","enum":["usitc_hts","model"],"description":"usitc_hts: description and rate come from the official HTS line; model: the model's recollection."},"hts_status":{"type":"string","enum":["found","not_final","not_found","lookup_failed","invalid_format","not_checked"]},"hts_note":{"type":"string"},"rate_kind":{"type":"string","enum":["free","ad_valorem","specific","compound","other"]},"units":{"type":"array","items":{"type":"string"}},"origin_preference":{"type":"object","description":"Special-column rate listing the origin country; informational, not applied to the estimate."},"nearest_codes":{"type":"array","items":{"type":"object"},"description":"Real HTS lines sharing the longest prefix with a code that does not exist."},"candidates":{"type":"array","items":{"type":"object"},"description":"Final 8-digit lines under a heading or subheading code."}}}}}},"engineeringOptions":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","additionalProperties":false,"required":["htsCode","description","adValoremPct","rateText","reasoning"],"properties":{"htsCode":{"type":"string","description":"Destination tariff code, 6-10 digits (e.g. 6404.11.90)."},"description":{"type":"string","description":"Heading/subheading text."},"adValoremPct":{"type":"number","description":"General ad valorem duty rate in percent; -1 if specific or compound."},"rateText":{"type":"string","description":"Rate as written, including specific components."},"reasoning":{"type":"string","description":"GRI analysis, section/chapter notes, and any relevant rulings."},"rate_source":{"type":"string","enum":["usitc_hts","model"],"description":"usitc_hts: description and rate come from the official HTS line; model: the model's recollection."},"hts_status":{"type":"string","enum":["found","not_final","not_found","lookup_failed","invalid_format","not_checked"]},"hts_note":{"type":"string"},"rate_kind":{"type":"string","enum":["free","ad_valorem","specific","compound","other"]},"units":{"type":"array","items":{"type":"string"}},"origin_preference":{"type":"object","description":"Special-column rate listing the origin country; informational, not applied to the estimate."},"nearest_codes":{"type":"array","items":{"type":"object"},"description":"Real HTS lines sharing the longest prefix with a code that does not exist."},"candidates":{"type":"array","items":{"type":"object"},"description":"Final 8-digit lines under a heading or subheading code."}}}}}},"commercialInvoiceDescription":{"type":"string","description":"Accurate description of the goods as actually imported."},"documentation":{"type":"array","items":{"type":"string"}},"complianceWarnings":{"type":"array","items":{"type":"string"}},"bindingRulingAdvice":{"type":"string"},"currentHtsCodeCheck":{"type":"object","additionalProperties":false,"required":["htsCode","description","adValoremPct","rateText","reasoning"],"properties":{"htsCode":{"type":"string","description":"Destination tariff code, 6-10 digits (e.g. 6404.11.90)."},"description":{"type":"string","description":"Heading/subheading text."},"adValoremPct":{"type":"number","description":"General ad valorem duty rate in percent; -1 if specific or compound."},"rateText":{"type":"string","description":"Rate as written, including specific components."},"reasoning":{"type":"string","description":"GRI analysis, section/chapter notes, and any relevant rulings."},"rate_source":{"type":"string","enum":["usitc_hts","model"],"description":"usitc_hts: description and rate come from the official HTS line; model: the model's recollection."},"hts_status":{"type":"string","enum":["found","not_final","not_found","lookup_failed","invalid_format","not_checked"]},"hts_note":{"type":"string"},"rate_kind":{"type":"string","enum":["free","ad_valorem","specific","compound","other"]},"units":{"type":"array","items":{"type":"string"}},"origin_preference":{"type":"object","description":"Special-column rate listing the origin country; informational, not applied to the estimate."},"nearest_codes":{"type":"array","items":{"type":"object"},"description":"Real HTS lines sharing the longest prefix with a code that does not exist."},"candidates":{"type":"array","items":{"type":"object"},"description":"Final 8-digit lines under a heading or subheading code."}}},"estimate":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/bypass-patent":{"post":{"operationId":"patent_design_around","summary":"Patent Design-Around & Freedom-to-Operate Architect","description":"Breaks independent claims into atomic limitations, maps the product to each (literal and doctrine of equivalents), scores claims under the all-elements rule, and proposes 3 engineering design-arounds that remove at least one required limitation.\n\nPrice: 2.00 USDC on Base (x402).","x-x402-price-usdc":"2.00","x-x402-amount":"2000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["patentClaimsText","proposedProductDescription"],"properties":{"patentClaimsText":{"type":"string","minLength":20,"maxLength":50000,"description":"Numbered claims (at least the independent claims)."},"proposedProductDescription":{"type":"string","minLength":20,"maxLength":20000},"patentNumber":{"type":"string","maxLength":40},"jurisdiction":{"type":"string","maxLength":40,"description":"Defaults to US."}}},"example":{"patentNumber":"US 9,999,999 B2","patentClaimsText":"1. A method of notifying a user, comprising: receiving, at a server, a location of a mobile device; determining that the location is within a geofence associated with a merchant; and transmitting a push notification comprising a coupon to the mobile device in response to the determining.\n2. The method of claim 1, wherein the geofence is circular.","proposedProductDescription":"Our app checks the phone's location on-device against a list of nearby store polygons downloaded daily, and shows a local in-app banner with a discount when the user opens the app inside a store area. No location is sent to our servers."}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"infringementRiskScore":{"type":"integer"},"claims":{"type":"array","items":{"type":"object"}},"designArounds":{"type":"array","items":{"type":"object"}},"designAroundCount":{"type":"integer"},"summary":{"type":"string"},"caveats":{"type":"array","items":{"type":"string"}},"parsed_claims":{"type":"array","items":{"type":"object"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/patch-accessibility":{"post":{"operationId":"accessibility_patcher","summary":"ADA / WCAG Lawsuit Shield & DOM Auto-Patcher","description":"Audits a page's DOM for the WCAG failures most cited in ADA demand letters (alt text, form labels, empty buttons/links, lang, headings, landmarks, skip links, zoom), returns a litigation risk score, per-element patched HTML, and a drop-in interim <script> hotfix.\n\nPrice: 0.75 USDC on Base (x402).","x-x402-price-usdc":"0.75","x-x402-amount":"750000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048,"description":"Page to audit. Provide url or html."},"html":{"type":"string","maxLength":2000000}}},"example":{"html":"<html><head><title>Shop</title></head><body><nav><a href=\"/\"><img src=\"logo.png\"></a></nav><h1>Running shoes</h1><h3>Bestsellers</h3><img src=\"IMG_2041.jpg\" alt=\"IMG_2041.jpg\"><form><input type=\"email\" placeholder=\"Email\"><button><svg></svg></button></form></body></html>"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"litigationRiskScore":{"type":"integer"},"deterministicScore":{"type":"integer"},"issues":{"type":"array","items":{"type":"object"}},"pageIssues":{"type":"array","items":{"type":"object"}},"patchedHtmlSnippets":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["issue_id","patchedHtml","explanation"],"properties":{"issue_id":{"type":"string"},"patchedHtml":{"type":"string"},"explanation":{"type":"string"}}}},"hotfixScript":{"type":"string"},"summary":{"type":"string"},"notice":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/clarification-impact":{"post":{"operationId":"clarification_impact","summary":"Prediction-Market Clarification Impact Pricer","description":"Given a Polymarket market (slug, URL or conditionId; Kalshi ticker supported), reads the rules clarification (Additional context) from the UMA adapter on Polygon, finds the real-world outcomes whose resolution changed, shifts fair probability by their verified, ensemble-estimated mass, walks the live CLOB book at your size after fees and slippage, and returns BUY_YES / BUY_NO / EXIT / HOLD / NO_MATERIAL_CHANGE with fractional-Kelly sizing.\n\nPrice: 0.50 USDC on Base (x402).","x-x402-price-usdc":"0.50","x-x402-amount":"500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["market"],"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket market slug, polymarket.com URL or conditionId; or a Kalshi market ticker (rules from the public trade-api v2)."},"rulesBefore":{"type":"string","maxLength":20000,"description":"Rules text before the change. Overrides the on-chain read; defaults to the creation-time rules plus earlier updates."},"clarificationText":{"type":"string","maxLength":10000,"description":"The clarification / Additional context text. Overrides the on-chain read."},"position":{"type":"object","additionalProperties":false,"required":["outcome","shares","avgPrice"],"properties":{"outcome":{"type":"string","enum":["YES","NO"],"description":"Held side; YES is the market's first outcome."},"shares":{"type":"number","minimum":0,"maximum":1000000000000},"avgPrice":{"type":"number","minimum":0,"maximum":1}}},"bankrollUsd":{"type":"number","minimum":0,"maximum":1000000000000,"description":"Used to turn the Kelly fraction into dollars."},"sizeUsd":{"type":"number","minimum":0,"maximum":1000000000,"description":"Intended order size in USD (default 100)."},"priorYes":{"type":"number","minimum":0,"maximum":1,"description":"Override for the pre-clarification fair P(YES); default is the Polymarket CLOB price history just before the clarification, falling back to the current YES order-book mid."},"feeRate":{"type":"number","minimum":0,"maximum":0.25,"description":"Taker fee coefficient: fee = shares * feeRate * p * (1 - p). Defaults to the market's Gamma feeSchedule rate (0 when fees are disabled); Kalshi defaults to 0.07 times the series fee_multiplier from /series."},"minEdgeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Minimum edge after fees and slippage, in bps of cost (default 100)."},"minMoveBps":{"type":"number","minimum":0,"maximum":10000,"description":"Fair-value move below which the answer is NO_MATERIAL_CHANGE (default 100)."},"kellyFraction":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of full Kelly to stake (default 0.25)."}}},"example":{"market":"will-an-independent-win-the-michigan-governor-race-in-2026","position":{"outcome":"NO","shares":500,"avgPrice":0.92},"bankrollUsd":10000,"sizeUsd":250}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"market":{"type":"object"},"clarification":{"type":"object"},"recommendation":{"type":"string","enum":["BUY_YES","BUY_NO","EXIT","HOLD","NO_MATERIAL_CHANGE","INSUFFICIENT_EVIDENCE"]},"reason":{"type":"string"},"predicates":{"type":"object","description":"Deprecated: always {before: null, after: null}; predicates are no longer extracted."},"decided_by":{"type":"string","description":"\"deterministic\" when no model ran (restatement gate, placeholder, absent clarification), else \"llm_scenarios\"."},"flipped_scenarios":{"type":"array","items":{"type":"object"},"description":"Outcomes that resolve differently, with verified verbatim clauses and ensemble probabilities."},"dropped_scenarios":{"type":"array","items":{"type":"object"}},"fair":{"type":"object","description":"Pre-clarification prior (with anchor timestamp and source), current mid, posterior and adversarial posterior P(YES)."},"book":{"type":"object","description":"Fee coefficient and book walks: average fill, slippage, fees."},"edge":{"type":"object"},"sizing":{"type":"object"},"sibling_implications":{"type":"array","items":{"type":"object"}},"confidence":{"type":"object"},"what_would_change_the_call":{"type":"array","items":{"type":"string"}},"evidence_sources":{"type":"array","items":{"type":"object"}},"warnings":{"type":"array","items":{"type":"string"}},"analyzed_at":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/verify-milestone":{"post":{"operationId":"milestone_verifier","summary":"Grant Milestone Verifier with Signed Release Attestation","description":"Decides whether a grantee met a milestone before a DAO releases the next tranche or stream. Checks GitHub as of the due date (commits, tags, releases, CI, files), npm/PyPI/crates.io publish times, Snapshot proposal state, on-chain deployments (bytecode selector scan through proxies, Sourcify, creation transaction), and URLs; judges the rest with an ensemble plus a skeptical reviewer, reads Sablier Lockup streams on-chain, and returns a per-criterion PASS/FAIL/UNVERIFIABLE verdict, releaseBps, and an EIP-712 signed attestation.\n\nPrice: 2.00 USDC on Base (x402).","x-x402-price-usdc":"2.00","x-x402-amount":"2000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["milestone","evidence"],"properties":{"milestone":{"type":"object","additionalProperties":false,"required":["title","acceptanceCriteria","dueDate"],"properties":{"title":{"type":"string","minLength":1,"maxLength":300},"acceptanceCriteria":{"type":"array","minItems":1,"maxItems":12,"items":{"type":"string","minLength":1,"maxLength":1000}},"dueDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO 8601 date or timestamp. A date means end of that day UTC. GitHub, registry, Snapshot and contract checks are evaluated as of this instant."},"windowStart":{"type":"string","minLength":10,"maxLength":40,"description":"Optional ISO 8601 start of the milestone period. Needed to decide \"commits/releases/packages during the period\" criteria; without it those are left to the judge."}}},"evidence":{"type":"object","additionalProperties":false,"properties":{"repoUrl":{"type":"string","maxLength":200,"description":"https://github.com/<owner>/<repo>"},"ref":{"type":"string","maxLength":200,"description":"Branch, tag or commit, or a commit range base...head."},"deployments":{"type":"array","maxItems":8,"items":{"type":"object","additionalProperties":false,"required":["chain","address"],"properties":{"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"]},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"expectedFunctions":{"type":"array","maxItems":24,"items":{"type":"string","minLength":3,"maxLength":300},"description":"Function signatures, e.g. transfer(address,uint256)."}}}},"urls":{"type":"array","maxItems":8,"items":{"type":"string","minLength":8,"maxLength":500}}}},"payout":{"type":"object","additionalProperties":false,"required":["protocol","chain","amountTotal"],"properties":{"protocol":{"type":"string","enum":["sablier","superfluid","transfer"]},"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"]},"streamId":{"type":"string","pattern":"^[0-9]{1,78}$"},"lockup":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"SablierLockup address; required to disambiguate when several versions hold the stream id."},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amountTotal":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Tranche value in token base units."}}},"releasePolicy":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["all_or_nothing","proportional"],"description":"Default all_or_nothing."}}}}},"example":{"milestone":{"title":"Maintenance and ecosystem support","acceptanceCriteria":["A tagged release v0.2.0 is published","A changelog is maintained in the repository","Continuous integration passes on the main branch","Public documentation describes ArbSys and ArbGasInfo local support"],"dueDate":"2026-02-28"},"evidence":{"repoUrl":"https://github.com/Supercoolkayy/Ox-rollup","ref":"main","deployments":[{"chain":"arbitrum","address":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","expectedFunctions":["transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)"]}],"urls":["https://www.ox-rollup.com/docs/01-overview"]},"payout":{"protocol":"sablier","chain":"ethereum","streamId":"3","lockup":"0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73","recipient":"0xc616B2449E9765EDF9FFb485Da42420971299519","amountTotal":"1000000000000000000000"},"releasePolicy":{"mode":"proportional"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"verdict":{"type":"string","enum":["PASS","PARTIAL","FAIL","INSUFFICIENT_EVIDENCE","PAYOUT_BLOCKED"]},"releaseBps":{"type":"integer","description":"Share of the tranche to release, 0-10000."},"releaseAmount":{"type":"string","description":"floor(amountTotal * releaseBps / 10000) in base units, capped at the stream's remaining balance; null without a payout."},"confidence":{"type":"string","enum":["low","medium","high"]},"criteria":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"criterion":{"type":"string"},"verdict":{"type":"string","enum":["PASS","FAIL","UNVERIFIABLE"]},"claims":{"type":"array","items":{"type":"object"}},"whatWouldChange":{"type":"array","items":{"type":"string"}}}}},"payout":{"type":"object"},"evidenceSummary":{"type":"object"},"provenance":{"type":"object","description":"decidedBy (deterministic, mixed or ensemble), claim counts per path, and an upper bound on model calls made (1 decomposition call, plus 3 judge samples and 1 skeptic call only when some claim needed judgment)."},"milestoneHash":{"type":"string","description":"keccak256 of the canonical JSON of {milestone, evidence}."},"attestation":{"type":"object","description":"EIP-712 MilestoneAttestation: signed, signature, signer, digest, typedData and typedDataV4. Unsigned (signed:false) when the agent has no attestation key."},"warnings":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/dispute-ev":{"post":{"operationId":"dispute_ev","summary":"UMA Dispute EV Desk","description":"For a Polymarket market in its UMA challenge window, reads the live proposal on Polygon (adapter, optimistic oracle, bond, finalFee, expiry), judges P(proposal wrong or too early) against the literal rules with an ensemble plus red-team pass and verified quotes, and computes DISPUTE vs ABSTAIN expected value (bond win/loss, DVM lock cost, gas, your position and reset delay). Returns DISPUTE / DO_NOT_DISPUTE / MONITOR_UNTIL with a UTC deadline and the full EV breakdown.\n\nPrice: 0.50 USDC on Base (x402).","x-x402-price-usdc":"0.50","x-x402-amount":"500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["market"],"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket slug, market/event URL, conditionId or questionID."},"proposal":{"type":"object","additionalProperties":false,"description":"Overrides for on-chain proposal fields (what-if or replay). Omit to read the live proposal.","properties":{"outcome":{"type":"string","enum":["first","second","half"],"description":"Proposed answer: first listed outcome (UMA price 1), second (price 0) or 50/50."},"expirationTime":{"type":"string","maxLength":40,"description":"ISO-8601 UTC time the challenge window closes."},"bondUsd":{"type":"number","minimum":0,"maximum":1000000000},"finalFeeUsd":{"type":"number","minimum":0,"maximum":1000000000}}},"position":{"type":"object","additionalProperties":false,"required":["outcome","shares","avgPrice"],"description":"Your holding in this market.","properties":{"outcome":{"type":"string","minLength":1,"maxLength":200,"description":"Outcome label held, e.g. Yes, No or a team name."},"shares":{"type":"number","minimum":0,"maximum":1000000000000},"avgPrice":{"type":"number","minimum":0,"maximum":1,"description":"Average entry price per share, USD."}}},"prices":{"type":"object","additionalProperties":false,"required":["first","second"],"description":"Current prices of the first and second listed outcomes, USD per share.","properties":{"first":{"type":"number","minimum":0,"maximum":1},"second":{"type":"number","minimum":0,"maximum":1}}},"evidenceUrls":{"type":"array","maxItems":3,"items":{"type":"string","maxLength":2000},"description":"Public pages to treat as evidence."},"params":{"type":"object","additionalProperties":false,"properties":{"gasUsd":{"type":"number","minimum":0,"maximum":10000,"description":"Total dispute transaction cost in USD; overrides the estimate."},"gasPriceGwei":{"type":"number","minimum":0,"maximum":100000},"polUsd":{"type":"number","minimum":0,"maximum":1000000},"aprOpportunity":{"type":"number","minimum":0,"maximum":10,"description":"Annual opportunity cost of capital, default 0.15."},"minEdgeUsd":{"type":"number","minimum":0,"maximum":1000000000,"description":"Minimum EV edge for DISPUTE, default 2."},"otherDisputeProb":{"type":"number","minimum":0,"maximum":1,"description":"P(someone else disputes a wrong proposal if you abstain), default 0.3 (an unmeasured assumption; it only affects callers holding a position)."},"safetyMarginMinutes":{"type":"number","minimum":0,"maximum":600,"description":"Submit-by margin before the window closes, default 10."}}}}},"example":{"market":"https://polymarket.com/event/ja3-osa-roa-2026-11-04-team-total-away/ja3-osa-roa-2026-11-04-team-total-away-5pt5","position":{"outcome":"Over","shares":400,"avgPrice":0.62},"params":{"aprOpportunity":0.15,"minEdgeUsd":2}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"decision":{"type":"string","enum":["DISPUTE","DO_NOT_DISPUTE","MONITOR_UNTIL"]},"deadlineUtc":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Submit-by time (window close minus safety margin) or re-check time, UTC ISO-8601."},"confidence":{"type":"string","enum":["low","medium","high"]},"abstention":{"type":"object","description":"Set when no judgment was made (unsupported market, blocked state, insufficient evidence)."},"reasons":{"type":"array","items":{"type":"string"}},"market":{"type":"object"},"proposal":{"type":"object"},"window":{"type":"object"},"probabilities":{"type":"object"},"ev":{"type":"object","description":"EV of DISPUTE and ABSTAIN with bond, lock, gas and position components, plus breakeven probability and sensitivity."},"judgment":{"type":"object","description":"Ensemble and red-team outputs with verified quotes."},"evidence":{"type":"object"},"whatWouldChangeTheVerdict":{"type":"array","items":{"type":"string"}},"assumptions":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/cover-claim":{"post":{"operationId":"cover_claim","summary":"DeFi Cover Claim Adjudicator","description":"Predicts whether a DeFi cover claim (Nexus Mutual or any provider's wording) will be approved and for how much. Reads the wording, postmortems and the claimant's transactions, quantifies net token loss with Chainlink prices at the loss block, maps facts to covered events, exclusions and conditions with verbatim verified clauses, cites similar past claims, and returns calibrated P(approved), expected payout, an assessor vote (APPROVE/DENY/ABSTAIN), a claimant action (FILE/FILE_WITH_MORE_EVIDENCE/DO_NOT_FILE) and the missing evidence that would change the verdict.\n\nPrice: 5.00 USDC on Base (x402).","x-x402-price-usdc":"5.00","x-x402-amount":"5000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["wording","claimant","cover"],"properties":{"wording":{"type":"object","additionalProperties":false,"description":"The cover wording: a Nexus Mutual product (id or name), a URL (HTML or PDF), or pasted text. At least one.","properties":{"productId":{"type":"integer","minimum":0,"maximum":1000000,"description":"Nexus Mutual product id (api.nexusmutual.io/v2/products)."},"productName":{"type":"string","minLength":2,"maxLength":200,"description":"Nexus Mutual product or product-type name, e.g. \"Single Protocol Cover\"."},"url":{"type":"string","minLength":8,"maxLength":2000,"description":"Public URL of any provider's wording (PDF, HTML or text)."},"text":{"type":"string","minLength":200,"maxLength":60000,"description":"Wording text; overrides the other fields."}}},"incident":{"type":"object","additionalProperties":false,"properties":{"description":{"type":"string","minLength":10,"maxLength":20000},"postmortemUrls":{"type":"array","maxItems":4,"items":{"type":"string","minLength":8,"maxLength":2000}},"occurredAt":{"type":"string","minLength":10,"maxLength":40,"description":"ISO 8601 time the loss event began, if known."}}},"transactions":{"type":"array","maxItems":12,"description":"Transactions in which the claimant lost (or deposited, or recovered) funds.","items":{"type":"object","additionalProperties":false,"required":["chain","hash"],"properties":{"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"]},"hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}}},"claimant":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that suffered the loss (the Impacted Account)."},"cover":{"type":"object","additionalProperties":false,"required":["amount","asset","start","end"],"properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000,"description":"Cover amount in units of the cover asset."},"asset":{"type":"string","minLength":2,"maxLength":20,"description":"Cover asset symbol, e.g. ETH, USDC, DAI, cbBTC."},"start":{"type":"string","minLength":10,"maxLength":40,"description":"ISO 8601 cover start."},"end":{"type":"string","minLength":10,"maxLength":40,"description":"ISO 8601 cover end."}}},"deductible":{"type":"object","additionalProperties":false,"description":"Overrides any deductible found in the wording. Amount in cover-asset units; percentages 0-100.","properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000},"percentOfCover":{"type":"number","minimum":0,"maximum":100},"percentOfLoss":{"type":"number","minimum":0,"maximum":100},"basis":{"type":"string","enum":["from_loss","from_capped_loss"],"description":"from_loss (default, Nexus clause 6): min(loss - deductible, cover). from_capped_loss: min(loss, cover) - deductible."}}},"claimedLoss":{"type":"object","additionalProperties":false,"description":"Loss the claimant asserts, in cover-asset units. Used for the payout only when no on-chain loss can be established; always reported as unverified.","properties":{"amount":{"type":"number","minimum":0,"maximum":1000000000000}},"required":["amount"]},"claimDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO 8601 date the claim is (to be) filed; default now."}}},"example":{"wording":{"productName":"Single Protocol Cover"},"incident":{"description":"The protocol's lending pool was drained through a reentrancy bug in its withdraw function; the team published a postmortem confirming the exploit and affected depositors.","postmortemUrls":["https://example.com/postmortem"],"occurredAt":"2024-10-04T11:31:28Z"},"transactions":[{"chain":"ethereum","hash":"0x1b84e51a0b3f682ce7636170f9a18fcb3cc532661c1ce65f9733e2b5ce74a29f"}],"claimant":"0x760513ef6f45da1964128848f8962c02fb4770c9","cover":{"amount":10000,"asset":"USDC","start":"2024-09-25T00:00:00Z","end":"2024-12-25T00:00:00Z"},"deductible":{"percentOfCover":5},"claimDate":"2024-10-11T00:00:00Z"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recommendation_assessor":{"type":"string","enum":["APPROVE","DENY","ABSTAIN"],"description":"Vote advice for a claim assessor."},"recommendation_claimant":{"type":"string","enum":["FILE","FILE_WITH_MORE_EVIDENCE","DO_NOT_FILE"]},"refile_after":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO time when the wording's cool-down ends, when filing is premature; otherwise null."},"decided_by":{"type":"string","enum":["deterministic_hard_gate","model_ensemble"],"description":"deterministic_hard_gate: a failed hard gate (filing deadline, cover period) decided the verdict in code with no model call."},"llm_calls":{"type":"integer","description":"Number of model calls this answer used."},"clause_map_source":{"type":"string","enum":["none","code_parsed","model"],"description":"Whether clauses and terms were read from the wording by code or by a model."},"p_approved":{"type":"number","description":"Calibrated probability the claim is approved (0-1)."},"p_interval":{"type":"array","items":{"type":"number"}},"confidence":{"type":"number","description":"0-1; falls with ensemble disagreement, dropped quotes and decisive evidence gaps."},"payout":{"type":"object","description":"Cover-asset amounts: measured_loss, deductible, claim_amount_if_approved, expected_payout, claim_deposit, expected_value_of_filing."},"deciding_clauses":{"type":"array","items":{"type":"object"},"description":"Covered-event, exclusion and condition clauses, each verified verbatim against the wording."},"cleared_exclusions":{"type":"array","items":{"type":"object"}},"gates":{"type":"array","items":{"type":"object"},"description":"Deterministic checks: event within cover period, filing window, cool-down, materiality."},"timing":{"type":"object"},"losses":{"type":"array","items":{"type":"object"},"description":"Per-token net flows of the claimant with Chainlink pricing at the loss block, or the reason a token is unpriced."},"transactions":{"type":"array","items":{"type":"object"}},"precedents":{"type":"array","items":{"type":"object"},"description":"Most similar past Nexus Mutual claims with outcomes and verified excerpts."},"missing_evidence":{"type":"array","items":{"type":"object"},"description":"Evidence that would change the verdict."},"ensemble":{"type":"object"},"red_team":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Adversarial assessor pass arguing for denial; null when no model ran or the pass failed."},"decisive_clause_quotes":{"type":"array","items":{"type":"string"}},"reasoning":{"type":"array","items":{"type":"string"}},"incident":{"type":"object"},"unverified_quotes_dropped":{"type":"integer"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/vault-exit":{"post":{"operationId":"vault_exit_lawyer","summary":"Vault Exit Lawyer","description":"Before moving treasury funds out of an ERC-4626 or ERC-7540 vault: reads the chain at one pinned block and returns how much can exit now, the haircut vs convertToAssets, partial-exit maximum, liquidity coverage, queue/cooldown timing, admin-power flags (upgrade, pause, multisig threshold, timelock), and a verdict EXIT_NOW_FULL / EXIT_PARTIAL / QUEUED / BLOCKED / UNKNOWN. With a holder it simulates redeem via eth_call. Optional docsUrls are checked against the contract for contradictions. All numbers are computed deterministically; the model only reads documentation.\n\nPrice: 0.25 USDC on Base (x402).","x-x402-price-usdc":"0.25","x-x402-amount":"250000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["chain","vault","exit"],"properties":{"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"],"description":"Chain the vault lives on."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-4626 or ERC-7540 vault address."},"exit":{"type":"object","additionalProperties":false,"description":"Exactly one of shares or assets, as base-unit integer strings. shares may be \"max\" (needs holder).","properties":{"shares":{"type":"string","pattern":"^([0-9]{1,78}|max)$","description":"Vault shares to redeem (base units), or \"max\" for the holder's whole balance."},"assets":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Underlying assets to receive (base units)."}}},"holder":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that holds the shares. Enables an exact eth_call redeem simulation and per-holder limits."},"docsUrls":{"type":"array","maxItems":4,"items":{"type":"string","maxLength":2000},"description":"Public documentation pages whose redemption claims are checked against the contract."}}},"example":{"chain":"ethereum","vault":"0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB","exit":{"shares":"1000000000000000000000"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chain":{"type":"string"},"vault":{"type":"string"},"block_number":{"type":"integer"},"block_timestamp":{"type":"integer"},"verdict":{"type":"string","enum":["EXIT_NOW_FULL","EXIT_PARTIAL","QUEUED","BLOCKED","UNKNOWN"]},"verdict_reasons":{"type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["high","medium","low"]},"vault_info":{"type":"object","description":"Name, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540)."},"request":{"type":"object","description":"Resolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values."},"holder":{"type":"object","description":"Holder balance, maxRedeem, maxWithdraw, pending/claimable requests, cooldown."},"exitable_now":{"type":"object","description":"assets, shares, basis (simulation | liquidity_pool | claimable_queue | ...)."},"haircut":{"type":"object","description":"fee_haircut_bps = price haircut vs convertToAssets; undeliverable_now_bps = share of the exit that cannot leave this block; effective_haircut_bps (null when QUEUED, which is delay not loss)."},"partial_exit_max":{"type":"object","description":"Largest exit that works now (shares, assets, method, resolution_shares)."},"time_to_full_exit":{"type":"object","description":"kind, seconds (null when the contract states no schedule), basis."},"liquidity":{"type":"object","description":"Pool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts."},"simulation":{"type":"object","description":"eth_call result of redeem (or requestRedeem for ERC-7540) from the holder."},"admin":{"type":"object","properties":{"proxy":{"type":"object"},"controllers":{"type":"array","items":{"type":"object"}},"power":{"type":"object","properties":{"flags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","warn","critical"]},"detail":{"type":"string"}}}}}}}},"unknowns":{"type":"array","items":{"type":"string"}},"what_would_change_verdict":{"type":"array","items":{"type":"string"}},"docs_analysis":{"type":"object","description":"Claims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/mine-foreign-research":{"post":{"operationId":"foreignResearchScout","summary":"Cross-Lingual Dark Science Arbitrage Scout","description":"Mines non-English scientific literature (OpenAlex, Crossref, HAL, J-STAGE, Europe PMC) for work with no English-language twin: native-terminology keyword plan per language, English-twin screening, English methodology translation, pattern-extracted quote-verified quantitative results, index-sourced institutions, a computed known-in-English risk (OpenAlex English citers and title similarity), and a deterministic 0-100 commercial whitespace score from a model judgment ensemble. Degrades gracefully when one index fails and reports sourcesQueried and sourceFailures.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"researchTopic":{"type":"string","minLength":3,"maxLength":500,"description":"English research topic, e.g. \"sulfide solid electrolytes for all-solid-state lithium batteries\"."},"technicalBottleneck":{"type":"string","minLength":3,"maxLength":1000,"description":"English description of an unsolved technical bottleneck. Provide this or researchTopic (or both)."},"targetLanguages":{"type":"array","maxItems":6,"items":{"type":"string","pattern":"^[A-Za-z]{2}$"},"description":"ISO 639-1 codes of non-English languages to mine (max 6). Default zh, ja, de, fr, ko."},"fromDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest publication date. Default: 10 years before the call."},"toDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest publication date (inclusive)."},"maxResults":{"type":"integer","minimum":1,"maximum":8,"description":"Discoveries to return (default 5, max 8)."}}},"example":{"researchTopic":"sulfide solid electrolytes for all-solid-state lithium batteries","targetLanguages":["ja","zh","de"],"fromDate":"2020-01-01","maxResults":5}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["status","researchFocus","searchPlan","discoveries","droppedAsEnglishTwin","sourcesQueried","sourceFailures","coverage","scoringFormula","evidenceGaps"],"properties":{"status":{"type":"string","enum":["OK","INSUFFICIENT_EVIDENCE"]},"researchFocus":{"type":"string"},"searchPlan":{"type":"object","additionalProperties":false,"required":["englishQuery","languages"],"properties":{"englishQuery":{"type":"string"},"languages":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["language","queries","synonyms","abbreviations"],"properties":{"language":{"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"synonyms":{"type":"array","items":{"type":"string"}},"abbreviations":{"type":"array","items":{"type":"string"}}}}}}},"discoveries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["ref","title","language","languageInferred","altTitle","englishTitle","institutions","institutionType","doi","url","source","venue","publicationDate","citedByCount","methodologyEn","methodologyQuoteVerified","quantitativeResults","commercialWhitespaceScore","scoreComponents","provenance","rationale","englishTwin","confidence","evidenceGaps"],"properties":{"ref":{"type":"string"},"title":{"type":"string","description":"Original-language title."},"language":{"type":"string","description":"ISO 639-1."},"languageInferred":{"type":"boolean"},"altTitle":{"anyOf":[{"type":"string","description":"Alternate-language title from the index (often English)."},{"type":"null"}]},"englishTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"institutions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","country","evidence","type"],"properties":{"name":{"type":"string"},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"string"},"type":{"type":"string"}}}},"institutionType":{"type":"string"},"doi":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"source":{"type":"string"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicationDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"citedByCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"methodologyEn":{"anyOf":[{"type":"string","description":"English translation of the methodology; null when the metadata does not describe one."},{"type":"null"}]},"methodologyQuoteVerified":{"type":"boolean"},"quantitativeResults":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["metric","value","unit","quote","quoteGlossEn"],"properties":{"metric":{"type":"string"},"value":{"type":"string"},"unit":{"type":"string"},"quote":{"type":"string","description":"Verbatim source-language excerpt, checked against the title/abstract."},"quoteGlossEn":{"type":"string"}}}},"commercialWhitespaceScore":{"type":"number","description":"0-100, computed in code."},"scoreComponents":{"type":"object","additionalProperties":true,"description":"Inputs and multiplicative factors behind the score."},"provenance":{"type":"object","additionalProperties":false,"required":["quantitativeResults","institutions","knownInEnglishRisk","judgments"],"properties":{"quantitativeResults":{"type":"string"},"institutions":{"type":"string"},"knownInEnglishRisk":{"type":"string"},"judgments":{"type":"string"}}},"rationale":{"type":"object","additionalProperties":false,"required":["novelty","commercialReadiness"],"properties":{"novelty":{"type":"string"},"commercialReadiness":{"type":"string"}}},"englishTwin":{"type":"object","additionalProperties":false,"required":["status","indexesChecked","note"],"properties":{"status":{"type":"string","enum":["none_found","unverified"]},"indexesChecked":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}}},"confidence":{"type":"number","description":"0-1."},"evidenceGaps":{"type":"array","items":{"type":"string"}}}}},"droppedAsEnglishTwin":{"type":"array","items":{"type":"object","additionalProperties":true}},"sourcesQueried":{"type":"array","items":{"type":"string"}},"sourceFailures":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["source","error","count"],"properties":{"source":{"type":"string"},"error":{"type":"string"},"count":{"type":"number"}}}},"coverage":{"type":"object","additionalProperties":true},"scoringFormula":{"type":"string"},"evidenceGaps":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/arxiv-to-code":{"post":{"operationId":"arxiv_to_code","summary":"arXiv-to-Production Code & Hyperparameter Compiler","description":"Fetches an arXiv paper's full text (ar5iv), selects method, pseudocode, hyperparameter tables and ablations, and returns a core-algorithm summary, hyperparameters each with a source pointer and a verbatim quote verified against the text, ablation warnings with evidence sentences, and one self-contained TypeScript or Python file that is compile/syntax-checked and literal-checked against the extracted values. Falls back to the abstract (lower confidence) when no full-text rendering exists. Generated code is never executed.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["targetLanguage"],"properties":{"arxivId":{"type":"string","maxLength":120,"description":"arXiv id or URL, e.g. 1706.03762 or https://arxiv.org/abs/1706.03762."},"searchQuery":{"type":"string","maxLength":300,"description":"Title or keywords; the top arXiv hit is used. Provide exactly one of arxivId or searchQuery."},"targetLanguage":{"type":"string","enum":["typescript","python"]}}},"example":{"arxivId":"1706.03762","targetLanguage":"python"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["OK","PARTIAL","INSUFFICIENT_EVIDENCE"]},"paper":{"type":"object"},"targetLanguage":{"type":"string"},"coreAlgorithmSummary":{"type":"string"},"extractedHyperparameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"codeIdentifier":{"type":"string"},"value":{"type":"string"},"numericValue":{"type":"number"},"unit":{"type":"string"},"source":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"row":{"type":"integer","description":"1-based table row, 0 if not a table."}}},"quote":{"type":"string","description":"Verified verbatim against the extracted paper text."},"agreement":{"type":"object"},"verifier":{"type":"string"}}}},"droppedHyperparameters":{"type":"array","items":{"type":"object"}},"ablationWarnings":{"type":"array","items":{"type":"object"}},"productionCode":{"type":"string"},"codeCheck":{"type":"object"},"literalCheck":{"type":"object"},"provenance":{"type":"object","description":"Which results were decided deterministically (extractor corroboration, generated constants header, in-place literal patches) and how many model calls were attempted."},"evidence":{"type":"object"},"confidence":{"type":"number"},"warnings":{"type":"array","items":{"type":"string"}},"whatWouldChange":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/find-prior-art":{"post":{"operationId":"prior_art_invalidator","summary":"Global Prior-Art Patent Invalidator","description":"Segments patent claims into elements in code (dependent claims inherit their parents' elements; claims, priority date and cited art can be read from a patent number), searches arXiv, OpenAlex, Europe PMC, Crossref, HAL and J-STAGE with a strict published-before-priority-date cutoff, maps references to elements with verbatim verified quotes (translated when not English), and computes 102 anticipation, minimal 103 combinations and a rule-based invalidation probability. Evidence is abstract/metadata level; not legal advice.\n\nPrice: 2.50 USDC on Base (x402).","x-x402-price-usdc":"2.50","x-x402-amount":"2500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"patentClaimsText":{"type":"string","minLength":20,"maxLength":20000,"description":"Claims to attack, numbered as in the patent (e.g. \"1. A method ...\"). Optional when patentNumber is given: the independent claims are then read from Google Patents. A dependent claim is charted with every element of its parents."},"priorityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest effective filing/priority date, YYYY-MM-DD. Only works published strictly before it count. Optional when patentNumber is given; a supplied date wins over the Google Patents date and a disagreement is reported."},"patentNumber":{"type":"string","maxLength":40,"description":"Publication number such as US7629993B2. Claims, priority date and cited art are read from Google Patents when the claims or the date are omitted, and the date is cross-checked otherwise. Required unless both patentClaimsText and priorityDate are given."}}},"example":{"patentNumber":"US-EXAMPLE-0000001","priorityDate":"2017-06-01","patentClaimsText":"1. A method of approximate nearest neighbor search comprising: hashing each data vector with a plurality of locality-sensitive hash functions to generate hash codes; storing the vectors in hash tables indexed by the hash codes; and, for a query vector, retrieving candidate vectors from the buckets matching the query's hash codes and ranking the candidates by exact distance to the query vector."}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"verdict":{"type":"string","enum":["ANTICIPATION_LIKELY","OBVIOUSNESS_LIKELY","INSUFFICIENT_EVIDENCE"]},"abstentionReason":{"type":"string"},"invalidationProbability":{"type":"integer","description":"0-100; minimum over claims, capped at 85 by the abstract-level evidence penalty."},"anyClaimInvalidationProbability":{"type":"integer"},"confidence":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"probabilityComponents":{"type":"object"},"claims":{"type":"array","items":{"type":"object"}},"best102":{"type":"object","properties":{"comboId":{"type":"string"},"type":{"type":"string","enum":["anticipation-102","obviousness-103","partial"]},"referenceIds":{"type":"array","items":{"type":"string"}},"probability":{"type":"number"},"components":{"type":"object"},"motivationToCombine":{"type":"object"}}},"best103":{"type":"array","items":{"type":"object","properties":{"comboId":{"type":"string"},"type":{"type":"string","enum":["anticipation-102","obviousness-103","partial"]},"referenceIds":{"type":"array","items":{"type":"string"}},"probability":{"type":"number"},"components":{"type":"object"},"motivationToCombine":{"type":"object"}}}},"claimChart":{"type":"array","items":{"type":"object"}},"references":{"type":"array","items":{"type":"object"}},"gaps":{"type":"array","items":{"type":"string"}},"whatWouldChange":{"type":"array","items":{"type":"string"}},"searchCoverage":{"type":"object"},"ensemble":{"type":"object"},"cutoff":{"type":"string"},"priorityDateCheck":{"type":"object","description":"Which priority date was used (input or Google Patents), both values, and whether they disagree."},"provenance":{"type":"object","description":"Where the claims came from and which steps were deterministic."},"patent":{"type":"object","description":"Google Patents data used: status, claims read, citations read and the citation titles used as search seeds."},"disclaimer":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-replication":{"post":{"operationId":"replication_auditor","summary":"Scientific Consensus & Replication Failure Auditor","description":"Resolves a paper (DOI/title) or free-text claim, mines citing works and citation-context sentences from Semantic Scholar, OpenAlex and Europe PMC, checks Crossref/Europe PMC/OpenAlex retraction and erratum status (a retraction short-circuits to UNREPLICABLE_HYPE without model calls), reports scite.ai citation tallies as a separate signal, and returns a deterministic replicationRiskScore with ROBUST / CONTESTED / UNREPLICABLE_HYPE / INSUFFICIENT_EVIDENCE. Every contradicting study carries a verified verbatim quote.\n\nPrice: 0.75 USDC on Base (x402).","x-x402-price-usdc":"0.75","x-x402-amount":"750000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"paperTitleOrDoi":{"type":"string","minLength":3,"maxLength":500,"description":"DOI (10.xxxx/...) or title of the paper to audit."},"scientificClaim":{"type":"string","minLength":10,"maxLength":2000,"description":"Free-text claim; the originating and closely related works are located by search. Used as context when a paper is also given."}}},"example":{"paperTitleOrDoi":"10.1126/science.aac4716"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","description":"Resolved work: title, doi, year, venue, authors, url, citedByCount, resolved, resolvedVia."},"supportingStudiesCount":{"type":"integer","description":"Distinct works with a verified supporting quote."},"contradictingStudies":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"doi":{"type":"string"},"year":{"type":"integer"},"url":{"type":"string"},"label":{"type":"string","enum":["contradicts","failed-replication","methodological-critique"]},"quote":{"type":"string","description":"Verbatim, verified against the fetched citation context or abstract."},"weight":{"type":"number"},"agreement":{"type":"number"},"decidedBy":{"type":"string","enum":["lexicon","model"],"description":"lexicon: a plain replication statement in the citation context, decided in code; cue is the matched phrase."},"cue":{"type":"string"}}}},"methodologicalRedFlags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"quote":{"type":"string"},"source":{"type":"string"},"explanation":{"type":"string"},"deterministic":{"type":"boolean"}}}},"integrity":{"type":"object","description":"Retraction/erratum/expression-of-concern status from Crossref, Europe PMC and OpenAlex, sample-size hints, citation velocity."},"independentSignals":{"type":"object","description":"scite.ai supporting/contradicting/mentioning tallies for the target DOI (null when unavailable). Reported separately; not part of replicationRiskScore."},"decision":{"type":"object","description":"basis \"retraction\" (deterministic: no model call was needed; evidence lists the retraction notices) or \"classified-evidence\"."},"replicationRiskScore":{"type":"integer","description":"0-100; 100 when retracted."},"scoreComponents":{"type":"object"},"verdict":{"type":"string","enum":["ROBUST","CONTESTED","UNREPLICABLE_HYPE","INSUFFICIENT_EVIDENCE"]},"confidence":{"type":"integer","description":"0-100."},"wouldChangeVerdict":{"type":"array","items":{"type":"string"}},"coverage":{"type":"object","description":"Sources reached, items assessed, quote verification rates, failures."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/mine-abandoned-compounds":{"post":{"operationId":"abandoned_compound_miner","summary":"Abandoned Compound & Uncommercialized Trial Miner","description":"Mines ClinicalTrials.gov for terminated, withdrawn and suspended studies and for completed Phase 1/2 non-industry studies with no later industry Phase 2/3/4 trial, joins Europe PMC and OpenAlex literature, classifies why each was shelved (keyword rules; one fast model call only for an ambiguous reason or a missing mechanism, verified by verbatim quote), checks ChEMBL and the FDA Orange Book for approved, withdrawn or boxed-warning molecules, and strictly excludes any candidate with a safety, toxicity or drug-versus-placebo adverse-event excess. Returns a Repurposing Dossier per survivor: trials with NCT links, mechanism, shelving reason, safety/dosage data, IP window estimate, US regulatory pathway with non-compliant routes flagged, evidence grade, computed concerns and a deterministic de-risk score. One candidate failing does not discard the others. Not medical or regulatory advice.\n\nPrice: 2.00 USDC on Base (x402).","x-x402-price-usdc":"2.00","x-x402-amount":"2000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"biologicalTargetOrCondition":{"type":"string","minLength":2,"maxLength":200,"description":"Disease, condition or biological target (e.g. \"amyotrophic lateral sclerosis\", \"BACE1\"). Mines stopped and completed-without-follow-up clinical trials."},"materialProperty":{"type":"string","minLength":2,"maxLength":200,"description":"Desired material property (e.g. \"high ionic conductivity solid electrolyte\"). Mines the literature indexes; no trials are involved."},"includeCompletedNoFollowUp":{"type":"boolean","description":"Include completed Phase 1/2 non-industry trials with no later industry Phase 2/3/4 trial of the same intervention. Default true."},"maxCandidates":{"type":"integer","minimum":1,"maximum":8,"description":"Dossiers to produce (default 4, max 8). Model cost is at most one fast call per candidate."}}},"example":{"biologicalTargetOrCondition":"amyotrophic lateral sclerosis","includeCompletedNoFollowUp":true,"maxCandidates":4}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"query":{"type":"object"},"result":{"type":"string","enum":["CANDIDATES_FOUND","NO_CANDIDATES"]},"dossiers":{"type":"array","items":{"type":"object"}},"excluded":{"type":"array","items":{"type":"object"},"description":"Compounds removed by deterministic rules, with signals and quotes."},"funnel":{"type":"object"},"what_would_change_the_call":{"type":"array","items":{"type":"string"}},"limitations":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"candidate_errors":{"type":"array","items":{"type":"object"},"description":"Candidates whose review failed; the remaining candidates are still returned."},"disclaimer":{"type":"string"},"analyzed_at":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/unicode-safety-gate":{"post":{"operationId":"unicode_safety_gate","summary":"Adversarial Unicode & Trojan Source gatekeeper","description":"Scans files or a unified diff for adversarial Unicode with the 19 rules (USC001-USC019) of dcondrey/unicode-safety-check: bidi controls (Trojan Source), invisible and default-ignorable characters, variation-selector and tag-character payloads (Glassworm), private-use code points, homoglyph and mixed-script identifiers, confusable collisions, misplaced BOM and control characters. Returns findings with 1-based code point columns, a SARIF 2.1.0 log, a block/warn/pass verdict derived from severities, and model-written exploit explanations pinned to the findings.\n\nPrice: 0.25 USDC on Base (x402).","x-x402-price-usdc":"0.25","x-x402-amount":"250000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"files":{"type":"array","minItems":1,"maxItems":500,"description":"Files to scan in full. Provide exactly one of files or diff; total content is capped at 1000000 characters.","items":{"type":"object","additionalProperties":false,"required":["path","content"],"properties":{"path":{"type":"string","minLength":1,"maxLength":500,"description":"Repository-relative path; its extension selects the language and the file risk level."},"content":{"type":"string","maxLength":1000000}}}},"diff":{"type":"string","minLength":1,"maxLength":1000000,"description":"Unified diff (git diff output). Only added lines are scanned; findings carry new-file line numbers."},"identifierPolicy":{"type":"string","enum":["ascii-only","permitted-scripts"],"description":"Default ascii-only: any non-ASCII identifier is flagged (USC019)."},"permittedScripts":{"type":"array","maxItems":40,"items":{"type":"string","maxLength":40},"description":"Used with permitted-scripts. Default Latin, Common, Inherited."},"scanExcluded":{"type":"boolean","description":"Also scan paths the upstream scanner skips (node_modules/, vendor/, dist/, build/, .lock, .min.js, images, archives). Default false."}}},"example":{"files":[{"path":"src/auth.js","content":"const isAdmin = false;\nif (isAdmin‮ ⁦// check later⁩ ⁦) {\n  grant();\n}\n"}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"verdict":{"type":"string","enum":["block","warn","pass"]},"verdictReason":{"type":"string"},"mode":{"type":"string","enum":["files","diff"]},"summary":{"type":"object","properties":{"total":{"type":"integer"},"returned":{"type":"integer"},"truncated":{"type":"boolean"},"bySeverity":{"type":"object","properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"}}},"byRule":{"type":"object","description":"Count per rule id, all 19 rules present."},"blocking":{"type":"integer"},"filesScanned":{"type":"integer"},"filesSkipped":{"type":"integer"}}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable within this response, F1, F2, ..."},"ruleId":{"type":"string","description":"USC001-USC019"},"ruleName":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low"]},"path":{"type":"string"},"line":{"type":"integer"},"column":{"type":"integer","description":"1-based, in code points."},"codePoints":{"type":"string","description":"Space-separated, e.g. \"U+202E\"."},"snippet":{"type":"string","description":"Surrounding text with invisible, control and lookalike characters shown as \\u{XXXX}."},"message":{"type":"string"},"charInfo":{"type":"string"}}}},"sarif":{"type":"object","description":"SARIF 2.1.0 log; columnKind unicodeCodePoints."},"skipped":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"type":"string"}},"explanations":{"type":"array","description":"Model-written, each verified against the finding it names (id, ruleId and codePoints must match).","items":{"type":"object","additionalProperties":false,"required":["id","ruleId","codePoints","attackVector","impact","remediation"],"properties":{"id":{"type":"string","description":"Finding id exactly as given, e.g. F3."},"ruleId":{"type":"string","description":"The finding's ruleId, copied exactly."},"codePoints":{"type":"string","description":"The finding's codePoints, copied exactly."},"attackVector":{"type":"string","description":"How this specific construct is exploited."},"impact":{"type":"string","description":"What an attacker gains if it is merged."},"remediation":{"type":"string","description":"What the reviewer should do."}}}},"llm":{"type":"string","enum":["ok","unavailable","skipped"]},"deterministic":{"type":"object","description":"Engine, finding count, verdict basis and known limits. Findings and verdict involve no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-prose-forensics":{"post":{"operationId":"audit_prose_forensics","summary":"Forensic AI-trajectory & prose craft auditor","description":"Deterministic prose forensics: word echoes within 50 words, repeated 3-6-grams, sentence-starter runs, hedge/filter/passive/nominalization density, burstiness, MATTR, Flesch-Kincaid, vocabulary fingerprints, AI syntactic tics (Not X. Y. pivots, verbless fragments, autonomous body parts), optional revision-history trajectory, and an editorial humanization map whose quotes are verified verbatim. Every finding has exact offsets and line:column. The humanTrajectoryScore is a documented heuristic, not proof of authorship.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":300000,"description":"Plain-text prose to audit (English)."},"revisionHistory":{"type":"array","maxItems":50,"description":"Earlier drafts of the same text with ISO-8601 timestamps; adds a revision trajectory as process evidence.","items":{"type":"object","additionalProperties":false,"required":["timestamp","text"],"properties":{"timestamp":{"type":"string","minLength":4,"maxLength":40,"description":"ISO-8601 date-time."},"text":{"type":"string","maxLength":200000}}}},"genre":{"type":"string","enum":["fiction","memoir","essay","journalism","academic","business","other"],"description":"Context for the editorial pass only."}}},"example":{"text":"Not a mistake. A choice. Her heart pounded as she stepped inside. Pure silence. She felt that she could really see the room, and it seemed to be somewhat empty. This isn't just a house, it's a home. She made a decision to stay.","revisionHistory":[{"timestamp":"2026-11-01T09:00:00Z","text":"Not a mistake. A choice."},{"timestamp":"2026-11-01T09:20:00Z","text":"Not a mistake. A choice. Her heart pounded as she stepped inside."}],"genre":"fiction"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"humanTrajectoryScore":{"type":"number","description":"0-100 heuristic; higher means more human-like signals. Not proof of authorship."},"scoreBand":{"type":"string"},"confidence":{"type":"string","enum":["low","medium","high"]},"heuristicNotice":{"type":"string"},"genre":{"type":"string"},"genreNote":{"type":"string"},"deterministic":{"type":"object","properties":{"conventions":{"type":"object"},"text":{"type":"object"},"metrics":{"type":"object","description":"echoes, repeatedNgrams, sentenceStarters, hedges, filterWords, passiveVoice, nominalizations, sentenceLengthWords, paragraphLengthWords, rhythm, mattr, readability, stylometrics, aiTics."},"findings":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"category":{"type":"string"},"message":{"type":"string"},"start":{"type":"integer"},"end":{"type":"integer"},"line":{"type":"integer"},"column":{"type":"integer"},"endLine":{"type":"integer"},"endColumn":{"type":"integer"},"text":{"type":"string","description":"Verbatim span of the submitted text."},"related":{"type":"object"}}}},"findingCounts":{"type":"object"},"repeats":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"words":{"type":"integer"},"count":{"type":"integer"},"occurrences":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"},"line":{"type":"integer"},"column":{"type":"integer"},"endLine":{"type":"integer"},"endColumn":{"type":"integer"},"text":{"type":"string","description":"Verbatim span of the submitted text."}}}}}}},"scoreComponents":{"type":"array","items":{"type":"object"}},"scoreModel":{"type":"object"},"revisionTrajectory":{"type":"object","description":"Present when revisionHistory has entries."}}},"llm":{"type":"string","enum":["ok","unavailable"]},"llmNote":{"type":"string"},"humanizationMap":{"type":"object","properties":{"summary":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"},"line":{"type":"integer"},"column":{"type":"integer"},"endLine":{"type":"integer"},"endColumn":{"type":"integer"},"text":{"type":"string","description":"Verbatim span of the submitted text."},"issue":{"type":"string","enum":["ai_tic","hedge_or_filler","generic_phrasing","rhythm","abstraction","repetition","cliche","other"]},"rewrite":{"type":"string"},"why":{"type":"string"}}}},"droppedUnverified":{"type":"integer"},"truncatedForModel":{"type":"boolean"}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/crosstalk-deliberate":{"post":{"operationId":"crosstalk_deliberate","summary":"Crosstalk epistemic swarm & falsification engine","description":"Runs the Crosstalk reasoning protocol on a question: classifies the domain, generates up to 3 independent hypotheses, attacks each with an adversarial falsification pass, checks live literature on arXiv and OpenAlex (every record content-addressed by sha256), then synthesizes a calibrated answer with unresolved cruxes and one decisive falsification probe. Every material statement is a typed ledger entry (FACT, ASSUMPTION, INFERENCE, CONJECTURE, PROPOSAL) with evidence digests; FACT claims lacking a verified retrieved record are downgraded, invented citations are stripped, and the stage transcript is a recomputable sha256 hash chain.\n\nPrice: 2.00 USDC on Base (x402).","x-x402-price-usdc":"2.00","x-x402-amount":"2000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["question"],"properties":{"question":{"type":"string","minLength":3,"maxLength":4000,"description":"The question or claim to deliberate."},"context":{"type":"string","maxLength":8000,"description":"Optional background, constraints, data or prior attempts."},"maxHypotheses":{"type":"integer","minimum":1,"maximum":3,"description":"Independent hypotheses to generate and attack (default 3)."}}},"example":{"question":"Does chain-of-thought prompting improve accuracy on multi-step arithmetic in large language models, and does the effect persist at larger scale?","context":"Interested in published empirical results, not opinion.","maxHypotheses":2}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"question":{"type":"string"},"domain":{"type":"string","enum":["cryptanalysis","decipherment","history","mathematics","natural_science","cs_ai_engineering","debate_decision","general"]},"llm":{"type":"string","enum":["ok","partial","unavailable"],"description":"partial/unavailable: a model stage failed with a 5xx; deterministic results are still returned."},"conclusion":{"type":"array","items":{"type":"object"},"description":"Calibrated answer, as ledger entries."},"confidence":{"type":"number","description":"Mean confidence of the conclusion entries after the evidence caps; null when none."},"cruxes":{"type":"array","items":{"type":"object"},"description":"Open or contested ledger entries the answer depends on."},"falsificationProbe":{"type":"object","description":"The one PROPOSAL ledger entry naming the decisive next experiment, or null."},"hypotheses":{"type":"array","items":{"type":"object"}},"ledger":{"type":"array","items":{"type":"object"},"description":"{id, type, text, evidenceDigests[], confidence, status, evidence[], originalType?}."},"edges":{"type":"array","items":{"type":"object"}},"evidence":{"type":"object","description":"Retrieved records with sha256 digests, per-query lookups with response digests and any failures."},"transcript":{"type":"object","description":"Stage inputs/outputs, per-stage digests and chainHead; recompute with the stated algorithm."},"deterministic":{"type":"object","description":"Ledger discipline adjustments, statistics, coverage, ledgerSha256 and a self-check of the transcript chain."},"warnings":{"type":"array","items":{"type":"string"}},"analyzedAt":{"type":"string"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-public-record":{"post":{"operationId":"audit_public_record","summary":"OnRecord statutory clock & redaction auditor","description":"Audits an agency's public-records response: computes the statutory response deadline and days late (California CPRA, with the court-day calendar and § 7922.535 extension rules), flags redactions without an exemption citation, passages redacted in one document but readable in another, referenced attachments that were not supplied, and gaps in the document timeline. Every claim carries UTF-8 byte offsets and SHA-256 hashes of the exact span and the whole document; the narrative and appeal points may cite only those ids.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["jurisdiction","requestDate","documents"],"properties":{"jurisdiction":{"type":"string","minLength":2,"maxLength":40,"description":"OnRecord jurisdiction code. Only \"CA_CPRA\" (alias \"US-CA\") has a statute table; any other value returns clock \"unknown_jurisdiction\" while document checks still run."},"requestDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(?:[T ].*)?$","maxLength":40,"description":"Date the agency received the request (YYYY-MM-DD or RFC 3339; read in the offset written)."},"responseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(?:[T ].*)?$","maxLength":40,"description":"Date of the agency's determination/response. Omit if none yet."},"asOfDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(?:[T ].*)?$","maxLength":40,"description":"Observation date when responseDate is omitted; defaults to today (UTC)."},"extensionNotices":{"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["noticeDate","expectedDate","reason","noticeSource"],"properties":{"noticeDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(?:[T ].*)?$","maxLength":40},"expectedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(?:[T ].*)?$","maxLength":40,"description":"Date the agency says its determination will be dispatched."},"reason":{"type":"string","maxLength":80,"description":"One of SEPARATE_FIELD_FACILITIES, VOLUMINOUS_RECORDS, INTERAGENCY_CONSULTATION, DATA_COMPILATION, CYBERATTACK_SYSTEMS_UNAVAILABLE, DECLARED_EMERGENCY_OPERATIONAL_IMPACT."},"noticeSource":{"type":"string","maxLength":500,"description":"Identifier of the written notice (letter, portal message). Empty makes the extension defective."}}}},"documents":{"type":"array","minItems":1,"maxItems":40,"items":{"type":"object","additionalProperties":false,"required":["name","text"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":1500000}}}},"gapThresholdDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Report gaps between dated events longer than this (default 30)."}}},"example":{"jurisdiction":"CA_CPRA","requestDate":"2026-03-02","responseDate":"2026-03-20","extensionNotices":[{"noticeDate":"2026-03-10","expectedDate":"2026-03-24","reason":"VOLUMINOUS_RECORDS","noticeSource":"Portal message of 2026-03-10"}],"documents":[{"name":"response-letter.txt","text":"Dated March 20, 2026. Records are released in part. Portions marked [REDACTED] are withheld. See attached Exhibit B for the log.\nPersonnel email on 2025-11-03 follows."},{"name":"release-2.txt","text":"Email dated 2026-01-15. The manager wrote that Maria Alvarez approved the overtime budget request on Friday afternoon."},{"name":"release-1.txt","text":"Email dated 2026-01-15. The manager wrote that [REDACTED] approved the overtime budget request on Friday afternoon. Withheld per Gov. Code 7922.000."}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"jurisdiction":{"type":"object","properties":{"input":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"clock":{"description":"An object with citation, initialDeadline, effectiveDeadline, daysLate and extension statuses, or the string \"unknown_jurisdiction\" / \"calendar_not_modeled\".","anyOf":[{"type":"string","enum":["unknown_jurisdiction","calendar_not_modeled"]},{"type":"object"}]},"deterministic":{"type":"object","properties":{"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["redaction_without_exemption","exemption_code_not_in_table","foia_stamp_in_state_record","inconsistent_redaction","missing_attachment","timeline_gap"]},"severity":{"type":"string","enum":["high","medium","low"]},"summary":{"type":"string"},"evidenceIds":{"type":"array","items":{"type":"string"}},"details":{"type":"object"}}}},"countsByKind":{"type":"object"},"truncatedKinds":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bytes":{"type":"integer"},"sha256":{"type":"string"}}}}}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentName":{"type":"string"},"byteStart":{"type":"integer"},"byteEnd":{"type":"integer"},"spanSha256":{"type":"string","description":"SHA-256 of the exact UTF-8 bytes [byteStart, byteEnd)."},"documentSha256":{"type":"string"},"quote":{"type":"string"}}}},"llm":{"type":"string","enum":["ok","unavailable","skipped"]},"narrative":{"type":"object","description":"summary and appealPoints, each citing finding/evidence ids; dropped lists statements removed for unknown ids or unsupported numbers. Absent unless llm is ok."},"notes":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/warm-memory":{"post":{"operationId":"warm_memory","summary":"WARM verifiable agent memory","description":"Durable per-wallet agent memory with temporal facts: remember (structured facts or free text), recall (BM25 plus exact triple pattern, as of any time), forget (cryptographic forgetting that leaves a tombstone) and explain (provenance and supersession). Every fact has a ToIP SAID; every write returns a hash-chained, optionally signed receipt. Tenant is the paying wallet.\n\nPrice: 0.10 USDC on Base (x402).","x-x402-price-usdc":"0.10","x-x402-amount":"100000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["op"],"properties":{"op":{"type":"string","enum":["remember","recall","forget","explain"]},"tenantId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$","description":"Required for API-key callers (namespace as key:<tenantId>; keep it unguessable). Ignored when a wallet paid."},"facts":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["subject","predicate","object"],"properties":{"subject":{"type":"string","minLength":1,"maxLength":500},"predicate":{"type":"string","minLength":1,"maxLength":500,"description":"Single-valued slot per subject, e.g. lives_in; a newer fact supersedes the older."},"object":{"type":"string","minLength":1,"maxLength":500},"validFrom":{"anyOf":[{"type":"integer","minimum":0,"maximum":8640000000000000},{"type":"string","maxLength":40}],"description":"Epoch milliseconds or an ISO 8601 date/time (UTC when no offset)."},"validTo":{"anyOf":[{"type":"integer","minimum":0,"maximum":8640000000000000},{"type":"string","maxLength":40}],"description":"Epoch milliseconds or an ISO 8601 date/time (UTC when no offset)."},"source":{"type":"string","maxLength":500}}}},"text":{"type":"string","maxLength":8000,"description":"remember: free text; facts are extracted by a fast model and kept only if subject and object occur verbatim."},"source":{"type":"string","maxLength":500,"description":"remember: provenance label for facts extracted from text."},"query":{"type":"string","maxLength":500},"pattern":{"type":"object","additionalProperties":false,"description":"Exact (case- and whitespace-insensitive) match on any of subject, predicate, object.","properties":{"subject":{"type":"string","minLength":1,"maxLength":500},"predicate":{"type":"string","minLength":1,"maxLength":500},"object":{"type":"string","minLength":1,"maxLength":500}}},"said":{"type":"string","pattern":"^E[A-Za-z0-9_-]{43}$"},"asOf":{"anyOf":[{"type":"integer","minimum":0,"maximum":8640000000000000},{"type":"string","maxLength":40}],"description":"Epoch milliseconds or an ISO 8601 date/time (UTC when no offset)."},"limit":{"type":"integer","minimum":1,"maximum":50},"history":{"type":"string","enum":["current","all"],"description":"recall: only facts current at asOf (default) or every status."}}},"example":{"op":"remember","facts":[{"subject":"alice","predicate":"lives_in","object":"Paris","validFrom":"2020-01-01"},{"subject":"alice","predicate":"lives_in","object":"Berlin","validFrom":"2025-01-01"}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"op":{"type":"string"},"tenant":{"type":"string"},"remembered":{"type":"array","items":{"type":"object"}},"results":{"type":"array","items":{"type":"object"}},"forgotten":{"type":"array","items":{"type":"object"}},"receipt":{"type":"object","description":"{op, seq, saids, digest, at, prevReceiptDigest, signature?, signer?}"},"deterministic":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/prove-contract-logic":{"post":{"operationId":"smt_contract_prover","summary":"SMT Contract & Policy Logic Prover","description":"Formalizes natural-language clauses (or accepts a formal IR directly with zero LLM calls) into typed Boolean, integer and rational constraints, then answers \"is P possible\", \"does invariant I always hold\" or \"are any clauses contradictory\" with a pure-TypeScript CDCL(T) solver (exact rational simplex, branch-and-bound, minimal unsatisfiable cores). SAT returns an exact counterexample checked against every original constraint; UNSAT reports the proof statement and the minimal conflicting clause ids; exhausted budgets return UNKNOWN. Natural-language input uses two independent formalizations whose logical equivalence is checked by the solver; disagreements are reported with a distinguishing assignment and lower confidence. Formal elements whose source quote is not in the text are dropped.\n\nPrice: 2.50 USDC on Base (x402).","x-x402-price-usdc":"2.50","x-x402-amount":"2500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"clauses":{"type":"array","minItems":1,"maxItems":200,"description":"Natural-language contract clauses, IAM/OPA policy statements or business rules, each with a caller-chosen id. Mutually exclusive with ir.","items":{"type":"object","additionalProperties":false,"required":["id","text"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":1,"maxLength":4000}}}},"query":{"type":"string","minLength":1,"maxLength":1000,"description":"The question, e.g. \"Can an unauthorized user ever approve a payout over $10,000?\" or \"Are any clauses mutually contradictory?\". Required with clauses."},"ir":{"type":"object","description":"Formal IR, solved with zero LLM calls: {variables:[{name,type:bool|int|real,min?,max?}], constraints:[{id,expr,source?}], query:{mode:possible|always|consistency,formula?,source?}}. Expressions are JSON ASTs: {op:\"var\",name}, {op:\"num\",value:\"3/4\"}, {op:\"true\"|\"false\"}, and {op,args} for not, and, or, implies, iff, ite, =, !=, <, <=, >, >=, add, sub, neg, mul (one side constant). Numbers are exact strings."},"budget":{"type":"object","additionalProperties":false,"description":"Optional lower step budgets.","properties":{"maxConflicts":{"type":"integer","minimum":1,"maximum":300000,"description":"Lower this step budget (default and hard cap 300000)."},"maxPropagations":{"type":"integer","minimum":1,"maximum":60000000,"description":"Lower this step budget (default and hard cap 60000000)."},"maxPivots":{"type":"integer","minimum":1,"maximum":2000000,"description":"Lower this step budget (default and hard cap 2000000)."},"maxSplits":{"type":"integer","minimum":1,"maximum":5000,"description":"Lower this step budget (default and hard cap 5000)."},"maxSolves":{"type":"integer","minimum":1,"maximum":2000,"description":"Lower this step budget (default and hard cap 2000)."},"maxMillis":{"type":"integer","minimum":1,"maximum":25000,"description":"Lower this step budget (default and hard cap 25000)."}}}}},"example":{"clauses":[{"id":"C1","text":"Any payout request may be approved by a manager."},{"id":"C2","text":"Payouts above $10,000 require approval by a director."},{"id":"C3","text":"A manager is never a director."}],"query":"Can a payout above $10,000 be approved by a manager?"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","required":["deterministic","status","verdict","mode","confidence","result","audit"],"properties":{"deterministic":{"type":"boolean","description":"True when no LLM touched the verdict path (formal IR input)."},"status":{"type":"string","enum":["SAT","UNSAT","UNKNOWN"]},"verdict":{"type":"string","enum":["POSSIBLE","IMPOSSIBLE","INVARIANT_VIOLATED","INVARIANT_PROVED","CONSISTENT","INCONSISTENT","UNKNOWN","TRANSLATION_DISAGREEMENT"]},"mode":{"type":"string","enum":["possible","always","consistency"]},"confidence":{"type":"string","enum":["high","medium","low"]},"result":{"type":"object","required":[],"properties":{"model":{"type":"array","description":"Counterexample or witness; verified by exact evaluation against every original constraint.","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["bool","int","real"]},"value":{"description":"true/false for bool; exact rational string such as \"7\" or \"-3/2\" for int and real."}}}},"core":{"type":"object","required":["clauses","minimal"],"properties":{"clauses":{"type":"array","items":{"type":"string"}},"minimal":{"type":"boolean"}}},"vacuous":{"type":"boolean","description":"True when the clauses are contradictory on their own, so any query answer holds vacuously."},"statement":{"type":"string","description":"What was proved, rendered from the formal IR by code."},"exhausted":{"type":"string","description":"Which step budget ran out when status is UNKNOWN."}}},"translation":{"type":"object","required":["llmCalls","candidates"],"properties":{"llmCalls":{"type":"integer","description":"Model calls attempted: one fast vocabulary call, then one standard and one deep formalization."},"vocabulary":{"type":"array","items":{"type":"object","required":[],"properties":{"name":{"type":"string"},"type":{"type":"string"},"min":{"type":"string"},"max":{"type":"string"}}}},"candidates":{"type":"array","items":{"type":"object","required":["tier","usable","provider","model","verified","dropped"],"properties":{"tier":{"type":"string"},"usable":{"type":"boolean","description":"False when nothing of this translation could be grounded; its drops are still listed."},"provider":{"type":"string"},"model":{"type":"string"},"ir":{"type":"object"},"verified":{"type":"array","items":{"type":"object","required":[],"properties":{"clauseId":{"type":"string"},"quote":{"type":"string"},"formula":{"type":"string"}}}},"dropped":{"type":"array","items":{"type":"object","required":["kind","reason"],"properties":{"kind":{"type":"string"},"reason":{"type":"string"}}}},"status":{"type":"string"},"verdict":{"type":"string"},"result":{"type":"object","required":[],"properties":{"model":{"type":"array","description":"Counterexample or witness; verified by exact evaluation against every original constraint.","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["bool","int","real"]},"value":{"description":"true/false for bool; exact rational string such as \"7\" or \"-3/2\" for int and real."}}}},"core":{"type":"object","required":["clauses","minimal"],"properties":{"clauses":{"type":"array","items":{"type":"string"}},"minimal":{"type":"boolean"}}},"vacuous":{"type":"boolean","description":"True when the clauses are contradictory on their own, so any query answer holds vacuously."},"statement":{"type":"string","description":"What was proved, rendered from the formal IR by code."},"exhausted":{"type":"string","description":"Which step budget ran out when status is UNKNOWN."}}}}}},"equivalence":{"type":"object","required":[],"properties":{"question":{"type":"string"},"rules":{"type":"string"},"reason":{"type":"string"},"distinguishing":{"type":"object","required":[],"properties":{"scope":{"type":"string"},"assignment":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["bool","int","real"]},"value":{"description":"true/false for bool; exact rational string such as \"7\" or \"-3/2\" for int and real."}}}},"first":{"type":"boolean"},"second":{"type":"boolean"}}}}},"note":{"type":"string"}}},"audit":{"type":"object","required":["solver","version","algorithm","budgets","stats","inputHash","irHash"],"properties":{"solver":{"type":"string"},"version":{"type":"string"},"algorithm":{"type":"string"},"budgets":{"type":"object"},"stats":{"type":"object"},"inputHash":{"type":"string"},"irHash":{"type":"string"}}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/check-state-machine":{"post":{"operationId":"state_model_checker","summary":"State Machine Model Checker","description":"Exhaustively checks a finite state machine, protocol, or concurrent routine. Accepts a formal spec (no LLM), a plain-language workflow, or source code (translated to a spec by an LLM, with every transition quoted from the source and two independent translations compared). A pure TypeScript explicit-state checker explores all interleavings and returns computed verdicts: safety invariants with the shortest counterexample trace, deadlocks, liveness (eventually, always-eventually, leads-to) and livelocks under weak or strong fairness with lasso counterexamples. If the state budget runs out the status is BOUNDED, never a proof.\n\nPrice: 2.00 USDC on Base (x402).","x-x402-price-usdc":"2.00","x-x402-amount":"2000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"spec":{"type":"object","description":"Formal spec (zero LLM calls). {vars:{name:{type:'bool'|'int'|'enum'|'array',min,max,values,size|keys,of,init}}, processes:[{name,instances?,fairness?:'none'|'weak'|'strong',transitions:[{name,guard?,updates:[{var,at?,value}]}]}], initWhere?, terminal?, progress?, invariants:[{name,expr}], liveness:[{name,kind:'eventually'|'alwaysEventually'|'leadsTo',p,q?}]}. Expressions are JSON nodes ({var,at?}, {sym}, {param}, {op,args}, forall/exists) or infix strings such as \"pc[self] == wait && !flag[1 - self]\"; nothing is evaluated as code."},"description":{"type":"string","maxLength":30000,"description":"Natural-language workflow or protocol; translated to a spec by an LLM, with each transition quoted from the text."},"code":{"type":"string","maxLength":200000,"description":"Source code of a state machine, protocol, or concurrent routine; translated to a spec by an LLM, with each transition carrying its verbatim source span."},"properties":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":500},"description":"Properties to check, in plain language (with description or code only)."},"options":{"type":"object","additionalProperties":false,"properties":{"maxStates":{"type":"integer","minimum":1,"maximum":100000,"description":"State budget (default 100000)."},"maxTransitions":{"type":"integer","minimum":1,"maximum":500000,"description":"Transition budget (default 500000)."},"maxMillis":{"type":"integer","minimum":1,"maximum":20000,"description":"Total wall-clock budget in ms for exploration plus liveness analysis (default 8000). On description/code input the three budgets are split evenly between the two translated models."},"deadlock":{"type":"boolean","description":"Report deadlocks (non-terminal states with no enabled transition). Default true."},"livelock":{"type":"boolean","description":"Report fair cycles that never reach a progress or terminal state; needs a progress or terminal predicate. Default true when the spec has a progress predicate."},"explain":{"type":"boolean","description":"Add one LLM call that explains the computed result; its numbers are checked against the result. Default false."}}}}},"example":{"spec":{"name":"flag-mutex","vars":{"pc":{"type":"array","size":2,"of":{"type":"enum","values":["test","set","crit"]},"init":"test"},"flag":{"type":"array","size":2,"of":{"type":"bool"},"init":false}},"processes":[{"name":"P","instances":2,"fairness":"weak","transitions":[{"name":"test","guard":"pc[self] == test && !flag[1 - self]","updates":[{"var":"pc","at":"self","value":"set"}]},{"name":"set","guard":"pc[self] == set","updates":[{"var":"flag","at":"self","value":true},{"var":"pc","at":"self","value":"crit"}]},{"name":"exit","guard":"pc[self] == crit","updates":[{"var":"flag","at":"self","value":false},{"var":"pc","at":"self","value":"test"}]}]}],"invariants":[{"name":"mutualExclusion","expr":"!(pc[0] == crit && pc[1] == crit)"}]}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deterministic":{"type":"boolean","description":"True when no LLM touched the verdict path (formal spec input)."},"status":{"type":"string","enum":["VERIFIED","VIOLATED","BOUNDED","INCOMPLETE_TRANSLATION","TRANSLATION_DISAGREEMENT"]},"summary":{"type":"string"},"exhausted":{"type":"boolean","description":"True when the whole state space was explored."},"budgetHit":{"anyOf":[{"type":"string"},{"type":"null"}]},"properties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["invariant","deadlock","runtime","eventually","alwaysEventually","leadsTo","livelock"]},"status":{"type":"string","enum":["HOLDS","VIOLATED","UNDECIDED"]},"source":{"type":"string"},"counterexample":{"type":"object","description":"Shortest trace for safety violations; prefix plus repeating cycle (lasso) for liveness and livelock violations. Each step lists the process, the transition, its source span (translated input), and the full state.","properties":{"type":{"type":"string","enum":["trace","lasso"]},"message":{"type":"string"},"trace":{"type":"array","items":{"type":"object"}},"cycle":{"type":"array","items":{"type":"object"}},"failedStep":{"type":"object"}},"required":["type","message","trace"]}},"required":["name","kind","status"]}},"stats":{"type":"object","properties":{"statesExplored":{"type":"integer"},"statesExpanded":{"type":"integer"},"transitionsChecked":{"type":"integer"},"diameter":{"type":"integer"},"initialStates":{"type":"integer"},"sccCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"nontrivialSccCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"largestScc":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["statesExplored","statesExpanded","transitionsChecked","diameter","initialStates","sccCount","nontrivialSccCount","largestScc"]},"model":{"type":"object"},"audit":{"type":"object"},"translation":{"anyOf":[{"type":"object"},{"type":"null"}]},"explanation":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["deterministic","status","summary","exhausted","budgetHit","properties","stats","model","audit","translation","explanation"]},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/prove-causality":{"post":{"operationId":"causalReferee","summary":"Causal Claim Referee","description":"Referees a causal claim against an observational table with deterministic statistics: crude and stratified effects, Mantel-Haenszel pooling, Simpson's-paradox detection, d-separation and backdoor/front-door checks with minimal adjustment sets, g-formula standardization with positivity checks, exact or seeded Monte Carlo permutation tests, seeded bootstrap intervals, and a PC-algorithm check of the DAG against the data. Verdict by code rules; with a caller-supplied DAG no model is called.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","treatment","outcome","covariates","claim"],"properties":{"data":{"type":"array","minItems":2,"maxItems":20000,"items":{"type":"object"},"description":"Observational table as an array of row objects (at most 20000 rows). Cells are string, number, boolean or null; rows missing a used variable are dropped."},"treatment":{"type":"string","minLength":1,"maxLength":100,"description":"Column with exactly two distinct values."},"outcome":{"type":"string","minLength":1,"maxLength":100,"description":"Binary column (risk difference, risk ratio, odds ratio) or numeric column (mean difference)."},"covariates":{"type":"array","maxItems":12,"items":{"type":"string","minLength":1,"maxLength":100},"description":"Candidate adjustment variables (at most 12). Numeric ones with more than `bins` distinct values are cut at deterministic quantile edges; others must have at most 20 levels."},"claim":{"type":"string","minLength":3,"maxLength":2000,"description":"The causal claim being refereed, in plain language."},"dag":{"type":"object","additionalProperties":false,"required":["edges"],"description":"Your causal DAG (formal input: no LLM is called to build the graph or, by default, the report). Omit to have one proposed by two independent model samples, which is then an assumption.","properties":{"edges":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"from":{"type":"string","maxLength":100},"to":{"type":"string","maxLength":100}}},"description":"Directed edges from cause to effect between the treatment, outcome, covariates and unobserved nodes."},"unobserved":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1,"maxLength":100},"description":"Latent variables that appear in edges (for example an unmeasured confounder)."}}},"treatedValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"Treatment value that counts as treated; required unless the values are numeric or boolean (then the larger is treated)."},"successValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"Outcome value that counts as success for a binary outcome; same default rule."},"outcomeType":{"type":"string","enum":["binary","continuous"],"description":"Force the outcome type; inferred from the number of distinct values otherwise."},"claimDirection":{"type":"string","enum":["positive","negative","nonzero"],"description":"Direction of the claimed effect of treated vs control; default nonzero."},"bins":{"type":"integer","minimum":2,"maximum":10,"description":"Quantile bins for numeric covariates, default 4."},"alpha":{"type":"number","minimum":0.001,"maximum":0.2,"description":"Significance level for the permutation test and the (1-alpha) bootstrap interval, default 0.05."},"seed":{"type":"integer","minimum":0,"maximum":4294967295,"description":"Seed for bootstrap and Monte Carlo; default derived from the input hash."},"bootstrapReps":{"type":"integer","minimum":100,"maximum":2000},"permutationSamples":{"type":"integer","minimum":1000,"maximum":200000,"description":"Used only when the exact enumeration would exceed 1000000 label assignments."},"llmReport":{"type":"boolean","description":"Ask a model to write the executive report (numbers verified in code, template fallback). Default true when no dag is given, false otherwise."},"descriptions":{"type":"object","description":"Optional one-line description per variable, used only to propose the DAG."}}},"example":{"data":[{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":1},{"treatment":"A","stone_size":"small","success":0},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":1},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"A","stone_size":"large","success":0},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":1},{"treatment":"B","stone_size":"small","success":0},{"treatment":"B","stone_size":"small","success":0},{"treatment":"B","stone_size":"small","success":0},{"treatment":"B","stone_size":"large","success":1},{"treatment":"B","stone_size":"large","success":1},{"treatment":"B","stone_size":"large","success":1},{"treatment":"B","stone_size":"large","success":1},{"treatment":"B","stone_size":"large","success":1},{"treatment":"B","stone_size":"large","success":0},{"treatment":"B","stone_size":"large","success":0},{"treatment":"B","stone_size":"large","success":0}],"treatment":"treatment","outcome":"success","covariates":["stone_size"],"treatedValue":"B","claim":"Treatment B causes a higher recovery rate than treatment A.","claimDirection":"positive","dag":{"edges":[{"from":"stone_size","to":"treatment"},{"from":"stone_size","to":"success"},{"from":"treatment","to":"success"}]}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deterministic":{"type":"boolean","description":"True only for the formal-IR path (caller DAG): no model output can influence the verdict. False when the DAG came from a model or from the outage fallback."},"status":{"type":"string","enum":["OK","BUDGET_EXCEEDED"]},"verdict":{"type":"string","enum":["SUPPORTED_UNDER_ASSUMPTIONS","CONFOUNDED","SIMPSONS_REVERSAL","NOT_IDENTIFIABLE","INSUFFICIENT_DATA","NOT_SUPPORTED"]},"verdictRule":{"type":"string"},"confidence":{"type":"string","enum":["low","medium","high"]},"reasons":{"type":"array","items":{"type":"string"}},"claim":{"type":"string"},"claimEvaluation":{"type":"object"},"data":{"type":"object"},"dag":{"type":"object","description":"The graph used, its source (caller, llm_proposed, default_all_confounders) and whether it is an assumption."},"identification":{"type":"object","description":"Minimal backdoor adjustment sets, front-door sets, and variables not to adjust for (mediators, colliders, post-treatment)."},"effects":{"type":"object","description":"Crude and adjusted risk difference / risk ratio / odds ratio or mean difference with seeded bootstrap intervals."},"tests":{"type":"object","description":"Exact or Monte Carlo permutation p-values (within strata for the adjusted test), Fisher exact, Mantel-Haenszel test."},"stratification":{"type":"object"},"simpson":{"type":"object"},"dagCheck":{"type":"object","description":"PC-algorithm skeleton and orientations from the data, and the conflicts with the assumed DAG."},"caveats":{"type":"array","items":{"type":"string"}},"assumptions":{"type":"array","items":{"type":"string"}},"report":{"type":"object","description":"Executive report; source is llm only if every number in it appears in the computed results."},"translation":{"anyOf":[{"type":"object"},{"type":"null"}]},"audit":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/identify-sequence":{"post":{"operationId":"sequence_identifier","summary":"Integer Sequence Identifier","description":"Identifies an integer sequence from terms, a safe-parsed formula or recurrence, or a description. Searches the OEIS directly, then superseeker-style (differences, partial sums, gcd, ratios, binomial, Euler, leading terms, plus a search without the last two terms to flag disagreeing terms) under an 8-search budget, aligns offsets, and marks which terms agree or disagree. Fits linear recurrences and polynomials exactly over the rationals and reports one only when it predicts held-out terms. Candidates are ranked in code; a model is used only for a description input (one fast call, OEIS confirms what it proposes) and for the optional explain sentence (one more call, quote verified against OEIS text). Output carries the CC BY-SA 4.0 OEIS attribution.\n\nPrice: 0.10 USDC on Base (x402).","x-x402-price-usdc":"0.10","x-x402-amount":"100000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"terms":{"type":"array","minItems":4,"maxItems":60,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Integer terms, 4 to 60, each at most 40 digits. Pass values beyond 2^53 as decimal strings."},"formula":{"type":"string","minLength":1,"maxLength":300,"description":"Alternative to terms: a closed form in n such as \"binomial(2*n,n)/(n+1)\", or a recurrence such as \"a(n) = a(n-1) + a(n-2)\" (with initialTerms). Operators + - * / % ^, functions binomial fact abs gcd min max floor mod. Evaluated by a safe parser, never eval; every term must be an integer."},"initialTerms":{"type":"array","maxItems":20,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Seed values a(start), a(start+1), ... for a recurrence formula."},"start":{"type":"integer","minimum":-100,"maximum":1000,"description":"Index n of the first expanded term; default 0."},"count":{"type":"integer","minimum":4,"maximum":60,"description":"How many terms to expand from the formula; default 20."},"description":{"type":"string","minLength":3,"maxLength":500,"description":"Alternative to terms and formula: a plain-language description. The only input kind that needs a model (one fast call to propose terms and keywords, which OEIS then confirms)."},"explain":{"type":"boolean","description":"Ask a model for a one-sentence explanation drawn only from the matched OEIS entry; its quote is verified in code, otherwise the entry name is returned. Default false."}}},"example":{"terms":[1,1,2,5,14,42,132,429,1430,4862]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["IDENTIFIED","IDENTIFIED_VIA_TRANSFORM","PARTIAL_MATCH","RECURRENCE_ONLY","NO_MATCH"]},"input":{"type":"object","description":"kind, termsSource (caller, formula or model), the terms analyzed, the expanded formula and any model keywords."},"candidates":{"type":"array","description":"Ranked OEIS candidates: aNumber, url, name, evidence, transform used (null = direct), alignment (OEIS index of the first compared term), matched/mismatched terms, unverified terms beyond the entry's data, exact, formulas, references.","items":{"type":"object"}},"explanation":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"One line from OEIS text only: the entry name, or a model sentence whose quote was verified (source oeis-name or model)."},"recurrence":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Constant-coefficient linear recurrence solved exactly over the rationals from the first 2*order terms; reported only when it reproduces every later term (heldOutTerms >= 2)."},"polynomial":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Polynomial in n from vanishing finite differences, reported only with held-out terms predicted exactly."},"search":{"type":"object","description":"OEIS searches made (budget 8, sequential and rate limited), steps skipped or not applicable, and failures."},"llmCalls":{"type":"integer"},"llmFailures":{"type":"integer"},"decidedBy":{"type":"object","description":"Where the terms, ranking and explanation came from."},"attribution":{"type":"object","description":"OEIS source and the CC BY-SA 4.0 notice."},"notes":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/mine-future-work":{"post":{"operationId":"future_work_miner","summary":"Open Research Opportunity Miner","description":"Collects papers for a topic or seed list (arXiv, OpenAlex), reads full text from ar5iv or Europe PMC, and extracts future-work, limitation and open-question sentences in code with exact section spans. Near-duplicates are clustered across papers, then each cluster is checked against later citing works (OpenAlex cites, Semantic Scholar citation contexts) and marked OPEN, POSSIBLY_ADDRESSED or ADDRESSED. Scores combine recurrence across independent author groups, recency, citation momentum and openness with documented formulas. mode \"fast\" makes zero model calls; the default makes two (cluster wording, addressed judgment) and lets them move a status at most one level.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","minLength":3,"maxLength":300,"description":"Research topic, e.g. \"parameter-efficient fine-tuning of language models\"."},"seeds":{"type":"array","maxItems":25,"items":{"type":"string","minLength":5,"maxLength":200},"description":"Seed papers as arXiv ids (2106.09685, arXiv:1706.03762) or DOIs; always analysed, not date-filtered."},"fromDate":{"type":"string","minLength":10,"maxLength":10,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only topic-search papers published on or after this date (YYYY-MM-DD)."},"toDate":{"type":"string","minLength":10,"maxLength":10,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Only topic-search papers published on or before this date (YYYY-MM-DD)."},"maxPapers":{"type":"integer","minimum":1,"maximum":25,"description":"Papers to analyse, at most 25 (default 10); seeds count toward it."},"field":{"type":"string","minLength":2,"maxLength":80,"description":"Field or discipline keyword added to the topic search, e.g. \"machine learning\"."},"mode":{"type":"string","enum":["fast","full"],"description":"fast: zero model calls (lexical clustering and lexical addressed-check). full (default): one clustering call and one judging call, bounded to one status level."}}},"example":{"query":"parameter-efficient fine-tuning of large language models","maxPapers":8,"mode":"fast"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"query":{"type":"object","description":"Echo of query, seeds, field and date range."},"mode":{"type":"string","enum":["fast","full"]},"papers":{"type":"array","description":"Analysed source papers with where their text came from (ar5iv, europepmc or abstract only) and how many statements each yielded.","items":{"type":"object","properties":{"title":{"type":"string"},"doi":{"anyOf":[{"type":"string"},{"type":"null"}]},"arxivId":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"anyOf":[{"type":"integer"},{"type":"null"}]},"authors":{"type":"array","items":{"type":"string"}},"citedByCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"url":{"type":"string"},"seed":{"type":"boolean"},"textSource":{"type":"string","enum":["ar5iv","europepmc","abstract"]},"statements":{"type":"integer"},"citingChecked":{"type":"boolean"}}}},"opportunities":{"type":"array","description":"Clusters of future-work statements, best score first.","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"One-line opportunity title (model-written in full mode, else the strongest member sentence)."},"titleBy":{"type":"string","enum":["model","lexical"]},"status":{"type":"string","enum":["OPEN","POSSIBLY_ADDRESSED","ADDRESSED"],"description":"Computed in code from lexical overlap with later citing papers; a verified model verdict moves it at most one level."},"score":{"type":"integer","description":"0-100: 100 x openFactor x (0.2 + 0.8 x (0.4 recurrence + 0.3 recency + 0.3 momentum)); openFactor 1 / 0.5 / 0.1 for OPEN / POSSIBLY_ADDRESSED / ADDRESSED."},"scoreParts":{"type":"object","description":"recurrence, recency, momentum, quality, openFactor."},"independentPapers":{"type":"integer","description":"Source papers with pairwise disjoint author sets."},"sourcePapers":{"type":"integer"},"statusDecidedBy":{"type":"string","enum":["lexical","lexical+judge"]},"statusNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"addressedCheck":{"type":"object","description":"papersChecked / papersTotal and citingWorksScanned: how much citing evidence backs an OPEN status."},"evidence":{"type":"array","description":"Exact sentences with paper, section and character span (section text slice(start, end) equals quote).","items":{"type":"object","properties":{"statementId":{"type":"string"},"paper":{"type":"object"},"section":{"type":"object"},"span":{"type":"object"},"quote":{"type":"string"},"cue":{"type":"string"},"basis":{"type":"string"}}}},"candidateCitingPapers":{"type":"array","description":"Later citing papers with lexical coverage, shared terms and the judge verdict with its verified quote.","items":{"type":"object"}}}}},"llmCalls":{"type":"integer","description":"Model requests issued: 0 in fast mode, at most 2 in full mode."},"decidedBy":{"type":"string","enum":["code","code+model"],"description":"code+model when a verified model output (clustering or judgment) was used."},"coverage":{"type":"object","description":"Papers analysed, full-text count, statements, clusters, citing works scanned, quote verification, upstream call budget, failures."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/verify-references":{"post":{"operationId":"reference_verifier","summary":"Bibliography Reference Verifier","description":"Parses a bibliography (BibTeX, LaTeX \\bibitem, plain-text list, arXiv id via ar5iv, or PDF URL) and resolves every reference against Crossref, OpenAlex, arXiv and Europe PMC by DOI, arXiv id, PMID or scored title/author/year search. Each reference is VERIFIED, METADATA_MISMATCH (field-level year/authors/title/venue/DOI diffs), DOI_RESOLVES_TO_DIFFERENT_WORK, NOT_FOUND (likely fabricated), RETRACTED or HAS_CORRECTION (Crossref updated-by, OpenAlex is_retracted, Europe PMC), PREPRINT_NOW_PUBLISHED (with the version of record), DUPLICATE_ENTRY or UNRESOLVABLE. With manuscript text, unresolved \\cite keys and uncited entries are reported. Every verdict is computed in code (zero model calls); checkSupport adds one fast-tier call judging whether each cited abstract supports its citing sentence, with both quotes verified.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"bibtex":{"type":"string","minLength":10,"maxLength":400000,"description":"BibTeX/BibLaTeX text (the contents of a .bib file)."},"latex":{"type":"string","minLength":10,"maxLength":400000,"description":"LaTeX source with a thebibliography environment (\\bibitem) or embedded filecontents .bib; \\cite commands supply citation contexts and are checked against the entries."},"references":{"type":"string","minLength":10,"maxLength":200000,"description":"Plain-text reference list (numbered, blank-line separated, or one per line; APA, IEEE, Vancouver, Chicago)."},"arxivId":{"type":"string","minLength":4,"maxLength":80,"description":"arXiv id or URL; references are read from the ar5iv HTML (.ltx_bibitem), falling back to the PDF."},"pdfUrl":{"type":"string","minLength":8,"maxLength":2000,"description":"Public PDF URL. Text extraction is best-effort (Word and Google Docs exports work best)."},"manuscript":{"type":"string","minLength":10,"maxLength":400000,"description":"Optional manuscript text (LaTeX or plain) that supplies citation contexts: \\cite keys, [n] numbers or Author (year) citations."},"checkSupport":{"type":"boolean","description":"Needs manuscript text (or latex, arxivId, pdfUrl). Spends one fast-tier model call to judge whether each cited abstract supports its citing sentence (at most 20 citations)."}}},"example":{"references":"[1] Wakefield AJ, Murch SH, Anthony A, et al. Ileal-lymphoid-nodular hyperplasia, non-specific colitis, and pervasive developmental disorder in children. Lancet. 1998;351(9103):637-41.\n[2] Abbott BP, et al. Observation of gravitational waves from a binary black hole merger. arXiv:1602.03837"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"input":{"type":"object","description":"kind, referencesParsed, referencesChecked (capped at 150), parse notes."},"summary":{"type":"object","description":"total, flagged (not VERIFIED), byStatus counts."},"references":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"key":{"type":"string"},"reference":{"type":"object","description":"Parsed fields: title, authors, year, venue, doi, arxivId, pmid."},"status":{"type":"string","enum":["VERIFIED","METADATA_MISMATCH","DOI_RESOLVES_TO_DIFFERENT_WORK","NOT_FOUND","RETRACTED","HAS_CORRECTION","PREPRINT_NOW_PUBLISHED","DUPLICATE_ENTRY","UNRESOLVABLE"]},"issues":{"type":"array","items":{"type":"object","description":"status + detail; every problem found, the first by precedence is the status."}},"diffs":{"type":"array","items":{"type":"object","description":"field (year|authors|title|venue|doi), reference, found."}},"match":{"type":"object","description":"Matched record with score, titleSimilarity, authorOverlap, yearScore."},"integrity":{"type":"object","description":"Retraction/correction status and notices (Crossref updated-by, OpenAlex is_retracted, Europe PMC), merged across near-identical records."},"publishedVersion":{"type":"object","description":"For a preprint: the version of record (doi, venue, year)."},"citations":{"type":"object","description":"count and up to 3 citing sentences."},"support":{"type":"array","items":{"type":"object","description":"verdict SUPPORTS|PARTIAL|DOES_NOT_SUPPORT|CANNOT_ASSESS with verified claimQuote and sourceQuote."}}}}},"citationCheck":{"type":"object","description":"mode (latex|numeric|ar5iv|author-year|none), unresolvedKeys, uncitedEntries."},"support":{"type":"object","description":"Whether the model support check ran, how many citations were sent, how many skipped over the cap."},"llmCalls":{"type":"integer","description":"0 on the deterministic path; 1 when checkSupport is set and at least one citation has an abstract."},"decidedBy":{"type":"string","enum":["code","code+model"]},"thresholds":{"type":"object","description":"Matching thresholds applied."},"coverage":{"type":"object","description":"Upstream calls used, skipped references, failed sources."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/audit-dependencies":{"post":{"operationId":"dependency_advisor","summary":"Dependency Underuse & Replacement Advisor","description":"Reads a public GitHub repo (or uploaded manifests and sources), parses JS/TS, Python and Rust imports with a tokenizer-level scanner, and maps them to declared npm, PyPI and crates.io dependencies. Flags unused, dev-only, undeclared and trivially used packages; checks deps.dev, the npm registry and OSV for deprecation, advisories, staleness and OpenSSF Scorecard; matches a cited table of platform replacements (fetch, crypto.randomUUID, optional chaining) and ranks alternatives in code by Scorecard, recency, dependents, size and license compatibility. A single optional model call maps each used symbol to the alternative; code verifies every symbol is accounted for. Deterministic mode makes zero model calls.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"repo":{"type":"string","minLength":3,"maxLength":200,"description":"Public GitHub repository: owner/repo or https://github.com/owner/repo[/tree/ref]."},"ref":{"type":"string","maxLength":200,"description":"Branch, tag or commit; defaults to the default branch."},"files":{"type":"array","maxItems":600,"description":"Alternative to repo: manifests (package.json, lockfile, pyproject.toml, requirements.txt, Cargo.toml) and source files with repository-relative paths.","items":{"type":"object","additionalProperties":false,"required":["path","content"],"properties":{"path":{"type":"string","minLength":1,"maxLength":300},"content":{"type":"string","maxLength":400000}}}},"ecosystems":{"type":"array","maxItems":3,"items":{"type":"string","enum":["npm","pypi","cargo"]},"description":"Restrict the analysis; default all detected."},"mode":{"type":"string","enum":["auto","deterministic"],"description":"deterministic makes no model call; auto makes at most one, only for symbols the curated table cannot decide."},"repoLicense":{"type":"string","maxLength":100,"description":"SPDX id of the repository's license, for alternative ranking; detected from manifests or LICENSE when absent."}}},"example":{"repo":"star7th/htq","mode":"auto"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"object","description":"Repo, pinned commit, tree size, files read, bytes, skipped files, license and where it came from."},"ecosystems":{"type":"array","items":{"type":"object","description":"Per ecosystem: manifests (path, lockfile kind, minimum runtime, declared count) and source files scanned."}},"summary":{"type":"object","description":"Counts of declared and flagged packages, findings by category (underused, outgrown, replace) and kind, high-severity count."},"findings":{"type":"array","items":{"type":"object","description":"id, kind (unused, dev-only-in-dependencies, dev-dependency-in-production, undeclared, trivial-use, native-replacement, redundant-dependency, deprecated, superseded, overlap, stale, vulnerable, behind-major), category, severity, score 0-100 (computed in code), confidence, ecosystem, package, manifest, summary, evidence, action, migrationEffort, citations."}},"replacements":{"type":"array","items":{"type":"object","description":"Per flagged package: symbols the repo imports, the curated table entry with citations and runtime applicability, ranked alternatives (Scorecard, recency, dependents, size, license compatibility), and a per-symbol coverage check. coverage.status is FULL_COVERAGE only when every used symbol is accounted for and covered; decidedBy is table, model or none."}},"dependencies":{"type":"array","items":{"type":"object","description":"Every declared package: sections, range, resolved version and its source, usage footprint, and registry health."}},"coverage":{"type":"object","description":"complete, notes, files scanned, health checked/skipped, upstream calls, failed sources."},"llmCalls":{"type":"integer","description":"0 in deterministic mode or when the curated table decided every symbol; otherwise 1."},"decidedBy":{"type":"object","description":"findings: code. replacementCoverage: symbol counts decided by the curated table, by the model, or left unreviewed."},"versions":{"type":"object","description":"Version of the curated replacements table."},"thresholds":{"type":"object","description":"The numeric thresholds the findings were computed with."},"wouldChangeVerdict":{"type":"array","items":{"type":"string"},"description":"Evidence that would raise confidence or change a finding."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/find-contradictions":{"post":{"operationId":"paperContradictions","summary":"Paper Contradiction Finder","description":"Takes 2 to 4 papers (DOI, arXiv id or PMID) on a shared question and finds where their reported numbers conflict. Fetches the best available text (ar5iv, Europe PMC full text, else abstract), extracts quantitative claims with exact quote spans (hazard/odds/risk ratios, relative changes, differences, confidence intervals, P-values, sample sizes, units), pairs claims by shared outcome vocabulary (at most 24 pairs), and tests each pair the model confirms as the same quantity in comparable populations: opposite directions, non-overlapping intervals, the difference test from CI-derived standard errors, and a significant-versus-powered-null check, after unit normalization. Classifies each pair CONTRADICTS / CONSISTENT / DIFFERENT_POPULATIONS_OR_MEASURES / INSUFFICIENT_INFO and reports a per-paper trust summary (retraction and correction status, replication signals, sample size, preregistration, funding and conflict statements, how often the paper is contradicted) by a documented formula. Author-prestige metrics are excluded on purpose. mode \"fast\" makes no model call and tests only identical outcome phrases.\n\nPrice: 1.00 USDC on Base (x402).","x-x402-price-usdc":"1.00","x-x402-amount":"1000000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["papers"],"properties":{"papers":{"type":"array","minItems":2,"maxItems":4,"items":{"type":"string","minLength":3,"maxLength":300},"description":"2 to 4 papers on a shared question, each a DOI (bare, doi: or doi.org URL), an arXiv id or URL, or a PMID."},"claim":{"type":"string","minLength":3,"maxLength":2000,"description":"Optional claim or question to focus on; claims about it are paired first."},"mode":{"type":"string","enum":["full","fast"],"description":"full (default): one model call judges whether candidate claim pairs measure the same quantity in comparable populations. fast: no model call; only pairs with identical normalized outcome phrases are tested."}}},"example":{"papers":["10.1056/NEJM199608153350701","10.1001/jama.288.3.321"],"claim":"Does postmenopausal estrogen plus progestin therapy reduce coronary heart disease risk?","mode":"full"}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string","enum":["full","fast"]},"deterministic":{"type":"boolean","description":"True when no model call was made."},"llmCalls":{"type":"integer","description":"0 in fast mode or when no candidate pairs exist; otherwise 1."},"decidedBy":{"type":"object","description":"Pairs by what decided them: code (identical outcome phrase, statistics), llm (model said not the same quantity), llm+code (model said same, code ran the tests), none (undecided)."},"degraded":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set when the model call failed and only identical-outcome pairs were tested."},"focus":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"type":"object","description":"Pair counts per classification (CONTRADICTS, CONSISTENT, DIFFERENT_POPULATIONS_OR_MEASURES, INSUFFICIENT_INFO) and pairsTested."},"papers":{"type":"array","items":{"type":"object"},"description":"Per paper: resolved metadata, text level, integrity (retraction, correction), replication signals, sample size, preregistration, funding and conflict-of-interest cues with quotes, and the trust summary."},"claims":{"type":"array","items":{"type":"object"},"description":"Quantitative claims with exact quote spans (offsets into the paper text), measure, value, confidence interval, P, unit, direction word and normalized outcome phrase."},"pairs":{"type":"array","items":{"type":"object"},"description":"Candidate claim pairs with classification, contradiction kind, the statistical tests with details, who decided, and the verified model quotes."},"trustMethod":{"type":"object","description":"Trust formula, weights, and the author-prestige metrics excluded on purpose."},"coverage":{"type":"object","description":"Counts, caps, upstream call budget, elapsed time and failed sources."},"caveats":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/reconcile-ledger":{"post":{"operationId":"reconcile_ledger","summary":"Exact Ledger Reconciler","description":"Explains settlements and payouts from ledger lines with an exact solver, not a model: subset-sum over integer minor units (meet-in-the-middle, DP, branch-and-bound) across candidate fee schedules (percentage + fixed, tiers, caps), withholding, FX rates and rounding conventions (half-up, half-even, truncate; per line or on the total). Returns UNIQUE only when exactly one assignment exists and the search completed, otherwise AMBIGUOUS with the exact count, NO_EXACT_MATCH with missing items, phantom settlements and the closest near-miss, or BUDGET_EXCEEDED. Reports which rounding convention reconciles. Structured input makes zero LLM calls; CSV is parsed by code; messy text is normalized by a fast-tier LLM whose rows must quote the source verbatim.\n\nPrice: 1.50 USDC on Base (x402).","x-x402-price-usdc":"1.50","x-x402-amount":"1500000","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","maxItems":2000,"description":"Ledger lines. Amounts are signed (refunds and disputes negative) strings in major units, e.g. \"1234.56\".","items":{"type":"object","additionalProperties":false,"required":["id","amount","currency"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"amount":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}],"description":"Decimal string; locale formats (1.234,56, (12.00)) are accepted and parsed exactly."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."},"date":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date YYYY-MM-DD (a time suffix is ignored)."},"kind":{"type":"string","enum":["charge","invoice","refund","dispute","fee","adjustment","other"]},"group":{"type":"string","minLength":1,"maxLength":64,"description":"Lines sharing a group (an invoice) are settled together or not at all."}}}},"settlements":{"type":"array","maxItems":200,"description":"Payouts or bank settlement totals to explain.","items":{"type":"object","additionalProperties":false,"required":["id","amount","currency"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"amount":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."},"date":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date YYYY-MM-DD (a time suffix is ignored)."},"itemIds":{"type":"array","maxItems":2000,"items":{"type":"string","minLength":1,"maxLength":64},"description":"Restrict the candidate items for this settlement."},"feeScheduleIds":{"type":"array","maxItems":20,"items":{"type":"string","minLength":1,"maxLength":64},"description":"Restrict the fee schedules tried for this settlement (e.g. its processor)."},"withholdingIds":{"type":"array","maxItems":20,"items":{"type":"string","minLength":1,"maxLength":64},"description":"Require one of these withholdings; omit to also try none."}}}},"feeSchedules":{"type":"array","maxItems":20,"description":"Candidate fee schedules; the solver reports which one reconciles each settlement. Omit for no fees.","items":{"type":"object","additionalProperties":false,"required":["id","rules"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","maxLength":300},"source":{"type":"string","maxLength":500},"rules":{"type":"array","maxItems":20,"items":{"type":"object","additionalProperties":false,"description":"First rule whose kinds (default charge, invoice) and currencies match an item sets its fee: percent (or tiers) of |amount| plus a fixed amount, clamped to min and max, signed like the item.","properties":{"kinds":{"type":"array","maxItems":7,"items":{"type":"string","enum":["charge","invoice","refund","dispute","fee","adjustment","other"]}},"currencies":{"type":"array","maxItems":40,"items":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."}},"percent":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}],"description":"Percentage, e.g. 2.9 for 2.9%."},"fixed":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}],"description":"Fixed fee per item in the item's currency."},"fixedByCurrency":{"type":"array","maxItems":40,"items":{"type":"object","additionalProperties":false,"required":["currency","amount"],"properties":{"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."},"amount":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]}}},"description":"Per-currency fixed fee; overrides fixed."},"tiers":{"type":"array","maxItems":20,"description":"Percentage bands on |amount|; amounts above the last upTo use the last band's percent.","items":{"type":"object","additionalProperties":false,"required":["percent"],"properties":{"upTo":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]},"percent":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]}}}},"tierMode":{"type":"string","enum":["marginal","threshold"],"description":"marginal: each band charged at its own percent; threshold: the band containing the amount applies to all of it."},"min":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]},"max":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]}}}},"fixedPerSettlement":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}],"description":"Fixed fee deducted once per settlement, in the settlement currency (rounded to its minor unit)."},"fxMarkupPercent":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}],"description":"Spread applied to FX conversions: effective rate = rate x (1 - markup/100)."}}}},"withholdings":{"type":"array","maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["id","ratePercent"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"ratePercent":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]},"base":{"type":"string","enum":["gross","net_of_fee"]},"kinds":{"type":"array","maxItems":7,"items":{"type":"string","enum":["charge","invoice","refund","dispute","fee","adjustment","other"]}}}}},"fxRates":{"type":"array","maxItems":500,"description":"Direct rates only (1 from = rate to). The latest rate dated on or before the reference date applies; an undated rate is the fallback.","items":{"type":"object","additionalProperties":false,"required":["from","to","rate"],"properties":{"from":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."},"to":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code."},"rate":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"number"}]},"date":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date YYYY-MM-DD (a time suffix is ignored)."}}}},"text":{"type":"object","additionalProperties":false,"description":"Messy source text for collections not given structurally. CSV with a header is parsed by code; anything else goes to a fast-tier LLM that must quote every row verbatim.","properties":{"items":{"type":"string","maxLength":30000},"settlements":{"type":"string","maxLength":30000},"terms":{"type":"string","maxLength":30000,"description":"Fee schedules, tax/withholding rates and FX rates in prose or tables."}}},"defaultCurrency":{"type":"string","minLength":3,"maxLength":3,"description":"Currency for text rows that state none."},"crossCheck":{"type":"boolean","description":"Run two independent LLM translations and keep only rows both produced (default true)."},"conventions":{"type":"object","additionalProperties":false,"description":"Restrict the conventions searched (default: all rounding modes x both scopes x both FX date policies).","properties":{"rounding":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["half_up","half_even","truncate"]}},"scope":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"string","enum":["line","total_net"]}},"fxPolicy":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"string","enum":["item_date","settlement_date"]}}}},"toleranceMinor":{"type":"integer","minimum":0,"maximum":1000000,"description":"Accepted |residual| per settlement in minor units (default 0 = exact)."},"nearMissToleranceMinor":{"type":"integer","minimum":1,"maximum":1000000000,"description":"Largest residual searched when reporting the closest near-miss for an unmatched settlement."},"maxLagDays":{"type":"integer","minimum":0,"maximum":3650,"description":"An item may settle at most this many days after its date."},"limits":{"type":"object","additionalProperties":false,"properties":{"maxSolutions":{"type":"integer","minimum":2,"maximum":100},"maxNodes":{"type":"integer","minimum":1000,"maximum":20000000},"maxMillis":{"type":"integer","minimum":100,"maximum":25000}}}}},"example":{"items":[{"id":"ch_1","amount":"100.00","currency":"USD","date":"2026-10-01","kind":"charge"},{"id":"ch_2","amount":"250.00","currency":"USD","date":"2026-10-01","kind":"charge"},{"id":"ch_3","amount":"40.00","currency":"USD","date":"2026-10-02","kind":"charge"}],"settlements":[{"id":"po_1","amount":"339.25","currency":"USD","date":"2026-10-05"}],"feeSchedules":[{"id":"stripe_us_card","rules":[{"percent":"2.9","fixed":"0.30"}]}]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["UNIQUE","AMBIGUOUS","NO_EXACT_MATCH","BUDGET_EXCEEDED","INSUFFICIENT_INPUT"],"description":"UNIQUE only when the search completed and exactly one assignment exists."},"deterministic":{"type":"boolean","description":"True when no LLM touched the verdict path (structured or CSV input)."},"reconciled":{"type":"boolean","description":"Every settlement matched and no item left unsettled."},"summary":{"type":"object"},"solution":{"type":"object","description":"The recommended assignment (lowest date lag among the reported solutions)."},"alternatives":{"type":"array","items":{"type":"object"}},"ambiguity":{"type":"object"},"conventions":{"type":"object","description":"Which rounding mode / scope / FX policy reproduces the settlements."},"discrepancies":{"type":"object","description":"Unsettled items, phantom settlements, residuals, closest near-misses."},"budget":{"type":"object"},"audit":{"type":"object","description":"Solver, budgets, statistics, canonical input hash and the hash-chained step list."},"translation":{"type":"object"},"notes":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/api/v1/verify-provenance":{"post":{"operationId":"verify_provenance","summary":"Verify a response envelope (free)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"_provenance":{"type":"object"}},"required":["data","_provenance"]}}}},"responses":{"200":{"description":"Verification checks","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}