Monetize AI Traffic - an implementation for Fastly Compute

Hi Everyone - after a few months of grind, I wanted to share Fastly Compute@Edge SDK that implements the HTTP 402 Payment Required protocol and we are looking for publishers to beta test it.

What I / we (sounds better if I say ‘we’) Built:
ChatGPT, Claude, Perplexity, and other AI crawlers are scraping content at massive scale, but publishers see zero revenue from it. Our SDK intercepts these bots at the edge and asks them to pay first before they could access the page.

Historical Factoid on 402:

In 1997, when the HTTP/1.1 specification was being drafted (RFC 2068), Marc Andreessen et al. (Yes the bald guy from A16z!) added a status code: HTTP 402 Payment Required. Marc’s vision? A future where websites could charge micropayments for content, and browsers would seamlessly handle digital cash transactions.

The problem? Digital cash didn’t exist yet. So they marked it “Reserved for future use” and moved on.

For 25 years, HTTP 402 sat in the HTTP specification like a message in a bottle, waiting for the technology to catch up to the dream.

How 402 Works
We detect 45+ bot patterns (AI agents, crawlers, HTTP libraries) using a 3-step fingerprinting approach. When bots land on the page, they get a 402 response with payment instructions in 402-compliant headers that ai agents understand.

Payment Verification - Agents / Bots pay, we verify, and they get content + a reusable receipt token. Paid bots pass through for 24 hours without re-paying. Human visitors pass through completely untouched - zero latency impact.

Are bots actually paying?

Ohhh ya .. agent to agent payments are happening! See this image:

(Removing transaction image because new users can only embed 1 image in the post. The image shows millions of dollars in transaction volume)

Fastly Implementation:
We chose Fastly Compute because:

True Edge Execution - Block scrapers before they hit origin (saves compute costs)
KV Store - Perfect for caching site settings with 5-min TTL
ConfigStore - Secure credential management, no hardcoded keys
Sub-ms Latency - Bot detection runs in microseconds

The SDK is a single .js file (~700 lines). Drop it into your Compute project, configure fastly.toml with your backends and KV/ConfigStore, deploy. That’s it.

Architecture:

AI Bot → Fastly Edge (SDK) → Origin
├── isBot()? ✓
├── Has payment? → Verify → Forward
└── No payment? → Return 402 and block access to the page

I am hoping to connect with publishers tired of ai traffic hitting their servers and interested in being early testers. There might be potential bugs / edge cases that we haven’t uncovered … so you will be helping us make the product better. Your early participation will have you in our launch credits and I can also buy you coffee during pilot / testing sessions :slight_smile:.

Kindly share your thoughts …

1 Like

This is pretty cool @0xpotus, do you have a link to the project or a place where users can sign up to participate?

For sure thank you : https://402links.com/ . Once you register a site, you will be provided with various SDKs:

image

@0xpotus Is there any chance you could link directly to the SDKs? The community might be able to help optimize them <3