🤗 Pay-Per-Inference w/x402+CDP Payouts 🤗

Monetize your models on HF Spaces with fastapi-x402

Demo Mode: Using testnet (Base Sepolia)

💭 Text Generation

$0.01 per request

Generate creative text using DistilGPT-2

😊 Sentiment Analysis

$0.005 per request

Analyze text sentiment using RoBERTa

🖼️ Image Generation

$0.02 per request

Generate images using Amazon Nova Canvas

🔧 How it Works

  1. Click a service button to make a request
  2. FastAPI returns 402 Payment Required with payment details
  3. Your x402-compatible client (like MetaMask) signs the payment
  4. FastAPI verifies the payment with the facilitator
  5. AI service processes your request and returns results

Note: This demo requires an x402-compatible client. Try the debug endpoint to check configuration.