{"name":"402s.shop API","version":"1.2.0","description":"16 pay-per-call HTTP 402 utility endpoints for AI agents (12 utility + 4 crypto-native: ENS, wallet balance, coin price, gas price). Two payment rails: pre-paid API keys (human-friendly) or x402 USDC per-call (agent-autonomous, no signup).","rails":{"api_key":{"rail":"bearer","path_prefix":"/api/v1/","auth":"Authorization: Bearer ap_live_...","purchase_url":"https://402s.shop","pricing":[{"package":"small","amount_usd":1,"credits":5},{"package":"medium","amount_usd":5,"credits":30},{"package":"large","amount_usd":20,"credits":150}],"cost_per_call":1,"notes":"Buy credits at the landing page with card or 100+ cryptos via NowPayments. Human-in-the-loop; best for developers integrating agents that share a key."},"x402":{"rail":"x402","spec":"https://x402.org","path_prefix":"/api/x402/","auth":"X-PAYMENT: <base64(signed EIP-3009 transferWithAuthorization)>","network":"base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","asset_symbol":"USDC","pay_to":"0xF17753bC761Cf248b43Bed57d433254C6BDB5De7","default_price_atomic":"1000","default_price_usd":0.001,"notes":"Fully autonomous payment per call. No account or API key. Buyer signs EIP-3009 transferWithAuthorization offline; facilitator broadcasts and pays gas; USDC settles directly to pay_to. Server holds zero private keys. Mainnet uses Coinbase CDP facilitator (https://api.cdp.coinbase.com/platform/v2/x402, JWT auth, 1k free txns/month). Testnet (base-sepolia) uses the open https://x402.org/facilitator."}},"discovery":{"manifest":"https://402s.shop/api/v1","openapi":"https://402s.shop/openapi.json","mcp_server":"https://402s.shop/api/mcp","mcp_protocol":"JSON-RPC 2.0 over streamable HTTP, dual auth (Authorization header or ?apiKey= query)","llms_txt":"https://402s.shop/llms.txt","sitemap":"https://402s.shop/sitemap.xml","docs":"https://402s.shop/docs","blog":"https://402s.shop/blog","github":"https://github.com/402shop/402s-shop","smithery":"https://smithery.ai/server/ucebuceb/shop402","mcp_so":"https://mcp.so/server/402s-shop/402shop"},"purchase":{"human_checkout":{"path":"/api/checkout","description":"Browser-based: NowPayments hosted checkout (card or 100+ cryptos). Best for humans.","rail":"nowpayments"},"agent_autonomous":{"paths":[{"path":"/api/buy-credits/small","package":"small","amount_usd":1,"credits":5},{"path":"/api/buy-credits/medium","package":"medium","amount_usd":5,"credits":30},{"path":"/api/buy-credits/large","package":"large","amount_usd":20,"credits":150}],"description":"POST any of the three URLs without auth → 402 with x402 accepts[]. Sign EIP-3009 USDC payment for the package amount, retry with X-PAYMENT header. Server settles via Coinbase facilitator on Base mainnet, mints a fresh ap_live_... API key with the package credits, returns the key in the response. Fully autonomous — no signup, no human checkout.","rail":"x402","example_response":{"ok":true,"api_key":"ap_live_...","credits":5,"package":"small","paid_usd":1}}},"endpoints":[{"path":"/api/v1/qr-code","method":"POST","rail":"bearer","credits":1,"description":"Generate a QR code PNG from text","request":{"text":"string (required)","size":"number (optional, 100-1000)"},"response":{"content_type":"image/png"}},{"path":"/api/x402/qr-code","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Generate a QR code PNG from text","request":{"text":"string (required)","size":"number (optional, 100-1000)"},"response":{"content_type":"image/png"}},{"path":"/api/v1/og-image","method":"POST","rail":"bearer","credits":1,"description":"Generate a 1200x630 social media OG image","request":{"title":"string (required)","subtitle":"string","theme":"\"dark\" | \"light\""},"response":{"content_type":"image/png"}},{"path":"/api/x402/og-image","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Generate a 1200x630 social media OG image","request":{"title":"string (required)","subtitle":"string","theme":"\"dark\" | \"light\""},"response":{"content_type":"image/png"}},{"path":"/api/v1/screenshot","method":"POST","rail":"bearer","credits":1,"description":"Take a screenshot of any URL","request":{"url":"string (required)","viewport":"{width,height}","fullPage":"boolean"},"response":{"content_type":"image/png"}},{"path":"/api/x402/screenshot","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Take a screenshot of any URL","request":{"url":"string (required)","viewport":"{width,height}","fullPage":"boolean"},"response":{"content_type":"image/png"}},{"path":"/api/v1/pdf-from-url","method":"POST","rail":"bearer","credits":1,"description":"Convert any URL to PDF","request":{"url":"string (required)","format":"\"A4\" | \"Letter\" | \"Legal\""},"response":{"content_type":"application/pdf"}},{"path":"/api/x402/pdf-from-url","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Convert any URL to PDF","request":{"url":"string (required)","format":"\"A4\" | \"Letter\" | \"Legal\""},"response":{"content_type":"application/pdf"}},{"path":"/api/v1/word-count","method":"POST","rail":"bearer","credits":1,"description":"Count words and reading time on any URL","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/word-count","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Count words and reading time on any URL","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/extract-metadata","method":"POST","rail":"bearer","credits":1,"description":"Extract Open Graph and meta tags from any URL","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/extract-metadata","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Extract Open Graph and meta tags from any URL","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/extract-emails","method":"POST","rail":"bearer","credits":1,"description":"Find email addresses on a webpage","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/extract-emails","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Find email addresses on a webpage","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/website-tech","method":"POST","rail":"bearer","credits":1,"description":"Detect frameworks, CMS, and analytics tools","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/website-tech","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Detect frameworks, CMS, and analytics tools","request":{"url":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/whois","method":"POST","rail":"bearer","credits":1,"description":"Get domain registration data","request":{"domain":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/whois","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Get domain registration data","request":{"domain":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/domain-check","method":"POST","rail":"bearer","credits":1,"description":"Check if a domain is available","request":{"domain":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/domain-check","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Check if a domain is available","request":{"domain":"string (required)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/youtube-transcript","method":"POST","rail":"bearer","credits":1,"description":"Get YouTube video transcript","request":{"url":"string (required)","lang":"string (optional)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/youtube-transcript","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Get YouTube video transcript","request":{"url":"string (required)","lang":"string (optional)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/summarize","method":"POST","rail":"bearer","credits":1,"description":"AI-powered text or URL summarization","request":{"text":"string OR url: string","length":"\"short\" | \"medium\" | \"long\""},"response":{"content_type":"application/json"}},{"path":"/api/x402/summarize","method":"POST","rail":"x402","price_atomic_usdc":"10000","price_usd":0.01,"description":"AI-powered text or URL summarization","request":{"text":"string OR url: string","length":"\"short\" | \"medium\" | \"long\""},"response":{"content_type":"application/json"}},{"path":"/api/v1/coin-price","method":"POST","rail":"bearer","credits":1,"description":"Crypto spot prices in USD (CoinGecko)","request":{"symbols":"string[] (optional, default [\"BTC\",\"ETH\",\"USDC\"], max 25)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/coin-price","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Crypto spot prices in USD (CoinGecko)","request":{"symbols":"string[] (optional, default [\"BTC\",\"ETH\",\"USDC\"], max 25)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/ens-resolve","method":"POST","rail":"bearer","credits":1,"description":"Resolve ENS name to address or reverse","request":{"name":"string (e.g. \"vitalik.eth\") OR address: string (0x...)"},"response":{"content_type":"application/json"}},{"path":"/api/x402/ens-resolve","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Resolve ENS name to address or reverse","request":{"name":"string (e.g. \"vitalik.eth\") OR address: string (0x...)"},"response":{"content_type":"application/json"}},{"path":"/api/v1/wallet-balance","method":"POST","rail":"bearer","credits":1,"description":"Native + USDC balance across EVM chains","request":{"address":"string (required, 0x...)","chains":"string[] (optional, default [\"base\",\"ethereum\"])"},"response":{"content_type":"application/json"}},{"path":"/api/x402/wallet-balance","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Native + USDC balance across EVM chains","request":{"address":"string (required, 0x...)","chains":"string[] (optional, default [\"base\",\"ethereum\"])"},"response":{"content_type":"application/json"}},{"path":"/api/v1/gas-price","method":"POST","rail":"bearer","credits":1,"description":"Current gas price across EVM chains","request":{"chains":"string[] (optional, default [\"base\",\"ethereum\"])"},"response":{"content_type":"application/json"}},{"path":"/api/x402/gas-price","method":"POST","rail":"x402","price_atomic_usdc":"1000","price_usd":0.001,"description":"Current gas price across EVM chains","request":{"chains":"string[] (optional, default [\"base\",\"ethereum\"])"},"response":{"content_type":"application/json"}}],"error_responses":{"400":{"error":"bad_request","description":"Invalid request body or missing required fields"},"401":{"error":"invalid_api_key","description":"(Bearer rail) API key missing or invalid"},"402":{"bearer_rail":"Out of credits — top up at the purchase URL","x402_rail":"X-PAYMENT header missing or invalid; response body contains accepts[] per x402 spec"},"422":{"error":"processing_failed","description":"External resource fetch failed (no charge — credit/USDC not deducted)"}},"headers":{"WWW-Authenticate":"(Bearer rail) Returned with 402 — Bearer realm, charge, topup_url","X-Credits-Remaining":"(Bearer rail) Returned with every successful call","X-PAYMENT-RESPONSE":"(x402 rail) Returned with every successful call — base64 settlement metadata (tx hash, payer)"}}