Integration
Complete setup to start earning
1
Register2
Verify3
Protect4
Test5
LiveStep 2: Verify Your Domain
Add this TXT record to your DNS to verify domain ownership:
tachi-verify=undefined💡 DNS changes can take 5-60 minutes to propagate. Click "Check Status" to verify.
Step 3: Deploy AI Crawler Protection
Deploy a Cloudflare Worker to enforce payment for AI crawlers accessing your domain.
What This Does:
- • Detects AI crawlers (GPTBot, Claude, Perplexity, etc.)
- • Returns 402 Payment Required if no payment proof
- • Validates payments via Tachi before serving content
- • Regular users access your site normally
Quick Setup (2 minutes):
- 1. Download worker template: cloudflare-worker-template.js
- 2. Go to Cloudflare Dashboard
- 3. Create new Worker, paste template code
- 4. Set environment variables:TACHI_PUBLISHER_ADDRESS = your-address
TACHI_PRICE_PER_REQUEST = 0.01 - 5. Add route:yourdomain.com/*
- 6. Click Deploy
💡 Without protection, AI crawlers can bypass payment by accessing your site directly. Deploy the worker to enforce payment.
Your Gateway URL
AI crawlers will use this URL to access your protected content
Gateway Endpoint
https://tachi-gateway.jgrahamsport16.workers.dev?publisher=0x...Integration Code
Choose how to protect your content:
// Protect your content with Tachi Gateway
const GATEWAY = 'https://tachi-gateway.jgrahamsport16.workers.dev?publisher=0x...';
// Option 1: Proxy your entire site (easiest)
// Gateway URL format:
// https://tachi-gateway.jgrahamsport16.workers.dev?publisher=0x...&target=https://yoursite.com/page
// Crawlers access:
const protectedUrl = GATEWAY + '&target=https://yoursite.com/api/data';
// Gateway verifies payment, fetches your content, returns to crawler
// Option 2: Verify payments in your API
app.get('/api/data', async (req, res) => {
const auth = req.headers.authorization;
if (!auth) return res.status(402).json({
error: 'Payment required',
price: '0.01',
publisher: '0x...'
});
// Verify tx hash on-chain
const verified = await verifyPayment(auth.replace('Bearer ', ''));
if (!verified) return res.status(402).json({error: 'Invalid payment'});
res.json({data: 'Your protected content'});
});Step 4: Test Your Setup
Verify your gateway is configured correctly
How It Works
- 1. Gateway checks for payment proof in request
- 2. If missing, returns 402 Payment Required with payment details
- 3. Crawler pays via PaymentProcessor contract on Base
- 4. Crawler retries request with transaction hash in Authorization header
- 5. Gateway verifies payment on-chain and serves your content