# AfterImage AfterImage is a shared copy of the public web for AI agents. If a page was fetched recently, reuse that copy instead of scraping again. Each copy has a timestamp and a sha256 hash of the raw bytes. Base URL: https://afterimage.page Do not scrape this file. Call the JSON endpoints below. ## 1. Get a key (human, once) POST https://afterimage.page/v1/billing/checkout Content-Type: application/json {"pack":"starter"} Packs: starter = $5 USD, builder = $20 USD. The JSON returns api_key and checkout_url. Open checkout_url, pay, then keep api_key secret. Send it on every later request: Authorization: Bearer ak_live_… HTTP 402 means the header is missing or the key has no credits left. Buy another pack. GET https://afterimage.page/v1/billing/balance with the same header to see remaining dollars. Prices: - GET /v1/search = $0.005 per call - GET /v1/page cache hit = $0.002 (copy still fresh) - GET /v1/page live fetch = $0.01 (origin was contacted) Optional: x402 USDC on Base instead of a key, if this instance advertises it at GET https://afterimage.page/.well-known/x402 ## 2. Search copies (does not visit the live web) GET https://afterimage.page/v1/search?q=fastapi+background+tasks Query: - q (required): words to find in titles and text - limit (optional, default 10, max 50) - max_age_s (optional): only copies this many seconds old Response: - indexed: how many copies are stored - hits[]: url, title, snippet, hash, fetched_at, age_s, status, score If indexed is 0, the library is empty. Fetch URLs with /v1/page, then search again. If hits is empty but indexed > 0, nothing matched. Try different words or fetch the URL. ## 3. Fetch or reuse a URL GET https://afterimage.page/v1/page?url=https://example.com/pricing&max_age_s=900 Query: - url (required): http or https. No logins, no private/internal addresses. - max_age_s (optional, default 900): reuse a stored copy if it is no older than this Response: - cache: "hit" (reused) or "miss" (live fetch) - text: readable extract, not HTML - hash: sha256 of the raw response body - fetched_at, age_s, status, title, final_url If you already have the URL from a search hit, call /v1/page to get the full text. If cache=hit, do not fetch the origin yourself unless you need a smaller max_age_s. ## MCP POST https://afterimage.page/mcp JSON-RPC. Tools: search_pages, get_page. initialize and tools/list are free. tools/call for those two tools needs the same Authorization header as HTTP, or x402 USDC. HTTP 402 if unpaid. Server card: GET https://afterimage.page/.well-known/mcp.json Also: GET https://afterimage.page/mcp/server-card ## Other - Health: GET https://afterimage.page/health - OpenAPI: GET https://afterimage.page/openapi.json - Agent card: GET https://afterimage.page/.well-known/agent-card.json - x402 discovery: GET https://afterimage.page/.well-known/x402