{"name":"L402 Apps","description":"Directory of L402-powered apps and API endpoints. Submit your L402 endpoints and earn sats.","url":"https://www.l402apps.com","endpoints":[{"id":"l402apps-submit-app","name":"Submit App","method":"POST","endpoint":"https://www.l402apps.com/api/submissions","description":"Submit an L402-powered app to the directory.","cost":100,"costType":"fixed","direction":"charges"},{"id":"l402apps-submit-api","name":"Submit API Endpoint","method":"POST","endpoint":"https://www.l402apps.com/api/api-submissions","description":"Submit a verified L402 API endpoint and earn 10 sats. Accepts BOLT11 invoice or Lightning address for payout.","cost":10,"costType":"fixed","direction":"pays"},{"id":"l402apps-get-apps","name":"Get Apps Directory","method":"GET","endpoint":"https://www.l402apps.com/api/apps","description":"Get the complete JSON listing of all L402-powered apps.","cost":10,"costType":"fixed","direction":"charges"},{"id":"l402apps-get-apis","name":"Get APIs Directory","method":"GET","endpoint":"https://www.l402apps.com/api/apis","description":"Get the complete JSON listing of all L402-powered API endpoints.","cost":10,"costType":"fixed","direction":"charges"},{"id":"l402apps-boost","name":"Boost Listing","method":"POST","endpoint":"https://www.l402apps.com/api/boost","description":"Pay to boost an app or API to the top of the list. Marketplace-driven dynamic pricing.","cost":null,"costType":"variable","direction":"charges"},{"id":"l402apps-lottery","name":"Lightning Lottery","method":"POST","endpoint":"https://www.l402apps.com/api/lottery/enter","description":"Enter the 24h Lightning Lottery. More sats = higher winning probability. Provide a Lightning Address or node pubkey for payout.","cost":100,"costType":"variable","direction":"charges"},{"id":"l402apps-million-buy","name":"Million Sat Homepage — Buy Pixels","method":"POST","endpoint":"https://www.l402apps.com/api/million/buy","description":"Buy pixels on the Million Sat Homepage. 1 sat per pixel, minimum 1 pixel. Proceeds donated to OpenSats. Provide x, y, width, height, and optional color/imageData/link/title.","cost":1,"costType":"variable","direction":"charges"}],"millionSatHomepage":{"description":"The Million Sat Homepage — own a piece of Bitcoin internet history. 1 sat per pixel for free space, 5x per pixel when overlapping existing blocks. All proceeds donated to OpenSats.","gridSize":1000,"totalPixels":1000000,"costPerPixel":1,"overlapMultiplier":5,"minPixels":1,"maxPixels":100000,"pageUrl":"https://www.l402apps.com/million","endpoints":{"grid":{"method":"GET","url":"https://www.l402apps.com/api/million/grid","description":"Get all purchased pixel blocks (free)."},"stats":{"method":"GET","url":"https://www.l402apps.com/api/million/stats","description":"Get grid stats: total pixels sold, sats raised, leaderboard (free)."},"check":{"method":"POST","url":"https://www.l402apps.com/api/million/check","description":"Check region availability and cost. x and y are optional — omit them for auto-placement. Returns overlapPixels count and total costSats.","body":{"x":"integer 0-999 (optional — omit for auto-placement)","y":"integer 0-999 (optional — omit for auto-placement)","width":"integer >=1","height":"integer >=1"}},"buy":{"method":"POST","url":"https://www.l402apps.com/api/million/buy","description":"Buy pixels via L402. x and y are optional — omit for auto-placement. Use imageUrl instead of imageData to let the server fetch your logo directly (avoids payload limits, better quality). Overlapping existing pixels costs 5x per overlapping pixel.","body":{"x":"integer 0-999 (optional — omit for auto-placement)","y":"integer 0-999 (optional — omit for auto-placement)","width":"integer >=1","height":"integer >=1","color":"hex color string (optional, default #ff9900)","imageUrl":"URL to a PNG/JPEG/WebP image (recommended — server fetches and stores it, max 2MB). Preferred over imageData.","imageData":"base64 data URL of image (alternative to imageUrl). Use 3-5x block dimensions for crisp rendering.","link":"URL to link to when clicked (optional)","title":"display name / tooltip (optional, max 100 chars)"}},"status":{"method":"GET","url":"https://www.l402apps.com/api/million/buy/status/{paymentHash}","description":"Poll for payment status. Returns {paid: false} if unpaid. Once the invoice is paid, auto-completes the purchase and returns {paid: true, success: true, block, stats}. Idempotent — safe to call repeatedly. Use the paymentHash from the 402 response."}},"agentInstructions":"To buy pixels: 1) POST /api/million/buy with {width, height} (x/y optional — omit for auto-placement) — you'll get a 402 with an invoice, paymentHash, coordinates, and cost breakdown. 2) Show the Lightning invoice to the user to pay. 3) WAIT — the server automatically detects payment every 3 seconds and completes the purchase. You can confirm completion by polling GET /api/million/buy/status/{paymentHash} — it returns {paid: true, success: true, block, stats} once settled. ALTERNATIVE: If you have the preimage, you can POST /api/million/buy again with the SAME body plus Authorization: L402 <macaroon>:<preimage> header to complete immediately. PRICING: 1 sat per free pixel. Overlapping existing blocks costs 5x per overlapping pixel. The 402 response includes overlapPixels and the final amountSats. IMAGES: Prefer imageUrl over imageData — just pass a URL to a PNG/JPEG/WebP and the server fetches it directly. This avoids base64 encoding and payload size limits."},"submission":{"endpoint":"https://www.l402apps.com/api/api-submissions","method":"POST","description":"Submit an L402 API endpoint. The site verifies your endpoint returns HTTP 402 with a valid L402 challenge (WWW-Authenticate header with macaroon+invoice, or invoice in response body), then pays you 10 sats.","rewardSats":10,"request":{"url":{"type":"string","required":true,"description":"The L402 endpoint URL to verify and list."},"invoice":{"type":"string","required":false,"description":"A BOLT11 Lightning invoice for exactly 10 sats. Preferred payment method."},"lightningAddress":{"type":"string","required":false,"description":"A Lightning address (e.g. user@wallet.com) to receive 10 sats. Fallback if you cannot generate an invoice."},"description":{"type":"string","required":false,"description":"Optional human-readable description of the endpoint."}},"notes":"Provide either 'invoice' (preferred) or 'lightningAddress' (fallback). The endpoint URL is verified server-side — it must return HTTP 402 with a valid L402 challenge: either a WWW-Authenticate header containing L402/LSAT with macaroon+invoice fields, or an invoice (starting with lnbc) in the JSON response body.","example":{"curl":"curl -X POST https://www.l402apps.com/api/api-submissions -H \"Content-Type: application/json\" -d '{\"url\":\"https://api.example.com/v1/resource\",\"lightningAddress\":\"you@wallet.com\"}'"}}}