API Documentation

AI Content Access

bikevan.de uses the L402 protocol to provide paid API access for AI systems. Human visitors can access the site normally — this API is for automated systems and AI crawlers.

Content Overview

Premium MTB trail guides and vanlife content from Scandinavia.

64
Trail Guides
1054+
Photos
64
GPX Tracks
DE/EN
Languages

How It Works

When an AI crawler requests content, the server returns HTTP 402 Payment Required with payment instructions. After payment via Lightning Network, include the token in subsequent requests.

1. Request Content

# AI crawler requests a page
curl https://bikevan.de/posts/2023/norway-lofoten/

# Response: 402 Payment Required
{
  "status": 402,
  "message": "AI access requires payment",
  "payment": {
    "method": "Lightning Network",
    "endpoint": "https://bikevan.de/api/invoice"
  }
}

2. Generate Invoice

# Request a Lightning invoice
curl -X POST https://bikevan.de/api/invoice \
  -H "Content-Type: application/json" \
  -d '{"plan": "perRequest"}'

# Response includes bolt11 invoice
{
  "invoice": {
    "bolt11": "lnbc10n1pn...",
    "paymentHash": "a1b2c3d4...",
    "expiresAt": "2026-02-..."
  }
}

3. Pay & Access

# After payment, use the paymentHash as token
curl https://bikevan.de/posts/2023/norway-lofoten/ \
  -H "Authorization: L402 a1b2c3d4..."

# Response: Full content

API Reference

POST /api/invoice

Generate a Lightning invoice for content access.

Parameter Value Description
plan perRequest Single page access
dayPass 24 hour unlimited access
monthPass 30 day unlimited access

GET /api/verify

Check if a payment has been completed.

Parameter Example Description
hash a1b2c3d4... Payment hash from invoice

Pricing

Payments are in Satoshis (sats) via the Lightning Network. 1 BTC = 100,000,000 sats.

Plan Sats USD (approx)
perRequest 200 ~$0.08
dayPass 1,000 ~$0.40
monthPass 10,000 ~$4.00

For enterprise licensing or custom arrangements, contact [email protected]

Live Demo

Test the payment flow. Generate an invoice and pay with any Lightning wallet.

Interactive Demo

Generate a test invoice (perRequest = 200 sats)

Resources

/llms.txt Machine-readable site info for LLMs
/robots.txt Crawler directives
/sitemap.xml Content sitemap