{"openapi":"3.1.0","info":{"title":"x402check","version":"0.2.2","summary":"Paid per-tool x402 trust preflight — verdict + history before an agent pays","description":"Call BEFORE any x402 payment to a third-party tool. Every check is paid ($0.002/tool). GET checks one URL; POST batches up to 25 (N×unit in one Exact settlement). Response: compact verdict (ok|caution|avoid) + that tool's history only (checks, uptime, payTo/price changes). Use for: is this x402 endpoint safe/legit; verify payTo before signing USDC; detect wallet or price drift; uptime / is-it-down; compare sellers; budget guard; validate payment requirements; debug a failing 402; audit log of why you paid or refused. Probes are read-only — we never pay the target. Endpoint+history product (not wallet OFAC/drainer/simulation). If verdict=avoid do not pay. Cache-fresh targets <300ms.","contact":{"name":"x402check","email":"hustlelab@mail.grokbot.com","url":"https://x402check.dev"},"x-guidance":"Always call GET /preflight?url=SELLER_URL (or POST batch) before PAYMENT-SIGNATURE to that seller. Deny payment when verdict=avoid; escalate when caution; still enforce your maxAmount when ok. Unit price $0.002 USDC Exact on Base (eip155:8453), billed per tool URL. No free tier. Use when: is this x402 endpoint safe; verify payTo; detect rug-style payTo/price swaps; check uptime; compare/cheapest/most reliable among candidates; budget guard; validate 402 requirements; debug failing settle; compliance/audit trail before signing. MCP aliases: verify_payto, compare_tools. Discovery: https://x402check.dev/llms.txt https://x402check.dev/.well-known/agent-card.json https://x402check.dev/.well-known/ai-catalog.json https://x402check.dev/mcp/server-card https://x402check.dev/openapi.json","x-x402":{"scheme":"exact","pricePerToolUsd":0.002,"networks":["eip155:8453","eip155:84532"],"asset":"USDC"},"x-discovery":{"ownershipProofs":[],"wellKnown":"https://x402check.dev/.well-known/x402","agentCard":"https://x402check.dev/.well-known/agent-card.json","aiCatalog":"https://x402check.dev/.well-known/ai-catalog.json","mcpServerCard":"https://x402check.dev/mcp/server-card"}},"servers":[{"url":"https://x402check.dev","description":"This deployment"}],"tags":[{"name":"preflight","description":"Paid trust checks"},{"name":"discovery","description":"Free agent discovery documents"}],"paths":{"/preflight":{"get":{"operationId":"preflightCheck","tags":["preflight"],"summary":"Trust-check one x402 seller URL before paying it","description":"WHEN TO USE: immediately before settling payment to any x402 tool; when asking is this endpoint safe/legit; verify payTo / receiving wallet; detect price or wallet drift; check uptime / is it down; validate payment requirements before signing USDC on Base; budget guard; debug a failing 402; compliance log before pay. Returns only that tool's verdict + history. Do not pay the target if verdict is avoid. Probe is a read-only GET to the target (we never pay it).","security":[{"x402Payment":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"Absolute https URL of the x402 seller endpoint to probe","example":"https://www.api-xpay.com/x402/ping"},{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"If true, force a live probe and ignore cache"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","asset":"USDC"}}]},"responses":{"200":{"description":"Compact ToolCheck for the requested URL only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCheck"},"example":{"url":"https://www.api-xpay.com/x402/ping","verdict":"ok","checkedAt":"2026-10-31T17:00:00.000Z","live":true,"is402":true,"priceUsd":0.005,"payTo":"0x589a2314a2E05F45e40C4823Da3Ba58D421dB3d8","reasonCodes":["reachable","http_402","payto_stable"],"history":{"checks":3,"uptimePct":100,"payToChanges":[],"priceChanges":[]}}}}},"400":{"description":"missing_url | blocked host","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required — x402 Exact. PAYMENT-REQUIRED header is authoritative; JSON body explains how to pay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}},"post":{"operationId":"preflightBatch","tags":["preflight"],"summary":"Batch / compare trust-check; charged per URL","description":"WHEN TO USE: compare multiple candidate x402 tools; pick cheapest or most reliable; screen Bazaar search hits before paying any of them. Charge = len(urls) × $0.002 in ONE Exact settlement (not N separate txs). Max 25.","security":[{"x402Payment":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["urls"],"properties":{"urls":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","format":"uri"},"description":"Absolute https seller URLs"},"fresh":{"type":"boolean"}}},"example":{"urls":["https://www.api-xpay.com/x402/ping","https://blockrun.ai/api/v1/chat/completions"]}}}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.002000","max":"0.050000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","asset":"USDC"}}]},"responses":{"200":{"description":"BatchResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"description":"missing_urls | batch_too_large | invalid_json"},"402":{"description":"Payment Required — price = len(urls) × unit"}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","tags":["discovery"],"summary":"This OpenAPI document","security":[],"responses":{"200":{"description":"OpenAPI 3.1"}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","tags":["discovery"],"summary":"LLM-oriented service card (llms.txt)","security":[],"responses":{"200":{"description":"text/plain markdown"}}}},"/llms-full.txt":{"get":{"operationId":"getLlmsFullTxt","tags":["discovery"],"summary":"Full concatenated LLM docs (llms-full.txt convention)","security":[],"responses":{"200":{"description":"text/plain markdown"}}}},"/mcp.json":{"get":{"operationId":"getMcpDescriptor","tags":["discovery"],"summary":"MCP server wrapper description","security":[],"responses":{"200":{"description":"MCP descriptor JSON"}}}},"/mcp/server-card":{"get":{"operationId":"getMcpServerCard","tags":["discovery"],"summary":"SEP-2127 MCP Server Card","security":[],"responses":{"200":{"description":"application/mcp-server-card+json"}}}},"/.well-known/agent-card.json":{"get":{"operationId":"getAgentCard","tags":["discovery"],"summary":"A2A Agent Card","security":[],"responses":{"200":{"description":"Agent Card JSON"}}}},"/.well-known/x402":{"get":{"operationId":"getX402WellKnown","tags":["discovery"],"summary":"x402scan compatibility discovery doc","security":[],"responses":{"200":{"description":"x402 well-known JSON"}}}},"/.well-known/ai-catalog.json":{"get":{"operationId":"getAiCatalog","tags":["discovery"],"summary":"AI Catalog (MCP Server Card discovery)","security":[],"responses":{"200":{"description":"application/ai-catalog+json"}}}},"/sitemap.xml":{"get":{"operationId":"getSitemap","tags":["discovery"],"summary":"XML sitemap for search engines","security":[],"responses":{"200":{"description":"application/xml"}}}}},"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 Exact payment proof after receiving PAYMENT-REQUIRED"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"PaymentRequired":{"type":"object","properties":{"error":{"type":"string","const":"payment_required"},"message":{"type":"string"},"howToPay":{"type":"object"}}},"ToolCheck":{"type":"object","required":["url","verdict","checkedAt","live","history","reasonCodes"],"properties":{"url":{"type":"string"},"verdict":{"type":"string","enum":["ok","caution","avoid"],"description":"avoid → do not pay; caution → escalate; ok → still enforce maxAmount"},"checkedAt":{"type":"string","format":"date-time"},"live":{"type":"boolean"},"cacheAgeMs":{"type":"integer"},"status":{"type":"integer","nullable":true},"latencyMs":{"type":"integer","nullable":true},"is402":{"type":"boolean"},"priceUsd":{"type":"number","nullable":true},"payTo":{"type":"string","nullable":true},"network":{"type":"string","nullable":true},"reasonCodes":{"type":"array","items":{"type":"string"}},"history":{"$ref":"#/components/schemas/ToolHistory"}}},"ToolHistory":{"type":"object","properties":{"checks":{"type":"integer"},"uptimePct":{"type":"number","nullable":true},"lastOkAt":{"type":"string","nullable":true},"lastFailAt":{"type":"string","nullable":true},"payToChanges":{"type":"array","items":{"type":"object"}},"priceChanges":{"type":"array","items":{"type":"object"}},"recent":{"type":"array","items":{"type":"object"}}}},"BatchResult":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ToolCheck"}},"chargedTools":{"type":"integer"},"pricePerToolUsd":{"type":"number"},"totalUsd":{"type":"number"},"elapsedMs":{"type":"integer"},"pricingNote":{"type":"string"}}}}}}