{"openapi":"3.1.0","info":{"title":"Kestrova","description":"Kestrova Solidity security scanner for AI coding agents: smart contract static analysis (Slither) with a pre-audit security report. Send {\"sources\": {\"File.sol\": \"<source>\"}}; get every finding with detector, severity, confidence and line locations (findings located only in uploaded dependencies such as OpenZeppelin are tagged separately) for 1 USDC on Solana or Base (x402). Free preview at POST /preview and the remote MCP server at /mcp (scan_solidity_preview). No local solc needed. Automated analysis, not an audit: zero findings does not mean a contract is safe.","version":"0.2.0","x-guidance":"Solidity vulnerability detection (Slither). Call POST /preview first: free, no key, returns severity counts, High/Medium detector names and a description of each High/Medium issue (no location or fix). Paid and optional, via x402 on Base or Solana (terms in the 402 PAYMENT-REQUIRED header): POST /scan/findings (0.25 USDC) returns every finding with file and line; POST /scan (1 USDC) adds a plain-English explanation and fix per finding and PDF/SARIF files. Pay only with your user's explicit approval and within their spending limit; charged only after a successful scan. Deployed contracts by address (Base, Ethereum, BNB Chain, Arbitrum, Optimism, Polygon): free POST /preview/address, paid POST /scan/address (0.03 USDC, unverified contracts not charged). MCP: /mcp (scan_solidity_preview, scan_solidity_findings, scan_solidity_full, scan_contract_address_preview, scan_contract_address, payment_terms). Automated analysis, not an audit: zero findings does not mean a contract is safe.","contact":{"name":"Kestrova support","url":"https://kestrova-api.onrender.com/support","email":"kestrova.security@gmail.com"},"x-logo":{"url":"https://kestrova-api.onrender.com/assets/kestrova-512.png","altText":"Kestrova"}},"paths":{"/":{"get":{"summary":"Index","operationId":"index__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]},"head":{"summary":"Index","operationId":"index__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/preview":{"post":{"summary":"Preview","operationId":"preview_preview_post","responses":{"200":{"description":"Free preview","content":{"application/json":{"schema":{"type":"object","required":["compiler","counts","detectors"],"properties":{"compiler":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"total_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"application_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"dependency_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"detectors":{"type":"array","items":{"type":"string"},"description":"High and Medium detector names"},"issues":{"type":"array","items":{"type":"object"},"description":"each High/Medium detector found: title, explanation, count; no location or fix"},"sample_finding":{"type":["object","null"],"description":"the most important finding; High/Medium are described without location or fix"},"example_finding":{"type":["object","null"],"description":"one Low/Informational finding in full (file, line, code, fix) as an example of the paid format"},"more_findings":{"type":"integer"},"full_report":{"type":"string"},"note":{"type":"string"},"limitations":{"type":"string"}}}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sources"],"properties":{"sources":{"type":"object","additionalProperties":{"type":"string"},"description":"map of file name (*.sol, may include folders) to Solidity source; include imported files. Package imports (\"@openzeppelin/contracts/...\") resolve to files submitted under that path, node_modules/ or lib/openzeppelin-contracts/contracts/"}}},"example":{"sources":{"Token.sol":"pragma solidity ^0.8.20; contract T {}"}}}}}}},"/scan":{"post":{"summary":"Scan","operationId":"scan_scan_post","responses":{"200":{"description":"Scan result","content":{"application/json":{"schema":{"type":"object","required":["compiler","counts","findings"],"properties":{"compiler":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"total_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"application_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"dependency_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"findings":{"type":"array","items":{"type":"object","properties":{"detector":{"type":"string"},"impact":{"type":"string"},"confidence":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","enum":["application","dependency"]},"locations":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"lines":{"type":"array","items":{"type":"integer"}}}}}}}},"dependency_findings":{"type":"array","items":{"type":"object","properties":{"detector":{"type":"string"},"impact":{"type":"string"},"confidence":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","enum":["application","dependency"]},"locations":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"lines":{"type":"array","items":{"type":"integer"}}}}}}}},"compiled_with":{"type":"string","description":"\"via-ir\" when the project needed via-IR"},"bundled":{"type":"string","description":"set when Kestrova supplied OpenZeppelin imports"},"tool":{"type":"string"},"note":{"type":"string"},"limitations":{"type":"string"}}}}}},"402":{"description":"Payment required (x402 v2): terms in the PAYMENT-REQUIRED header"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"1.00"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sources"],"properties":{"sources":{"type":"object","additionalProperties":{"type":"string"},"description":"map of file name (*.sol, may include folders) to Solidity source; include imported files. Package imports (\"@openzeppelin/contracts/...\") resolve to files submitted under that path, node_modules/ or lib/openzeppelin-contracts/contracts/"}}},"example":{"sources":{"Token.sol":"pragma solidity ^0.8.20; contract T {}"}}}}}}},"/scan/findings":{"post":{"summary":"Scan Findings","description":"Agent tier (owner decision 2026-11-19): the scanner result only. Never issues report-file tokens and never\nappears in My reports; recovery returns the same JSON.","operationId":"scan_findings_scan_findings_post","responses":{"200":{"description":"Scan result","content":{"application/json":{"schema":{"type":"object","required":["compiler","counts","findings"],"properties":{"compiler":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"total_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"application_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"dependency_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"number of findings per impact: High, Medium, Low, Informational, Optimization"},"findings":{"type":"array","items":{"type":"object","properties":{"detector":{"type":"string"},"impact":{"type":"string"},"confidence":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","enum":["application","dependency"]},"locations":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"lines":{"type":"array","items":{"type":"integer"}}}}}}}},"dependency_findings":{"type":"array","items":{"type":"object","properties":{"detector":{"type":"string"},"impact":{"type":"string"},"confidence":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","enum":["application","dependency"]},"locations":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"lines":{"type":"array","items":{"type":"integer"}}}}}}}},"compiled_with":{"type":"string","description":"\"via-ir\" when the project needed via-IR"},"bundled":{"type":"string","description":"set when Kestrova supplied OpenZeppelin imports"},"tool":{"type":"string"},"note":{"type":"string"},"limitations":{"type":"string"}}}}}},"402":{"description":"Payment required (x402 v2): terms in the PAYMENT-REQUIRED header"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.25"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sources"],"properties":{"sources":{"type":"object","additionalProperties":{"type":"string"},"description":"map of file name (*.sol, may include folders) to Solidity source; include imported files. Package imports (\"@openzeppelin/contracts/...\") resolve to files submitted under that path, node_modules/ or lib/openzeppelin-contracts/contracts/"}}},"example":{"sources":{"Token.sol":"pragma solidity ^0.8.20; contract T {}"}}}}}}},"/preview/address":{"post":{"summary":"Preview Address","description":"Free check of a deployed contract by address: preview of its verified source, or bytecode signals.","operationId":"preview_address_preview_address_post","responses":{"200":{"description":"Free address preview","content":{"application/json":{"schema":{"type":"object","required":["contract"]}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"chain":{"type":"string","enum":["base","ethereum","bnb","arbitrum","optimism","polygon"],"description":"default base"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"deployed contract; proxies are followed to the current implementation"}}},"example":{"chain":"base","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}}}}},"/scan/address":{"post":{"summary":"Scan Address","description":"Address tier (owner decision 2026-11-21, 0.03 USDC): every finding of a deployed contract's verified source.\nUnverified contracts and every failure answer with an error status, so the payment is not settled.","operationId":"scan_address_scan_address_post","responses":{"200":{"description":"Address scan result","content":{"application/json":{"schema":{"type":"object","required":["contract"]}}}},"402":{"description":"Payment required (x402 v2): terms in the PAYMENT-REQUIRED header"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"chain":{"type":"string","enum":["base","ethereum","bnb","arbitrum","optimism","polygon"],"description":"default base"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"deployed contract; proxies are followed to the current implementation"}}},"example":{"chain":"base","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}}}}},"/healthz":{"get":{"summary":"Healthz","description":"Read-only readiness facts for deploy checks: no secrets, no IPs, no config values. Upstream/DB probes are cached\nfor 60 s so this cannot be used to load the RPCs or wake the database repeatedly.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"https://kestrova-api.onrender.com"}]}