# 402s.shop > Pay-per-call HTTP 402 utility API for AI agents. 16 endpoints (QR codes, screenshots, OG images, PDF rendering, web scraping, AI summarization, plus crypto-native: ENS resolve, wallet balance, coin price, gas price). Two payment rails: pre-paid credits (card or 100+ cryptos via NowPayments) or x402 USDC pay-per-call autonomous (Coinbase x402 protocol on Base mainnet). Hosted MCP server included. 402s.shop is built specifically for AI agents to call programmatically. Both payment rails are agent-friendly: the x402 rail requires no signup and no API key — the agent signs an EIP-3009 USDC transfer offline and the Coinbase facilitator broadcasts and pays gas, settling directly to the merchant wallet on Base mainnet. The credits rail is for human developers who want to pre-buy credits and share an API key with their agent. Same endpoints, two ways to pay. The hosted MCP server at /api/mcp exposes all 16 endpoints as native tools, so configuring this in Claude Desktop, Cursor, or Cline takes one line of config and the agent can call any tool by name. ## Endpoints (all available at /api/v1/ for credits rail and /api/x402/ for USDC rail) - /qr-code — Generate QR code PNG from text (1-2048 chars, optional size 100-1000px) - /og-image — Generate 1200x630 social media OG image with title and subtitle - /screenshot — Take PNG screenshot of any URL using headless Chromium - /pdf-from-url — Render any URL to a print-ready PDF (A4, Letter, Legal) - /word-count — Count words and reading time on any webpage - /extract-metadata — Extract Open Graph, Twitter card, and standard meta tags - /extract-emails — Find email addresses on a webpage - /website-tech — Detect framework, CMS, analytics, and hosting/CDN - /whois — WHOIS lookup with normalized fields (registrar, dates, nameservers) - /domain-check — Check whether a domain appears available - /youtube-transcript — Fetch YouTube video transcript with timestamps - /summarize — AI-powered summary of supplied text or fetched URL (Claude Haiku 4.5) - /coin-price — Crypto spot prices in USD via CoinGecko (25+ tickers) - /ens-resolve — Resolve ENS name to address or address to primary name (with avatar) - /wallet-balance — Native + USDC balance for an EVM address across 5 chains - /gas-price — Live gas price across 5 EVM chains in gwei ## Pricing - Credits rail: $1 = 5 calls, $5 = 30 calls, $20 = 150 calls. Credits never expire. Buy at https://402s.shop. Pay with card or 100+ cryptos via NowPayments. - x402 rail: 0.001 USDC per call default, 0.01 USDC for /summarize. Settled on Base mainnet via Coinbase CDP facilitator (gas paid by facilitator, not the buyer). ## Autonomous credits purchase (agent-friendly) Agents can buy a credits API key without any human in the loop. POST any of these and pay via x402: - POST /api/buy-credits/small → $1 USDC → 5 credits - POST /api/buy-credits/medium → $5 USDC → 30 credits - POST /api/buy-credits/large → $20 USDC → 150 credits Flow: agent posts an empty body, server returns 402 with x402 payment requirements for the package amount, agent signs an EIP-3009 USDC transferWithAuthorization, retries with X-PAYMENT header, server settles via Coinbase facilitator on Base mainnet, response returns a fresh ap_live_... key with the package's credits. Best for: agents acting on behalf of humans ("buy me X credits"), reseller integrations, or high-volume agents wanting one persistent key. For ad-hoc per-call work, the x402 rail directly is cheaper (0.001 USDC/call vs 0.20 USDC/call on the credits rail). ## Documentation - Live site: https://402s.shop - Docs page (full API reference): https://402s.shop/docs - Machine-readable manifest: https://402s.shop/api/v1 - OpenAPI spec: https://402s.shop/openapi.json - MCP server endpoint: https://402s.shop/api/mcp - Source code: https://github.com/402shop/402s-shop (MIT license) - MCP listings: https://smithery.ai/server/ucebuceb/shop402, https://mcp.so/server/402s-shop/402shop ## Dashboard (no signup, key-based access) For any API key, a live dashboard at https://402s.shop/dashboard/ shows credits remaining, total calls, success rate, and a real-time activity log (refreshes every 2s). No login required — possession of the key is the auth. This sidesteps the "signup ceremony" problem: the user can share or bookmark the dashboard URL and get the same view as if logged in. ## How to call programmatically Credits rail: ``` curl -X POST https://402s.shop/api/v1/qr-code \ -H "Authorization: Bearer ap_live_..." \ -H "Content-Type: application/json" \ -d '{"text":"hello"}' --output qr.png ``` x402 rail (no key, agent signs EIP-3009 offline and submits via X-PAYMENT header): - See https://402s.shop/docs#x402 for the full sign-and-retry flow - Reference client: https://github.com/402shop/402s-shop/blob/main/scripts/test-x402.mjs MCP setup (Claude Desktop / Cursor / Cline): ``` { "mcpServers": { "402s-shop": { "url": "https://402s.shop/api/mcp", "headers": { "Authorization": "Bearer ap_live_..." } } } } ``` ## Audience Built for AI agents (autonomous LLM-driven processes) and the developers who deploy them. Agents can pay autonomously without any human in the loop via the x402 rail. Developers can also pre-buy credits and let their agents share a key. ## Technical details - Runtime: Next.js 14 + Node.js, single $24/mo VPS, PM2 cluster, nginx + Let's Encrypt SSL - File-based persistence with atomic writes (no DB dependency) - Server holds zero private keys — full self-custody for the merchant wallet - x402 mainnet verified end-to-end with real USDC settlement - Open source (MIT) — fork, run your own, or contribute