{"openapi":"3.1.0","info":{"title":"Gate402 — pay-per-call agent APIs","version":"1.0.0","description":"x402 M2M payment gateway. Each endpoint returns HTTP 402 unless paid via x402, Stripe MPP, or a valid X-API-Key."},"servers":[{"url":"https://gate402.app"}],"paths":{"/v1/proxy":{"post":{"summary":"Fetch any public URL, render client-side JS, strip nav/ads, return clean LLM-ready Markdown.","operationId":"nodeproxy","x-pricing":{"amountUsdc":0.002,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"arguments":{"type":"object","properties":{"url":{"type":"string","description":"Public URL to fetch"}},"required":["url"]}},"required":["arguments"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"content":[{"type":"text","text":"# Title\n\nBody markdown…"}]}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/proxy/stealth":{"post":{"summary":"Hardened headless fetch for JS-heavy / lightly-protected pages. (Full residential-proxy + CAPTCHA anti-bot bypass activates when proxy credentials are configured; best-effort otherwise.)","operationId":"nodeproxy-stealth","x-pricing":{"amountUsdc":0.05,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Protected URL to scrape"}},"required":["url"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"content":[{"type":"text","text":"# Title\n\nContent…"}],"stealth":{"proxyUsed":true}}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/minify":{"post":{"summary":"Compress text: strip filler, collapse JSON, densify prose. Cuts upstream LLM token spend ~40%.","operationId":"tokensqueezer","x-pricing":{"amountUsdc":0.005,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to compress"},"format":{"type":"string","enum":["auto","plain","markdown","json"]},"aggressive":{"type":"boolean"}},"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"compressed":"Dense text…","stats":{"inputTokens":12000,"outputTokens":7200,"reductionPercent":40}}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/onchain":{"post":{"summary":"On-chain wallet & token intelligence on Base: native + ERC-20 balances, EOA/contract detection, tx count, and token metadata. From public RPC.","operationId":"onchain_intel","x-pricing":{"amountUsdc":0.01,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Base address (wallet or token contract), 0x-hex."},"tokens":{"type":"array","items":{"type":"string"},"description":"Optional extra ERC-20 contract addresses to check."}},"required":["address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"address":"0x…","network":"eip155:8453","type":"wallet","native":{"symbol":"ETH","balance":"0.12"},"transactionCount":42,"holdings":[{"token":"0x833589…","symbol":"USDC","decimals":6,"balance":"26.82"}]}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/dex":{"post":{"summary":"Live DEX price, liquidity, and 24h volume for a Base token across its trading pairs.","operationId":"dex_market","x-pricing":{"amountUsdc":0.01,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Base ERC-20 token contract address."}},"required":["address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"address":"0x…","chain":"base","topPriceUsd":"1.00","pairs":[{"dex":"aerodrome","priceUsd":"1.00","liquidityUsd":1200000,"volume24h":450000}]}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/news":{"post":{"summary":"Recent news headlines + heuristic bull/bear sentiment for a ticker or topic.","operationId":"news_signal","x-pricing":{"amountUsdc":0.02,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Ticker, company, or topic."},"limit":{"type":"number"}},"required":["query"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"query":"NVDA","count":10,"sentiment":{"score":0.4,"label":"bullish"},"items":[{"title":"…","source":"Reuters","url":"https://…"}]}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/edgar":{"post":{"summary":"Latest SEC EDGAR filings (10-K/10-Q/8-K) for a US ticker or CIK, with document links.","operationId":"edgar_filings","x-pricing":{"amountUsdc":0.02,"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL."},"cik":{"type":"string"},"form":{"type":"string"},"limit":{"type":"number"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"company":"Apple Inc.","cik":"0000320193","ticker":"AAPL","filings":[{"form":"10-Q","filedAt":"2026-05-01","url":"https://www.sec.gov/Archives/…"}]}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}},"/v1/dedup":{"post":{"summary":"Semantic vector cache: exact-match Map shortcut, then 0.88 cosine similarity on hash embeddings. Sub-10ms hits.","operationId":"vectorcache","x-pricing":{"amountUsdc":{"hit":0.001,"miss":0.003},"currency":"USDC","protocol":"x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Text to look up"},"vector":{"type":"array","items":{"type":"number"},"description":"Optional embedding to store on miss"},"namespace":{"type":"string"},"storeOnMiss":{"type":"boolean"}},"required":["query"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"cache":"hit","similarity":0.94,"vector":[0.01,-0.02],"latencyMs":3.2}}}},"402":{"description":"Payment Required — pay via x402 (PAYMENT-SIGNATURE), Stripe MPP (Authorization: Payment), or present X-API-Key."}}}}}}