{"openapi":"3.1.0","info":{"title":"0mod API Gateway","description":"HTTP 402 Payment-gated microservices for AI agents on Base USDC.","version":"2.0.0","termsOfService":"https://api.0mod.com/terms"},"servers":[{"url":"https://api.0mod.com"}],"tags":[{"name":"Data","description":"Data & extraction utilities (primary listing category)."},{"name":"AI","description":"Workers AI inference-backed tools."},{"name":"Finance","description":"Financial / market data."},{"name":"Blockchain","description":"On-chain / DEX venue data."},{"name":"Trading","description":"Arbitrage, execution-quality and pre-trade simulation."}],"paths":{"/api/v1/stealth-dom":{"post":{"summary":"Stealth DOM — headless edge web scraper for AI agents. Fetches any public URL and returns raw HTML or clean Markdown (up to 10,000 chars); SSRF-validated, runs at the Cloudflare edge in ~70ms, no API key.","description":"Stealth DOM — headless edge web scraper for AI agents. Fetches any public URL and returns raw HTML or clean Markdown (up to 10,000 chars); SSRF-validated, runs at the Cloudflare edge in ~70ms, no API key. Price: 0.004 USDC on Base via x402. Latency SLA: < 200ms (avg 70ms).","operationId":"stealth_dom","tags":["Data"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Target URL to fetch (SSRF-validated)"},"userAgent":{"type":"string","description":"Custom User-Agent header"},"timeout":{"type":"number","description":"Request timeout in ms (default 5000)"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"success":true,"status":200,"format":"markdown","content":"# Example Domain\n\nThis domain is for use in illustrative examples in documents.","content_length":78,"source":"cloudflare-edge"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/airgap-scrub":{"post":{"summary":"Airgap Scrub — pre-LLM PII/PCI redaction for AI agents. Scrubs SSNs, credit cards, phones, addresses, emails and ZIPs before text reaches an LLM or log sink; stateless with zero data retention, optional Workers AI deep redaction, no API key.","description":"Airgap Scrub — pre-LLM PII/PCI redaction for AI agents. Scrubs SSNs, credit cards, phones, addresses, emails and ZIPs before text reaches an LLM or log sink; stateless with zero data retention, optional Workers AI deep redaction, no API key. Price: 0.004 USDC on Base via x402. Latency SLA: < 800ms (avg 370ms).","operationId":"airgap_scrub","tags":["Data","AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text payload to sanitize"},"strictMode":{"type":"boolean","description":"Enable Workers AI Llama 3.1 deep redaction for names & bios"}},"required":["text"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"success":true,"scrubbed":"Call [PHONE] or email [EMAIL]. SSN [SSN], ZIP [ZIP].","entities_redacted":["PHONE","EMAIL","SSN","ZIP"],"source":"edge-regex","mode":"standard"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/domain-check":{"post":{"summary":"Domain Check — global RDAP/WHOIS lookup for AI agents. Resolves availability, status, registrar, registration/expiry dates and nameservers for .com, .net, .org and global TLDs from the Cloudflare edge; no API key.","description":"Domain Check — global RDAP/WHOIS lookup for AI agents. Resolves availability, status, registrar, registration/expiry dates and nameservers for .com, .net, .org and global TLDs from the Cloudflare edge; no API key. Price: 0.008 USDC on Base via x402. Latency SLA: < 1000ms (avg 540ms).","operationId":"domain_check","tags":["Data"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Target domain name (e.g. example.com)"}},"required":["domain"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"success":true,"domain":"example.com","available":false,"status":"REGISTERED","registeredDate":"1995-08-14T00:00:00Z","expirationDate":"2028-08-13T00:00:00Z","lastUpdated":"2026-07-13T00:00:00Z","registrar":"MarkMonitor Inc.","nameservers":["expire.example.com","ns1.example.com"],"handle":"2433559220_END_DOMAIN_COM-REG","source":"cloudflare-edge-rdap"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/dex-price-summary":{"post":{"summary":"DEX Price Summary — real-time DEX market data for AI agents. Returns token price, 24h volume, liquidity and top pair stats across chains (DexScreener) for trading bots and research agents; no API key.","description":"DEX Price Summary — real-time DEX market data for AI agents. Returns token price, 24h volume, liquidity and top pair stats across chains (DexScreener) for trading bots and research agents; no API key. Price: 0.0015 USDC on Base via x402. Latency SLA: < 150ms (avg 65ms).","operationId":"dex_price_summary","tags":["Data","Finance","Trading"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Token symbol or contract address"}},"required":["query"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"success":true,"query":"AERO","found":true,"summary":{"symbol":"AERO","name":"Aerodrome Finance","chainId":"base","dexId":"aerodrome","priceUsd":0.998,"priceNative":"0.000553","priceChange24h":2.4,"volume24hUsd":1245800,"liquidityUsd":8321000,"pairAddress":"0x4cD05e9BE98410175d3855a36352839c20410967","pairUrl":"https://dexscreener.com/base/0x4cd05e9be98410175d3855a36352839c20410967"},"totalPairsFound":3,"source":"cloudflare-edge-dexscreener"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/image-ocr-shrink":{"post":{"summary":"Image OCR Shrink — vision OCR-to-markdown for AI agents. Extracts clean text and table markdown from public image URLs with Workers AI Vision Llama 3.2, saving ~95% of the tokens a raw image would consume; no API key.","description":"Image OCR Shrink — vision OCR-to-markdown for AI agents. Extracts clean text and table markdown from public image URLs with Workers AI Vision Llama 3.2, saving ~95% of the tokens a raw image would consume; no API key. Price: 0.008 USDC on Base via x402. Latency SLA: < 1000ms (avg 480ms).","operationId":"image_ocr_shrink","tags":["Data","AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","description":"Public image URL to parse"}},"required":["imageUrl"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"success":true,"extractedText":"## Invoice #1234\n\n| Item | Qty | Total |\n| :--- | :--- | :--- |\n| API credits | 500 | $12.50 |","characterCount":94,"tokensSavedEstimate":1476,"source":"cloudflare-workers-ai-vision"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/crypto/coverage":{"get":{"summary":"Crypto Coverage — free CEX-DEX telemetry discovery for AI agents. Returns supported pairs, earliest/latest timestamps, slice interval and the full telemetry endpoint map; no API key, no payment — use it to plan your query window.","description":"Crypto Coverage — free CEX-DEX telemetry discovery for AI agents. Returns supported pairs, earliest/latest timestamps, slice interval and the full telemetry endpoint map; no API key, no payment — use it to plan your query window. Price: 0 USDC on Base via x402. Latency SLA: < 100ms (avg 25ms).","operationId":"crypto_coverage","tags":["Data","Finance","Blockchain","Trading"],"parameters":[{"name":"pair","in":"query","required":false,"description":"Optional token pair filter (e.g. AERO/USD)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"service":"0mod-crypto-telemetry","version":"v3.0.0","status":"active","updated_at":"2026-09-29T00:00:00Z","earliest_timestamp":"2026-09-09T00:57:25Z","latest_timestamp":"2026-09-29T00:00:00Z","supported_pairs":["AERO/USD","B3/USD","DEGEN/USD","DIEM/USD","DRV/USD","ETH/USD","KEYCAT/USD","KTA/USD","VIRTUAL/USD","VVV/USD","WELL/USD","cbBTC/USD","cbETH/USD"],"slice_interval_minutes":15,"total_dislocations":796890,"total_executions":151614,"endpoints":{"coverage":"/api/v1/crypto/coverage","spread_candles":"/api/v1/crypto/spread-candles","dislocations":"/api/v1/crypto/dislocations","execution_latency":"/api/v1/crypto/execution-latency","impact_simulation":"/api/v1/crypto/impact-simulation"},"pricing":{"coverage":"FREE (0 USDC)","spread_candles":"$0.015 USDC (15000 atomic units)","dislocations":"$0.045 USDC (45000 atomic units)","execution_latency":"$0.075 USDC (75000 atomic units)","impact_simulation":"$0.075 USDC (75000 atomic units)"},"pre_flight_protection":"Requests outside available windows receive HTTP 404 with $0.00 charged."}}}}}}},"/api/v1/crypto/spread-candles":{"get":{"summary":"Spread Candles — cross-venue CEX-DEX spread OHLC for AI agents. Returns 15-minute raw/net spread bps candles, average net spread, book depth and dislocation counts for pairs like AERO/USD, ETH/USD and cbBTC/USD on Base; historical R2 slices, no API key.","description":"Spread Candles — cross-venue CEX-DEX spread OHLC for AI agents. Returns 15-minute raw/net spread bps candles, average net spread, book depth and dislocation counts for pairs like AERO/USD, ETH/USD and cbBTC/USD on Base; historical R2 slices, no API key. Price: 0.015 USDC on Base via x402. Latency SLA: < 150ms (avg 40ms).","operationId":"crypto_spread_candles","tags":["Data","Finance","Blockchain","Trading"],"parameters":[{"name":"pair","in":"query","required":true,"description":"Token pair (e.g. AERO/USD)","schema":{"type":"string"}},{"name":"date","in":"query","required":false,"description":"Date in YYYY-MM-DD format","schema":{"type":"string"}},{"name":"time","in":"query","required":false,"description":"Time slice in HHMM (default 0000)","schema":{"type":"string"}},{"name":"interval","in":"query","required":false,"description":"Candle interval (default 15m)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"pair":"AERO/USD","interval":"15m","slice_start":"2026-09-15T12:00:00Z","slice_end":"2026-09-15T12:00:59Z","open_raw_spread_bps":14.8,"high_raw_spread_bps":28.5,"low_raw_spread_bps":9.2,"close_raw_spread_bps":16.4,"avg_net_spread_bps":8.2,"max_net_spread_bps":19.1,"volume_depth_usd":48500,"dislocation_count":54,"source":"0mod-crypto-engine-r2"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/crypto/dislocations":{"get":{"summary":"Dislocations — CEX-DEX arbitrage events for AI agents. Returns synchronized cross-venue dislocation events (Coinbase vs Aerodrome Base DEX) with buy/sell venue, prices, raw/net bps, estimated profit and liquidity depth; real-time-sliced, no API key.","description":"Dislocations — CEX-DEX arbitrage events for AI agents. Returns synchronized cross-venue dislocation events (Coinbase vs Aerodrome Base DEX) with buy/sell venue, prices, raw/net bps, estimated profit and liquidity depth; real-time-sliced, no API key. Price: 0.045 USDC on Base via x402. Latency SLA: < 150ms (avg 45ms).","operationId":"crypto_dislocations","tags":["Data","Finance","Blockchain","Trading"],"parameters":[{"name":"pair","in":"query","required":true,"description":"Token pair (e.g. AERO/USD)","schema":{"type":"string"}},{"name":"date","in":"query","required":false,"description":"Date in YYYY-MM-DD format","schema":{"type":"string"}},{"name":"time","in":"query","required":false,"description":"Time slice in HHMM (default 0000)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"pair":"AERO/USD","slice_start":"2026-09-15T12:00:00Z","slice_end":"2026-09-15T12:00:59Z","count":1,"dislocations":[{"id":49120,"timestamp":"2026-09-15T12:03:12Z","pair":"AERO/USD","buy_venue":"coinbase","sell_venue":"aerodrome_base","buy_price":0.8455,"sell_price":0.8472,"raw_spread_bps":20.1,"net_spread_bps":8.5,"est_profit_usd":0.45,"liquidity_depth_usd":2500,"status":"OPPORTUNITY","duration_ms":145}],"source":"0mod-crypto-engine-r2"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/crypto/execution-latency":{"get":{"summary":"Execution Latency — cross-venue fill-speed benchmarks for AI agents. Returns p50/p90/p99/min/max latencies, fill rate and per-venue broadcast timings for Coinbase REST vs Aerodrome DEX; empirical execution-quality telemetry for routing decisions, no API key.","description":"Execution Latency — cross-venue fill-speed benchmarks for AI agents. Returns p50/p90/p99/min/max latencies, fill rate and per-venue broadcast timings for Coinbase REST vs Aerodrome DEX; empirical execution-quality telemetry for routing decisions, no API key. Price: 0.075 USDC on Base via x402. Latency SLA: < 120ms (avg 35ms).","operationId":"crypto_execution_latency","tags":["Data","Finance","Trading"],"parameters":[{"name":"date","in":"query","required":false,"description":"Date in YYYY-MM-DD format","schema":{"type":"string"}},{"name":"time","in":"query","required":false,"description":"Time slice in HHMM (default 0000)","schema":{"type":"string"}},{"name":"venue","in":"query","required":false,"description":"Optional venue filter (coinbase | base_dex)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"slice_start":"2026-09-15T12:00:00Z","slice_end":"2026-09-15T12:00:59Z","sample_count":36,"p50_latency_ms":158,"p90_latency_ms":182,"p99_latency_ms":215,"min_latency_ms":142,"max_latency_ms":235,"avg_latency_ms":164.2,"fill_rate_pct":98.6,"venues":{"coinbase_rest_ms":62,"aerodrome_base_dex_ms":96},"source":"0mod-crypto-engine-r2"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}},"/api/v1/crypto/impact-simulation":{"post":{"summary":"Impact Simulation — pre-trade slippage simulator for AI agents. Runs a read-only PAPER order against the LIVE L2 book and returns expected VWAP fill price, slippage in bps, fillable size and fill probability; no order is placed, no custody touched, no API key.","description":"Impact Simulation — pre-trade slippage simulator for AI agents. Runs a read-only PAPER order against the LIVE L2 book and returns expected VWAP fill price, slippage in bps, fillable size and fill probability; no order is placed, no custody touched, no API key. Price: 0.075 USDC on Base via x402. Latency SLA: < 600ms (avg 150ms).","operationId":"crypto_impact_simulation","tags":["Data","Finance","Trading"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pair":{"type":"string","description":"Token pair (e.g. AERO/USD or AERO-USD)"},"side":{"type":"string","description":"Order side: \"buy\" | \"sell\""},"size_base":{"type":"number","description":"Order size in base units (provide this OR size_usd)"},"size_usd":{"type":"number","description":"Order notional in USD (provide this OR size_base)"}},"required":["pair","side"]}}}},"responses":{"200":{"description":"Successful execution response","content":{"application/json":{"example":{"pair":"AERO-USD","side":"BUY","requested_size_base":8000,"requested_size_usd":7984,"mid_price":0.998,"best_bid":0.997,"best_ask":0.999,"spread_bps":20.04,"expected_fill_price":1.00025,"slippage_bps":22.545,"fillable_size_base":8000,"fillable_size_usd":8002,"fill_ratio":1,"full_fill_probability":1,"partial_fill_probability":1,"executable":true,"levels_consumed":2,"opposite_depth_usd":20050,"source":"crypto-cexdex-live-book","charged":"$0.075 USDC"}}}},"402":{"description":"HTTP 402 Payment Required — x402 payment header required"}}}}},"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","name":"payment-required","in":"header","description":"EIP-3009 transfer authorization signed by EVM private key on Base."}}}}